Vuo  2.3.2
Classes | Macros | Functions
VuoPoint4d

Description

A floating-point 4-dimensional point.

Classes

struct  VuoList_VuoPoint4d_struct
 List type. More...
 

Functions

json_objectVuoPoint4d_getJson (const VuoPoint4d value)
 Encodes value as a JSON object. More...
 
char * VuoPoint4d_getSummary (const VuoPoint4d value)
 Returns a compact string representation of value (comma-separated coordinates). More...
 
VuoPoint4d VuoPoint4d_makeFromJson (struct json_object *js)
 Decodes the JSON object js to create a new value. More...
 
bool VuoPoint4d_areEqual (const VuoPoint4d value1, const VuoPoint4d value2)
 Returns true if the two points are equal (within tolerance). More...
 
bool VuoPoint4d_areEqualListWithinTolerance (VuoList_VuoPoint4d values, VuoPoint4d tolerance)
 Returns true if the two values are equal within component-wise tolerance. More...
 
bool VuoPoint4d_isLessThan (const VuoPoint4d a, const VuoPoint4d b)
 Compares a to b primarily by x-value, secondarily by y-value, tertiarily by z-value, and finally by w-value, returning true if a is less than b. More...
 
bool VuoPoint4d_isWithinRange (VuoPoint4d value, VuoPoint4d minimum, VuoPoint4d maximum)
 Returns true if each component of value is between minimum and maximum. More...
 
VuoPoint4d VuoPoint4d_minList (VuoList_VuoPoint4d values, VuoInteger *outputPosition)
 Returns the minimum of a list of terms, or 0 if the array is empty. More...
 
VuoPoint4d VuoPoint4d_maxList (VuoList_VuoPoint4d values, VuoInteger *outputPosition)
 Returns the maximum of a list of terms, or 0 if the array is empty. More...
 
VuoPoint4d VuoPoint4d_average (VuoList_VuoPoint4d values)
 Returns the average of the values in the list, or 0 if the list is empty. More...
 
VuoPoint4d VuoPoint4d_random (const VuoPoint4d minimum, const VuoPoint4d maximum)
 Returns a pseudorandom value where each component is between minimum and maximum. More...
 
VuoPoint4d VuoPoint4d_randomWithState (unsigned short state[3], const VuoPoint4d minimum, const VuoPoint4d maximum)
 Returns a pseudorandom value where each component is between minimum and maximum. More...
 
static VuoPoint4d VuoPoint4d_make (float x, float y, float z, float w) __attribute__((const))
 Returns a VuoPoint4d with the specified coordinates. More...
 
static VuoPoint4d VuoPoint4d_makeFromArray (float *f)
 Returns a point using the first 4 elements in the specified array. More...
 
static void VuoPoint4d_setArray (float *f, VuoPoint4d p)
 Sets the first 4 elements in the specified array to the specified point. More...
 
static VuoPoint3d VuoPoint4d_to3d (VuoPoint4d p) __attribute__((const))
 Discards the w coordinate. More...
 
static VuoPoint4d VuoPoint3d_to4d1 (VuoPoint3d p) __attribute__((const))
 Appends w coordinate with value 1. More...
 
static VuoPoint4d VuoPoint4d_crossProduct (VuoPoint4d u, VuoPoint4d v) __attribute__((const))
 Returns the 3D cross-product of u and v (ignoring the w coordinate). More...
 
static float VuoPoint4d_dotProduct (VuoPoint4d u, VuoPoint4d v) __attribute__((const))
 Returns the dot product of u, v. More...
 
static float VuoPoint4d_magnitude (VuoPoint4d a) __attribute__((const))
 Returns the magnitude of the vector. More...
 
static VuoPoint4d VuoPoint4d_normalize3d (VuoPoint4d a) __attribute__((const))
 Returns the 3D normalization of a (ignoring the w coordinate). More...
 
static VuoPoint4d VuoPoint4d_normalize (VuoPoint4d a) __attribute__((const))
 Returns the 4D normalization of a. More...
 
static VuoPoint4d VuoPoint4d_add (VuoPoint4d a, VuoPoint4d b) __attribute__((const))
 a + b. More...
 
static VuoPoint4d VuoPoint4d_subtract (VuoPoint4d a, VuoPoint4d b) __attribute__((const))
 a - b. More...
 
