23 FieldType_Float_Float,
25 FieldType_Float_Float_Float,
45 FieldType_Float_Float_Float_Float,
49 FieldType_Double_Double,
51 FieldType_Double_Double_Double,
56 FieldType_AnimatedInt,
57 FieldType_AnimatedFloat,
58 FieldType_AnimatedDouble,
59 FieldType_AnimatedVector2,
60 FieldType_AnimatedVector3,
61 FieldType_AnimatedDVector3,
62 FieldType_AnimatedVector4,
63 FieldType_AnimatedQuaternion,
66 FieldType_void_pointer,
67 FieldType_Deprecated = 0xffffffff
78 CVariable(DWORD dwType = FieldType_unknown);
88 const char* GetTypeName()
const;
92 bool IsStringType()
const;
108 void operator = (
double value);
111 void operator = (
float value);
115 void operator = (
int value);
118 void operator = (
const Vector3& value);
124 void operator = (
bool value);
126 operator const string& ();
127 operator const char* ();
128 bool operator == (
const string& value);
129 bool operator == (
const char* value);
130 void operator = (
const std::string& value);
131 void operator = (
const char* value);
143 int AddKey(
int nTime,
bool* isKeyExist = NULL);
149 void SetTime(
int nIndex,
int nTime);
150 int GetTime(
int nIndex);
152 void SetValue(
int nIndex,
const Quaternion& val);
157 void SetValue(
int nIndex,
const Vector3& val);
158 bool GetValue(
int nIndex,
Vector3& val);
161 void SetValue(
int nIndex,
double val);
162 bool GetValue(
int nIndex,
double& val);
165 void SetValue(
int nIndex,
float val);
166 bool GetValue(
int nIndex,
float& val);
169 void SetValue(
int nIndex,
const std::string& val);
170 bool GetValue(
int nIndex, std::string& val);
189 std::string m_strVal;
int GetNextKeyIndex(int nTime)
return the index of the first key whose time is larger than or equal to time.
Definition: Variable.cpp:507
int AddKey(int nTime, bool *isKeyExist=NULL)
add a given key with default value at specified time if there is already a key at the index...
Definition: Variable.cpp:407
static const char * GetTypeAsString(DWORD dwType)
Get Type as string.
Definition: Variable.cpp:94
bool GetValueByTime(int nTime, Quaternion &val)
get interpolated value at the given time.
Definition: Variable.cpp:444
different physics engine has different winding order.
Definition: EventBinding.h:32
represent any kind of static or animated variable, such as: string, double, float, int, bool, Vector3, Quaternion, or animated data with multiple time, value keys.
Definition: Variable.h:75
Implementation of a Quaternion, i.e.
Definition: ParaQuaternion.h:10
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
base class for AnimatedVariable.
Definition: IAnimated.h:18
Definition: enum_maker.hpp:46
void Clone(const CVariable &value)
clone from given variable
Definition: Variable.cpp:32
void ChangeType(ATTRIBUTE_FIELDTYPE newType)
change type to given type
Definition: Variable.cpp:59
int GetNumKeys()
get total number of animated keys.
Definition: Variable.cpp:396
bool IsAnimated()
whether the key is animated or not
Definition: Variable.cpp:54
void SetNumKeys(int nKeyCount)
get set the total number of animated keys.
Definition: Variable.cpp:401
ATTRIBUTE_FIELDTYPE
a list of all attribute type this is also used for all variable type supported.
Definition: Variable.h:10
void SetTime(int nIndex, int nTime)
only applied to Animated attribute
Definition: Variable.cpp:412
void ToNPLString(std::string &output)
In case of nil, it is "nil", in case of string, it is in quotation mark.
Definition: Variable.cpp:351