Vuo  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
VuoPoint2d.h File Reference

Description

VuoPoint2d C type definition.

Classes

struct  VuoPoint2d
 A floating-point 2-dimensional Cartesian spatial location. More...
 
struct  VuoRectangle
 A rectangular area. More...
 

Functions

VuoPoint2d VuoPoint2d_makeFromJson (json_object *js)
 Decodes the JSON object js to create a new value.
 
json_objectVuoPoint2d_getJson (const VuoPoint2d value)
 Encodes value as a JSON object.
 
char * VuoPoint2d_getSummary (const VuoPoint2d value)
 Returns a compact string representation of value (comma-separated coordinates).
 
bool VuoPoint2d_areEqual (const VuoPoint2d value1, const VuoPoint2d value2)
 Returns true if the two points are equal (within tolerance).
 
VuoPoint2d VuoPoint2d_random (const VuoPoint2d minimum, const VuoPoint2d maximum)
 Returns a pseudorandom value where each component is between minimum and maximum.
 
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.
 
static VuoPoint2d VuoPoint2d_make (float x, float y) __attribute__((const ))
 Returns a point with the specified coordinates.
 
static VuoRectangle VuoRectangle_make (float centerX, float centerY, float width, float height) __attribute__((const ))
 Returns a rectangle with the specified coordinates.
 
static bool VuoRectangle_areEqual (const VuoRectangle a, const VuoRectangle b)
 Returns true if the rectangles have the same position and size.
 
static VuoRectangle VuoRectangle_makeTopLeft (float leftX, float topY, float width, float height) __attribute__((const ))
 Returns a rectangle with the specified coordinates.
 
static VuoPoint2d VuoPoint2d_add (VuoPoint2d a, VuoPoint2d b) __attribute__((const ))
 a + b.
 
static VuoPoint2d VuoPoint2d_subtract (VuoPoint2d a, VuoPoint2d b) __attribute__((const ))
 a - b.
 
static float VuoPoint2d_squaredMagnitude (VuoPoint2d a) __attribute__((const ))
 Returns the squared magnitude of the vector.
 
static VuoPoint2d VuoPoint2d_divide (VuoPoint2d a, VuoPoint2d b) __attribute__((const ))
 Component-wise division.
 
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).
 
static float VuoPoint2d_magnitude (VuoPoint2d a) __attribute__((const ))
 Returns the magnitude of the vector.
 
static VuoPoint2d VuoPoint2d_normalize (VuoPoint2d a) __attribute__((const ))
 Returns the normalization of a.
 
static VuoPoint2d VuoPoint2d_multiply (VuoPoint2d a, float b) __attribute__((const ))
 a * b
 
static float VuoPoint2d_dotProduct (VuoPoint2d u, VuoPoint2d v) __attribute__((const ))
 Returns the dot product of u, v.
 
static float VuoPoint2d_distance (VuoPoint2d a, VuoPoint2d b) __attribute__((const ))
 Distance between a and b.
 
static VuoPoint2d VuoPoint2d_lerp (VuoPoint2d a, VuoPoint2d b, float t) __attribute__((const ))
 Returns a linearly interpolated value between a and b using time t.
 
static VuoPoint2d VuoPoint2d_scale (VuoPoint2d a, VuoPoint2d b) __attribute__((const ))
 Returns component-wise multiplication of two VuoPoint2d vectors.
 
VuoRectangle VuoPoint2d_rectangleIntersection (VuoRectangle rectangleA, VuoRectangle rectangleB)
 Returns the intersecting area of rectangleA and rectangleB.
 
VuoRectangle VuoPoint2d_rectangleUnion (VuoRectangle rectangleA, VuoRectangle rectangleB)
 Returns the union area of rectangleA and rectangleB.
 
static VuoPoint2d VuoPoint2d_spring (VuoReal timeSinceDrop, VuoPoint2d dropPosition, VuoPoint2d restingPosition, VuoReal period, VuoReal damping)
 Calculates a position along the path of an oscillating spring.
 
static VuoPoint2d VuoPoint2d_clamp (VuoPoint2d point, VuoReal limitA, VuoReal limitB)
 Limits point to values between limitA and limitB, inclusive.
 
static VuoPoint2d VuoPoint2d_clampn (VuoPoint2d point, VuoPoint2d limitA, VuoPoint2d limitB)
 Limits point to values between limitA and limitB, inclusive.
 
static VuoPoint2d VuoPoint2d_bezier3 (VuoPoint2d p0, VuoPoint2d p1, VuoPoint2d p2, VuoPoint2d p3, VuoReal time)
 Calculates a position along a cubic bezier curve.
 
static VuoPoint2d VuoPoint2d_snap (VuoPoint2d a, VuoPoint2d center, VuoPoint2d snap)
 Snap value a to the nearest increment of value snap.
 
VuoPoint2d VuoPoint2d_makeFromString (const char *str)
 Automatically generated function.
 
char * VuoPoint2d_getString (const VuoPoint2d value)
 Automatically generated function.
 
void VuoPoint2d_retain (VuoPoint2d value)
 Automatically generated function.
 
void VuoPoint2d_release (VuoPoint2d value)
 Automatically generated function.