static float VuoPoint4d_squaredMagnitude (VuoPoint4d a) __attribute__((const))
 Returns the magnitude of the vector. More...
 
static VuoPoint4d VuoPoint4d_divide (VuoPoint4d a, VuoPoint4d b) __attribute__((const))
 Component-wise division. More...
 
static VuoPoint4d VuoPoint4d_multiply (VuoPoint4d a, float b) __attribute__((const))
 a * b More...
 
static VuoPoint4d VuoPoint4d_scale (VuoPoint4d a, VuoPoint4d b) __attribute__((const))
 Returns component-wise multiplication of two VuoPoint4d vectors. More...
 
static VuoPoint4d VuoPoint4d_makeNonzero (VuoPoint4d 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 VuoPoint4d_distance (VuoPoint4d a, VuoPoint4d b) __attribute__((const))
 Distance between a and b. More...
 
static VuoPoint4d VuoPoint4d_min (const VuoPoint4d l, const VuoPoint4d r) __attribute__((const))
 Returns component-wise min. More...
 
static VuoPoint4d VuoPoint4d_max (const VuoPoint4d l, const VuoPoint4d r) __attribute__((const))
 Returns component-wise max. More...
 
static VuoPoint4d VuoPoint4d_snap (VuoPoint4d a, VuoPoint4d center, VuoPoint4d snap) __attribute__((const))
 Returns a component-wise snap value using a center point and snap value. More...
 
static VuoPoint4d VuoPoint4d_clampn (VuoPoint4d point, VuoPoint4d limitA, VuoPoint4d limitB)
 Limits point to values between limitA and limitB, inclusive. More...
 
typedef const struct VuoList_VuoPoint4d_structVuoList_VuoPoint4d
 List type. More...
 
#define VuoList_VuoPoint4d_TYPE_DEFINED
 List type. More...
 
VuoPoint4d VuoPoint4d_makeFromString (const char *str)
 Automatically generated function. More...
 
char * VuoPoint4d_getString (const VuoPoint4d value)
 Automatically generated function. More...
 
void VuoPoint4d_retain (VuoPoint4d value)
 Automatically generated function. More...
 
void VuoPoint4d_release (VuoPoint4d value)
 Automatically generated function. More...
 

Class Documentation

◆ VuoList_VuoPoint4d_struct

struct VuoList_VuoPoint4d_struct
Class Members
void * l

Macro Definition Documentation

◆ VuoList_VuoPoint4d_TYPE_DEFINED

#define VuoList_VuoPoint4d_TYPE_DEFINED

List type.

Definition at line 35 of file VuoPoint4d.h.

Typedef Documentation

◆ VuoList_VuoPoint4d

List type.

Function Documentation

◆ VuoPoint3d_to4d1()

static VuoPoint4d VuoPoint3d_to4d1 ( VuoPoint3d  p) const
inlinestatic

Appends w coordinate with value 1.

Changed in Vuo 2.0.0:
New.

Definition at line 114 of file VuoPoint4d.h.

◆ VuoPoint4d_add()

static VuoPoint4d VuoPoint4d_add ( VuoPoint4d  a,
VuoPoint4d  b 
) const
inlinestatic

a + b.

Definition at line 175 of file VuoPoint4d.h.

◆ VuoPoint4d_areEqual()

bool VuoPoint4d_areEqual ( const VuoPoint4d  value1,
const VuoPoint4d  value2 
)

Returns true if the two points are equal (within tolerance).

Definition at line 130 of file VuoPoint4d.c.

◆ VuoPoint4d_areEqualListWithinTolerance()

bool VuoPoint4d_areEqualListWithinTolerance ( VuoList_VuoPoint4d  values,
VuoPoint4d  tolerance 
)

Returns true if the two values are equal within component-wise tolerance.

Definition at line 141 of file VuoPoint4d.c.

◆ VuoPoint4d_average()

VuoPoint4d VuoPoint4d_average ( VuoList_VuoPoint4d  values)

Returns the average of the values in the list, or 0 if the list is empty.

Definition at line 240 of file VuoPoint4d.c.

◆ VuoPoint4d_clampn()

static VuoPoint4d VuoPoint4d_clampn ( VuoPoint4d  point,
VuoPoint4d  limitA,
VuoPoint4d  limitB 
)
inlinestatic

Limits point to values between limitA and limitB, inclusive.

Definition at line 297 of file VuoPoint4d.h.

◆ VuoPoint4d_crossProduct()

static VuoPoint4d VuoPoint4d_crossProduct ( VuoPoint4d  u,
VuoPoint4d  v 
) const
inlinestatic

Returns the 3D cross-product of u and v (ignoring the w coordinate).

Definition at line 123 of file VuoPoint4d.h.

◆ VuoPoint4d_distance()

static float VuoPoint4d_distance ( VuoPoint4d  a,
VuoPoint4d  b 
) const
inlinestatic

Distance between a and b.

Definition at line 247 of file VuoPoint4d.h.

◆ VuoPoint4d_divide()

static VuoPoint4d VuoPoint4d_divide ( VuoPoint4d  a,
VuoPoint4d  b 
) const
inlinestatic

Component-wise division.

Definition at line 203 of file VuoPoint4d.h.

◆ VuoPoint4d_dotProduct()

static float VuoPoint4d_dotProduct ( VuoPoint4d  u,
VuoPoint4d  v 
) const
inlinestatic

Returns the dot product of u, v.

Definition at line 137 of file VuoPoint4d.h.

◆ VuoPoint4d_getJson()

struct json_object * VuoPoint4d_getJson ( const VuoPoint4d  value)

Encodes value as a JSON object.

Definition at line 99 of file VuoPoint4d.c.

◆ VuoPoint4d_getString()

char* VuoPoint4d_getString ( const VuoPoint4d  value)

Automatically generated function.

◆ VuoPoint4d_getSummary()

char * VuoPoint4d_getSummary ( const VuoPoint4d  value)

Returns a compact string representation of value (comma-separated coordinates).

Definition at line 122 of file VuoPoint4d.c.

◆ VuoPoint4d_isLessThan()

bool VuoPoint4d_isLessThan ( const VuoPoint4d  a,
const VuoPoint4d  b 
)

Compares a to b primarily by x-value, secondarily by y-value, tertiarily by z-value, and finally by w-value, returning true if a is less than b.

Changed in Vuo 2.0.0:
New.

Definition at line 169 of file VuoPoint4d.c.

◆ VuoPoint4d_isWithinRange()

bool VuoPoint4d_isWithinRange ( VuoPoint4d  value,
VuoPoint4d  minimum,
VuoPoint4d  maximum 
)

Returns true if each component of value is between minimum and maximum.

Definition at line 181 of file VuoPoint4d.c.

◆ VuoPoint4d_magnitude()

static float VuoPoint4d_magnitude ( VuoPoint4d  a) const
inlinestatic

Returns the magnitude of the vector.

Definition at line 147 of file VuoPoint4d.h.

◆ VuoPoint4d_make()

static VuoPoint4d VuoPoint4d_make ( float  x,
float  y,
float  z,
float  w 
) const
inlinestatic

Returns a VuoPoint4d with the specified coordinates.

Definition at line 69 of file VuoPoint4d.h.

◆ VuoPoint4d_makeFromArray()

static VuoPoint4d VuoPoint4d_makeFromArray ( float *  f)
inlinestatic

Returns a point using the first 4 elements in the specified array.

Changed in Vuo 2.0.0:
New.

Definition at line 79 of file VuoPoint4d.h.

◆ VuoPoint4d_makeFromJson()

VuoPoint4d VuoPoint4d_makeFromJson ( json_object js)

Decodes the JSON object js to create a new value.

Example:
{
"x" : 0.5,
"y" : 1,
"z" : 0,
"w" : 0
}

Definition at line 44 of file VuoPoint4d.c.

◆ VuoPoint4d_makeFromString()

VuoPoint4d VuoPoint4d_makeFromString ( const char *  str)

Automatically generated function.

◆ VuoPoint4d_makeNonzero()

static VuoPoint4d VuoPoint4d_makeNonzero ( VuoPoint4d  a) const
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 230 of file VuoPoint4d.h.

◆ VuoPoint4d_max()

static VuoPoint4d VuoPoint4d_max ( const VuoPoint4d  l,
const VuoPoint4d  r 
) const
inlinestatic

Returns component-wise max.

Definition at line 269 of file VuoPoint4d.h.

◆ VuoPoint4d_maxList()

VuoPoint4d VuoPoint4d_maxList ( VuoList_VuoPoint4d  values,
VuoInteger outputPosition 
)

Returns the maximum of a list of terms, or 0 if the array is empty.

Definition at line 216 of file VuoPoint4d.c.

◆ VuoPoint4d_min()

static VuoPoint4d VuoPoint4d_min ( const VuoPoint4d  l,
const VuoPoint4d  r 
) const
inlinestatic

Returns component-wise min.

Definition at line 256 of file VuoPoint4d.h.

◆ VuoPoint4d_minList()

VuoPoint4d VuoPoint4d_minList ( VuoList_VuoPoint4d  values,
VuoInteger outputPosition 
)

Returns the minimum of a list of terms, or 0 if the array is empty.

Definition at line 192 of file VuoPoint4d.c.

◆ VuoPoint4d_multiply()

static VuoPoint4d VuoPoint4d_multiply ( VuoPoint4d  a,
float  b 
) const
inlinestatic

a * b

Definition at line 212 of file VuoPoint4d.h.

◆ VuoPoint4d_normalize()

static VuoPoint4d VuoPoint4d_normalize ( VuoPoint4d  a) const
inlinestatic

Returns the 4D normalization of a.

Definition at line 166 of file VuoPoint4d.h.

◆ VuoPoint4d_normalize3d()

static VuoPoint4d VuoPoint4d_normalize3d ( VuoPoint4d  a) const
inlinestatic

Returns the 3D normalization of a (ignoring the w coordinate).

Definition at line 156 of file VuoPoint4d.h.

◆ VuoPoint4d_random()

VuoPoint4d VuoPoint4d_random ( const VuoPoint4d  minimum,
const VuoPoint4d  maximum 
)

Returns a pseudorandom value where each component is between minimum and maximum.

See also
VuoInteger_randomWithState

Definition at line 259 of file VuoPoint4d.c.

◆ VuoPoint4d_randomWithState()

VuoPoint4d VuoPoint4d_randomWithState ( unsigned short  state[3],
const VuoPoint4d  minimum,
const VuoPoint4d  maximum 
)

Returns a pseudorandom value where each component is between minimum and maximum.

See also
VuoInteger_randomWithState

Definition at line 273 of file VuoPoint4d.c.

◆ VuoPoint4d_release()

void VuoPoint4d_release ( VuoPoint4d  value)

Automatically generated function.

◆ VuoPoint4d_retain()

void VuoPoint4d_retain ( VuoPoint4d  value)

Automatically generated function.

◆ VuoPoint4d_scale()

static VuoPoint4d VuoPoint4d_scale ( VuoPoint4d  a,
VuoPoint4d  b 
) const
inlinestatic

Returns component-wise multiplication of two VuoPoint4d vectors.

Definition at line 221 of file VuoPoint4d.h.

◆ VuoPoint4d_setArray()

static void VuoPoint4d_setArray ( float *  f,
VuoPoint4d  p 
)
inlinestatic

Sets the first 4 elements in the specified array to the specified point.

Changed in Vuo 2.0.0:
New.

Definition at line 89 of file VuoPoint4d.h.

◆ VuoPoint4d_snap()

static VuoPoint4d VuoPoint4d_snap ( VuoPoint4d  a,
VuoPoint4d  center,
VuoPoint4d  snap 
) const
inlinestatic

Returns a component-wise snap value using a center point and snap value.

Definition at line 282 of file VuoPoint4d.h.

◆ VuoPoint4d_squaredMagnitude()

static float VuoPoint4d_squaredMagnitude ( VuoPoint4d  a) const
inlinestatic

Returns the magnitude of the vector.

Definition at line 193 of file VuoPoint4d.h.

◆ VuoPoint4d_subtract()

static VuoPoint4d VuoPoint4d_subtract ( VuoPoint4d  a,
VuoPoint4d  b 
) const
inlinestatic

a - b.

Definition at line 184 of file VuoPoint4d.h.

◆ VuoPoint4d_to3d()

static VuoPoint3d VuoPoint4d_to3d ( VuoPoint4d  p) const
inlinestatic

Discards the w coordinate.

Changed in Vuo 2.0.0:
New.

Definition at line 103 of file VuoPoint4d.h.