4 #ifndef _LUMIVERSETYPEUTILS_H_
5 #define _LUMIVERSETYPEUTILS_H_
25 namespace LumiverseTypeUtils {
32 LumiverseType*
copy(LumiverseType* data);
40 void copyByVal(LumiverseType* source, LumiverseType* target);
49 bool equals(LumiverseType* lhs, LumiverseType* rhs);
59 int cmp(LumiverseType* lhs, LumiverseType* rhs);
67 shared_ptr<LumiverseType>
lerp(LumiverseType* lhs, LumiverseType* rhs,
float t);
74 bool areSameType(LumiverseType* lhs, LumiverseType* rhs);
79 Eigen::Matrix3f
getRotationMatrix(Eigen::Vector3f lookat, Eigen::Vector3f up, LumiverseOrientation pan, LumiverseOrientation tilt);
92 bool lessThan(LumiverseType* lhs, LumiverseType* rhs);
100 void scaleParam(LumiverseType* val,
float scale);
105 LumiverseOrientation& typeToOrientationRef(LumiverseType* data);
106 LumiverseColor& typeToColorRef(LumiverseType* data);
107 LumiverseFloat& typeToFloatRef(LumiverseType* data);
LumiverseType * loadFromJSON(JSONNode node)
Loads a LumiverseType from a JSON node.
Definition: LumiverseTypeUtils.cpp:219
void scaleParam(LumiverseType *val, float scale)
Multiplies a parameter by a constant value (typically from 0 to 1, but no limits are enforced in this...
Definition: LumiverseTypeUtils.cpp:201
LumiverseType * copy(LumiverseType *data)
Copies a LumiverseType and returns an abstracted pointer to the new value.
Definition: LumiverseTypeUtils.cpp:6
bool equals(LumiverseType *lhs, LumiverseType *rhs)
Compares two generic LumiverseType pointers for equality.
Definition: LumiverseTypeUtils.cpp:43
shared_ptr< LumiverseType > lerp(LumiverseType *lhs, LumiverseType *rhs, float t)
Lerps the values of a LumiverseType and returns the value.
Definition: LumiverseTypeUtils.cpp:98
bool areSameType(LumiverseType *lhs, LumiverseType *rhs)
Checks the types of two LumiverseType objects.
Definition: LumiverseTypeUtils.cpp:131
Stores an enumeration in Lumiverse.
Eigen::Matrix3f getRotationMatrix(Eigen::Vector3f lookat, Eigen::Vector3f up, LumiverseOrientation pan, LumiverseOrientation tilt)
Returns a rotation matrix given the up vector, look at vector, the pan, and tilt. ...
Definition: LumiverseTypeUtils.cpp:140
Stores a floating point value in Lumiverse.
int cmp(LumiverseType *lhs, LumiverseType *rhs)
Compares two LumiverseType objects.
Definition: LumiverseTypeUtils.cpp:60
Stores a orientation value in Lumiverse.
A LumiverseColor contains information about a Device Color parameter.
Contains all core Lumiverse functions and variables.
Definition: Device.cpp:2
bool lessThan(LumiverseType *lhs, LumiverseType *rhs)
Compares two LumiverseTypes with <.
Definition: LumiverseTypeUtils.cpp:193
void copyByVal(LumiverseType *source, LumiverseType *target)
Copies the data from source into target.
Definition: LumiverseTypeUtils.cpp:22