Vuo 2.4.4
|
A floating-point 3-dimensional Cartesian spatial location.
Classes | |
struct | VuoBox |
Defines a bounding box. More... | |
Macros | |
#define | VuoPoint3d_SUPPORTS_COMPARISON |
Instances of this type can be compared and sorted. | |
Functions | |
VuoPoint3d | VuoPoint3d_makeFromJson (json_object *js) |
Decodes the JSON object js to create a new value. | |
char * | VuoPoint3d_getSummary (const VuoPoint3d value) |
Returns a compact string representation of value (comma-separated coordinates). | |
struct json_object * | VuoPoint3d_getJson (const VuoPoint3d value) |
Encodes value as a JSON object. | |
bool | VuoPoint3d_areEqual (const VuoPoint3d value1, const VuoPoint3d value2) |
Returns true if the two points are equal (within tolerance). | |
bool | VuoPoint3d_areEqualListWithinTolerance (VuoList_VuoPoint3d values, VuoPoint3d tolerance) |
Returns true if the two values are equal within component-wise tolerance . | |
bool | VuoPoint3d_isLessThan (const VuoPoint3d a, const VuoPoint3d b) |
Compares a to b primarily by x -value, secondarily by y -value, and finally by z -value, returning true if a is less than b . | |
bool | VuoPoint3d_isWithinRange (VuoPoint3d value, VuoPoint3d minimum, VuoPoint3d maximum) |
Returns true if each component of value is between minimum and maximum . | |
VuoPoint3d | VuoPoint3d_minList (VuoList_VuoPoint3d values, VuoInteger *outputPosition) |
Returns the minimum of a list of terms, or 0 if the array is empty. | |
VuoPoint3d | VuoPoint3d_maxList (VuoList_VuoPoint3d values, VuoInteger *outputPosition) |
Returns the maximum of a list of terms, or 0 if the array is empty. | |
VuoPoint3d | VuoPoint3d_average (VuoList_VuoPoint3d values) |
Returns the average of the values in the list, or 0 if the list is empty. | |
VuoPoint3d | VuoPoint3d_random (const VuoPoint3d minimum, const VuoPoint3d maximum) |
Returns a pseudorandom value where each component is between minimum and maximum . | |
VuoPoint3d | VuoPoint3d_randomWithState (unsigned short state[3], const VuoPoint3d minimum, const VuoPoint3d maximum) |
Returns a pseudorandom value where each component is between minimum and maximum . | |
static VuoPoint3d | VuoPoint3d_make (float x, float y, float z) __attribute__((const)) |
Returns a point with the specified coordinates. | |
static VuoPoint3d | VuoPoint3d_makeFromArray (float *f) |
Returns a point using the first 3 elements in the specified array. | |
static void | VuoPoint3d_setArray (float *f, VuoPoint3d p) |
Sets the first 3 elements in the specified array to the specified point. | |
static VuoBox | VuoBox_make (VuoPoint3d center, VuoPoint3d size) __attribute__((const)) |
Returns a box with the specified center and size. | |
static VuoBox | VuoBox_makeWithPoints (float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) __attribute__((const)) |
Returns an axis aligned bounding box with the specified min and max coordinates. | |
static VuoPoint3d | VuoPoint3d_crossProduct (VuoPoint3d u, VuoPoint3d v) __attribute__((const)) |
Returns the cross-product of u and v . | |
static float | VuoPoint3d_dotProduct (VuoPoint3d u, VuoPoint3d v) __attribute__((const)) |
Returns the dot product of u , v . | |
static float | VuoPoint3d_magnitude (VuoPoint3d a) __attribute__((const)) |
Returns the magnitude of the vector. | |
static VuoPoint3d | VuoPoint3d_normalize (VuoPoint3d a) __attribute__((const)) |
Returns the normalization of a . | |
static VuoPoint3d | VuoPoint3d_add (VuoPoint3d a, VuoPoint3d b) __attribute__((const)) |
a + b . | |
static VuoPoint3d | VuoPoint3d_subtract (VuoPoint3d a, VuoPoint3d b) __attribute__((const)) |
a - b . | |
static float | VuoPoint3d_squaredMagnitude (VuoPoint3d a) __attribute__((const)) |
Returns the magnitude of the vector. | |
static VuoPoint3d | VuoPoint3d_divide (VuoPoint3d a, VuoPoint3d b) __attribute__((const)) |
Component-wise division. | |
static VuoPoint3d | VuoPoint3d_multiply (VuoPoint3d a, float b) __attribute__((const)) |
a * b | |
static VuoPoint3d | VuoPoint3d_min (const VuoPoint3d l, const VuoPoint3d r) __attribute__((const)) |
Returns component-wise min. | |
static VuoPoint3d | VuoPoint3d_max (const VuoPoint3d l, const VuoPoint3d r) __attribute__((const)) |
Returns component-wise max. | |
static VuoPoint3d | VuoPoint3d_makeNonzero (VuoPoint3d 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). | |
static float | VuoPoint3d_distance (VuoPoint3d a, VuoPoint3d b) __attribute__((const)) |
Distance between a and b . | |
static VuoPoint3d | VuoPoint3d_lerp (VuoPoint3d a, VuoPoint3d b, float t) __attribute__((const)) |
Returns a linearly interpolated value between a and b using time t . | |
static VuoPoint3d | VuoPoint3d_scale (VuoPoint3d a, VuoPoint3d b) __attribute__((const)) |
Returns component-wise multiplication of two VuoPoint3d vectors. | |
static VuoPoint3d | VuoPoint3d_mod (VuoPoint3d a, VuoPoint3d b) __attribute__((const)) |
Returns the component-wise modulus of two VuoPoint3d vectors. | |
static VuoPoint3d | VuoPoint3d_spring (VuoReal timeSinceDrop, VuoPoint3d dropPosition, VuoPoint3d restingPosition, VuoReal period, VuoReal damping) |
Calculates a position along the path of an oscillating spring. | |
static VuoPoint3d | VuoPoint3d_clamp (VuoPoint3d point, VuoReal limitA, VuoReal limitB) |
Limits point to values between limitA and limitB , inclusive. | |
static VuoPoint3d | VuoPoint3d_clampn (VuoPoint3d point, VuoPoint3d limitA, VuoPoint3d limitB) |
Limits point to values between limitA and limitB , inclusive. | |
static VuoPoint3d | VuoPoint3d_bezier3 (VuoPoint3d p0, VuoPoint3d p1, VuoPoint3d p2, VuoPoint3d p3, VuoReal time) |
Calculates a position along a cubic bezier curve. | |
static VuoPoint3d | VuoPoint3d_snap (VuoPoint3d a, VuoPoint3d center, VuoPoint3d snap) |
Snap value a to the nearest increment of value snap. | |
static VuoBox | VuoBox_encapsulate (VuoBox a, VuoBox b) |
Grow the VuoBox to encapsulate b . | |
static VuoBoolean | VuoBox_contains (VuoBox aabb, VuoPoint3d point) |
Check if a point is contained within a bounding box. | |
static VuoBoolean | VuoBox_intersects (VuoBox a, VuoBox b) |
Check if two boxes interesect with one another. | |
VuoPoint4d | VuoPoint4d_makeFromJson (json_object *js) |
Decodes the JSON object js to create a new value. | |
char * | VuoPoint3d_getString (const VuoPoint3d value) |
Automatically generated function. | |
void | VuoPoint3d_retain (VuoPoint3d value) |
Automatically generated function. | |
void | VuoPoint3d_release (VuoPoint3d value) |
Automatically generated function. | |
#define VuoPoint3d_SUPPORTS_COMPARISON |
Instances of this type can be compared and sorted.
Definition at line 34 of file VuoPoint3d.h.
|
inlinestatic |
Check if a point is contained within a bounding box.
Definition at line 385 of file VuoPoint3d.h.
Grow the VuoBox to encapsulate b
.
Definition at line 363 of file VuoPoint3d.h.
|
inlinestatic |
Check if two boxes interesect with one another.
Definition at line 399 of file VuoPoint3d.h.
|
inlinestatic |
Returns a box with the specified center and size.
Definition at line 106 of file VuoPoint3d.h.
|
inlinestatic |
Returns an axis aligned bounding box with the specified min and max coordinates.
Definition at line 115 of file VuoPoint3d.h.
|
inlinestatic |
a
+ b
.
Definition at line 167 of file VuoPoint3d.h.
bool VuoPoint3d_areEqual | ( | const VuoPoint3d | value1, |
const VuoPoint3d | value2 | ||
) |
Returns true if the two points are equal (within tolerance).
Definition at line 121 of file VuoPoint3d.c.
bool VuoPoint3d_areEqualListWithinTolerance | ( | VuoList_VuoPoint3d | values, |
VuoPoint3d | tolerance | ||
) |
Returns true if the two values are equal within component-wise tolerance
.
Definition at line 131 of file VuoPoint3d.c.
VuoPoint3d VuoPoint3d_average | ( | VuoList_VuoPoint3d | values | ) |
Returns the average of the values in the list, or 0 if the list is empty.
Definition at line 226 of file VuoPoint3d.c.
|
inlinestatic |
Calculates a position along a cubic bezier curve.
p0 | The curve's starting position. |
p1 | The control point for the curve's starting position. |
p2 | The control point for the curve's ending position. |
p3 | The curve's ending position. |
time | Which value along the curve should be returned. 0 = starting position, 1 = ending position. |
Definition at line 338 of file VuoPoint3d.h.
|
inlinestatic |
Limits point
to values between limitA
and limitB
, inclusive.
Definition at line 308 of file VuoPoint3d.h.
|
inlinestatic |
Limits point
to values between limitA
and limitB
, inclusive.
Definition at line 320 of file VuoPoint3d.h.
|
inlinestatic |
Returns the cross-product of u
and v
.
Definition at line 127 of file VuoPoint3d.h.
|
inlinestatic |
Distance between a
and b
.
Definition at line 252 of file VuoPoint3d.h.
|
inlinestatic |
Component-wise division.
Definition at line 195 of file VuoPoint3d.h.
|
inlinestatic |
Returns the dot product of u
, v
.
Definition at line 140 of file VuoPoint3d.h.
struct json_object * VuoPoint3d_getJson | ( | const VuoPoint3d | value | ) |
Encodes value
as a JSON object.
Definition at line 93 of file VuoPoint3d.c.
char * VuoPoint3d_getString | ( | const VuoPoint3d | value | ) |
Automatically generated function.
char * VuoPoint3d_getSummary | ( | const VuoPoint3d | value | ) |
Returns a compact string representation of value
(comma-separated coordinates).
Definition at line 113 of file VuoPoint3d.c.
bool VuoPoint3d_isLessThan | ( | const VuoPoint3d | a, |
const VuoPoint3d | b | ||
) |
Compares a
to b
primarily by x
-value, secondarily by y
-value, and finally by z
-value, returning true if a
is less than b
.
Definition at line 157 of file VuoPoint3d.c.
bool VuoPoint3d_isWithinRange | ( | VuoPoint3d | value, |
VuoPoint3d | minimum, | ||
VuoPoint3d | maximum | ||
) |
Returns true if each component of value
is between minimum
and maximum
.
Definition at line 168 of file VuoPoint3d.c.
|
inlinestatic |
Returns a linearly interpolated value between a
and b
using time t
.
t
is between 0 and 1.
Definition at line 261 of file VuoPoint3d.h.
|
inlinestatic |
Returns the magnitude of the vector.
Definition at line 149 of file VuoPoint3d.h.
|
inlinestatic |
Returns a point with the specified coordinates.
Definition at line 75 of file VuoPoint3d.h.
|
inlinestatic |
Returns a point using the first 3 elements in the specified array.
Definition at line 85 of file VuoPoint3d.h.
VuoPoint3d VuoPoint3d_makeFromJson | ( | json_object * | js | ) |
Decodes the JSON object js
to create a new value.
Definition at line 45 of file VuoPoint3d.c.
|
inlinestatic |
If any component of the value is zero or very close to zero, moves it further from zero (either 0.000001 or -0.000001).
Definition at line 237 of file VuoPoint3d.h.
|
inlinestatic |
Returns component-wise max.
Definition at line 225 of file VuoPoint3d.h.
VuoPoint3d VuoPoint3d_maxList | ( | VuoList_VuoPoint3d | values, |
VuoInteger * | outputPosition | ||
) |
Returns the maximum of a list of terms, or 0 if the array is empty.
Definition at line 202 of file VuoPoint3d.c.
|
inlinestatic |
Returns component-wise min.
Definition at line 213 of file VuoPoint3d.h.
VuoPoint3d VuoPoint3d_minList | ( | VuoList_VuoPoint3d | values, |
VuoInteger * | outputPosition | ||
) |
Returns the minimum of a list of terms, or 0 if the array is empty.
Definition at line 178 of file VuoPoint3d.c.
|
inlinestatic |
Returns the component-wise modulus of two VuoPoint3d vectors.
Behavior for negative values matches GLSL's mod
function.
Definition at line 284 of file VuoPoint3d.h.
|
inlinestatic |
a
* b
Definition at line 204 of file VuoPoint3d.h.
|
inlinestatic |
Returns the normalization of a
.
Definition at line 158 of file VuoPoint3d.h.
VuoPoint3d VuoPoint3d_random | ( | const VuoPoint3d | minimum, |
const VuoPoint3d | maximum | ||
) |
Returns a pseudorandom value where each component is between minimum
and maximum
.
Definition at line 245 of file VuoPoint3d.c.
VuoPoint3d VuoPoint3d_randomWithState | ( | unsigned short | state[3], |
const VuoPoint3d | minimum, | ||
const VuoPoint3d | maximum | ||
) |
Returns a pseudorandom value where each component is between minimum
and maximum
.
Definition at line 258 of file VuoPoint3d.c.
void VuoPoint3d_release | ( | VuoPoint3d | value | ) |
Automatically generated function.
void VuoPoint3d_retain | ( | VuoPoint3d | value | ) |
Automatically generated function.
|
inlinestatic |
Returns component-wise multiplication of two VuoPoint3d vectors.
Definition at line 270 of file VuoPoint3d.h.
|
inlinestatic |
Sets the first 3 elements in the specified array to the specified point.
Definition at line 95 of file VuoPoint3d.h.
|
inlinestatic |
Snap value a to the nearest increment of value snap.
Definition at line 350 of file VuoPoint3d.h.
|
inlinestatic |
Calculates a position along the path of an oscillating spring.
Definition at line 296 of file VuoPoint3d.h.
|
inlinestatic |
Returns the magnitude of the vector.
Definition at line 186 of file VuoPoint3d.h.
|
inlinestatic |
a
- b
.
Definition at line 176 of file VuoPoint3d.h.
VuoPoint4d VuoPoint4d_makeFromJson | ( | json_object * | js | ) |
Decodes the JSON object js
to create a new value.
Definition at line 46 of file VuoPoint4d.c.