VuoPoint2d C type definition.
Definition in file VuoPoint2d.h.
Go to the source code of this file.
Classes | |
struct | VuoList_VuoPoint2d_struct |
List type. More... | |
Functions | |
VuoPoint2d | VuoPoint2d_makeFromJson (json_object *js) |
Decodes the JSON object js to create a new value. More... | |
json_object * | VuoPoint2d_getJson (const VuoPoint2d value) |
Encodes value as a JSON object. More... | |
char * | VuoPoint2d_getSummary (const VuoPoint2d value) |
Returns a compact string representation of value (comma-separated coordinates). More... | |
bool | VuoPoint2d_areEqual (const VuoPoint2d value1, const VuoPoint2d value2) |
Returns true if the two points are equal (within tolerance). More... | |
bool | VuoPoint2d_areEqualListWithinTolerance (VuoList_VuoPoint2d values, VuoPoint2d tolerance) |
Returns true if the two values are equal within component-wise tolerance . More... | |
bool | VuoPoint2d_isLessThan (const VuoPoint2d a, const VuoPoint2d b) |
Compares a to b primarily by x -value and secondarily by y -value, returning true if a is less than b . More... | |
bool | VuoPoint2d_isWithinRange (VuoPoint2d value, VuoPoint2d minimum, VuoPoint2d maximum) |
Returns true if each component of value is between minimum and maximum . More... | |
VuoPoint2d | VuoPoint2d_minList (VuoList_VuoPoint2d values, VuoInteger *outputPosition) |
Returns the minimum of a list of terms, or 0 if the array is empty. More... | |
VuoPoint2d | VuoPoint2d_maxList (VuoList_VuoPoint2d values, VuoInteger *outputPosition) |
Returns the maximum of a list of terms, or 0 if the array is empty. More... | |
VuoPoint2d | VuoPoint2d_average (VuoList_VuoPoint2d values) |
Returns the average of the values in the list, or 0 if the list is empty. More... | |
VuoPoint2d | VuoPoint2d_random (const VuoPoint2d minimum, const VuoPoint2d maximum) |
Returns a pseudorandom value where each component is between minimum and maximum . More... | |
VuoPoint2d | VuoPoint2d_randomWithState (unsigned short state[3], const VuoPoint2d minimum, const VuoPoint2d maximum) |
Returns a pseudorandom value where each component is between minimum and maximum . More... | |
static VuoPoint2d | VuoPoint2d_make (float x, float y) __attribute__((const)) |
Returns a point with the specified coordinates. More... | |
static VuoPoint2d | VuoPoint2d_makeFromArray (float *f) |
Returns a point using the first 2 elements in the specified array. More... | |
static void | VuoPoint2d_setArray (float *f, VuoPoint2d p) |
Sets the first 2 elements in the specified array to the specified point. More... | |
static VuoPoint2d | VuoPoint2d_add (VuoPoint2d a, VuoPoint2d b) __attribute__((const)) |
a + b . More... | |
static VuoPoint2d | VuoPoint2d_subtract (VuoPoint2d a, VuoPoint2d b) __attribute__((const)) |
a - b . More... | |
static float | VuoPoint2d_squaredMagnitude (VuoPoint2d a) __attribute__((const)) |
Returns the squared magnitude of the vector. More... | |
static VuoPoint2d | VuoPoint2d_divide (VuoPoint2d a, VuoPoint2d b) __attribute__((const)) |
Component-wise division. More... | |
static VuoPoint2d | VuoPoint2d_makeNonzero (VuoPoint2d a) __attribute__((const)) |
If any component of the value is zero or very close to zero, moves it further from zero (either 0.000001 or -0.000001). More... | |
static float | VuoPoint2d_magnitude (VuoPoint2d a) __attribute__((const)) |
Returns the magnitude of the vector. More... | |
static VuoPoint2d | VuoPoint2d_normalize (VuoPoint2d a) __attribute__((const)) |
Returns the normalization of a . More... | |
static VuoPoint2d | VuoPoint2d_multiply (VuoPoint2d a, float b) __attribute__((const)) |
a * b More... | |
static float | VuoPoint2d_dotProduct (VuoPoint2d u, VuoPoint2d v) __attribute__((const)) |
Returns the dot product of u , v . More... | |
static float | VuoPoint2d_distance (VuoPoint2d a, VuoPoint2d b) __attribute__((const)) |
Distance between a and b . More... | |
static VuoPoint2d | VuoPoint2d_min (const VuoPoint2d l, const VuoPoint2d r) __attribute__((const)) |
Returns component-wise min. More... | |
static VuoPoint2d | VuoPoint2d_max (const VuoPoint2d l, const VuoPoint2d r) __attribute__((const)) |
Returns component-wise max. More... | |
static VuoPoint2d | VuoPoint2d_lerp (VuoPoint2d a, VuoPoint2d b, float t) __attribute__((const)) |
Returns a linearly interpolated value between a and b using time t . More... | |
static VuoPoint2d | VuoPoint2d_scale (VuoPoint2d a, VuoPoint2d b) __attribute__((const)) |
Returns component-wise multiplication of two VuoPoint2d vectors. More... | |
static VuoPoint2d | VuoPoint2d_spring (VuoReal timeSinceDrop, VuoPoint2d dropPosition, VuoPoint2d restingPosition, VuoReal period, VuoReal damping) |
Calculates a position along the path of an oscillating spring. More... | |
static VuoPoint2d | VuoPoint2d_clamp (VuoPoint2d point, VuoReal limitA, VuoReal limitB) |
Limits point to values between limitA and limitB , inclusive. More... | |
static VuoPoint2d | VuoPoint2d_clampn (VuoPoint2d point, VuoPoint2d limitA, VuoPoint2d limitB) |
Limits point to values between limitA and limitB , inclusive. More... | |
static VuoPoint2d | VuoPoint2d_bezier3 (VuoPoint2d p0, VuoPoint2d p1, VuoPoint2d p2, VuoPoint2d p3, VuoReal time) |
Calculates a position along a cubic bezier curve. More... | |
static VuoPoint2d | VuoPoint2d_snap (VuoPoint2d a, VuoPoint2d center, VuoPoint2d snap) |
Snap value a to the nearest increment of value snap. More... | |
VuoPoint2d | VuoPoint2d_makeFromString (const char *str) |
Automatically generated function. More... | |
char * | VuoPoint2d_getString (const VuoPoint2d value) |
Automatically generated function. More... | |
void | VuoPoint2d_retain (VuoPoint2d value) |
Automatically generated function. More... | |
void | VuoPoint2d_release (VuoPoint2d value) |
Automatically generated function. More... | |
#define | VuoList_VuoPoint2d_TYPE_DEFINED |
List type. More... | |
typedef const struct VuoList_VuoPoint2d_struct * | VuoList_VuoPoint2d |
List type. More... | |