#include <c4d_baseeffectordata.h>
Class for handling MoGraph motion data.
Public Member Functions | |
Bool | SetWithEx (const MoDataEx &md) |
void | Clear (Bool reset) |
Int | GetMemorySize (void) |
AutoLock & | GetAutoLock (void) |
Private Member Functions | |
MoData () | |
~MoData () | |
MoData & | operator= (const MoData &d) |
MoData * | operator= (MoData *d) |
Alloc/Free | |
static MoData * | Alloc (void) |
static void | Free (MoData *&d) |
Dirty | |
UInt32 | GetDirty (MDDIRTY mask=MDDIRTY::NONE) const |
void | SetDirty (MDDIRTY mask=MDDIRTY::NONE) |
Read/Write | |
Bool | Read (HyperFile *hf) |
Bool | Write (HyperFile *hf) |
Arrays Length & Number | |
Bool | SetCount (Int cnt) |
Int | GetCount (void) |
Int32 | GetArrayCount (void) |
Array Information | |
DescID | GetArrayDescID (Int32 index) const |
Int32 | GetArrayID (Int32 index) const |
Int32 | GetArrayIndexType (Int32 index) |
Int32 | GetArrayType (Int32 id) |
Int | GetArrayIndex (const DescID &id) |
Int | GetArrayIndex (Int32 id) |
Get/Set Data Container | |
BaseContainer * | GetDataInstance (const DescID &id) |
BaseContainer * | GetDataInstance (Int32 id=-1) |
BaseContainer * | GetDataIndexInstance (Int32 index) |
BaseContainer | GetData (Int32 id=-1) |
void | SetData (const BaseContainer &bc, Int32 id=-1) |
Add/Remove Array | |
Int32 | AddArray (const DescID &id, const maxon::String &name=maxon::String(), Int32 default_flags=0) |
Int32 | AddArray (Int32 id, Int32 type, const maxon::String &name=maxon::String(), Int32 default_flags=0) |
Bool | RemoveArray (const DescID &id) |
Bool | RemoveArray (Int32 id) |
Array Flags | |
Int32 | GetFlags (const DescID &id) |
Int32 | GetFlags (Int32 id) |
Int32 | GetIndexFlags (Int32 index) |
void | SetFlags (const DescID &id, Int32 flags) |
void | SetFlags (Int32 id, Int32 flags) |
void | SetIndexFlags (Int32 index, Int32 flags) |
void | SetFlag (const DescID &id, Int32 flag) |
void | SetFlag (Int32 id, Int32 flag) |
void | SetIndexFlag (Int32 index, Int32 flag) |
void | DelFlag (const DescID &id, Int32 flag) |
void | DelFlag (Int32 id, Int32 flag) |
void | DelIndexFlag (Int32 index, Int32 flag) |
Array name | |
void | SetName (const DescID &id, const maxon::String &name) |
void | SetName (Int32 id, const maxon::String &name) |
void | SetIndexName (Int32 index, const maxon::String &name) |
String | GetName (const DescID &id) |
String | GetName (Int32 id) |
String | GetIndexName (Int32 index) |
Get Array By DescID | |
void * | GetArray (const DescID &id) const |
MDArray< Char > | GetCharArray (const DescID &id, Char default_value=0) const |
MDArray< UChar > | GetUCharArray (const DescID &id, UChar default_value=0) const |
MDArray< Int32 > | GetLongArray (const DescID &id, Int32 default_value=0) const |
MDArray< UInt32 > | GetULongArray (const DescID &id, UInt32 default_value=0) const |
MDArray< Bool > | GetBoolArray (const DescID &id, Bool default_value=true) const |
MDArray< Int64 > | GetLLongArray (const DescID &id, Int64 default_value=0) const |
MDArray< Float > | GetRealArray (const DescID &id, Float default_value=1.0) const |
MDArray< Matrix > | GetMatrixArray (const DescID &id, Matrix default_value=Matrix()) const |
MDArray< Vector > | GetVectorArray (const DescID &id, Vector default_value=Vector()) const |
Get Array By ID | |
void * | GetArray (Int32 id, MD_TYPE type=MD_TYPE::MD_NONE) const |
MDArray< Char > | GetCharArray (Int32 id, Char default_value=0) const |
MDArray< UChar > | GetUCharArray (Int32 id, UChar default_value=0) const |
MDArray< Int32 > | GetLongArray (Int32 id, Int32 default_value=0) const |
MDArray< UInt32 > | GetULongArray (Int32 id, UInt32 default_value=0) const |
MDArray< Bool > | GetBoolArray (Int32 id, Bool default_value=true) const |
MDArray< Int64 > | GetLLongArray (Int32 id, Int64 default_value=0) const |
MDArray< Float > | GetRealArray (Int32 id, Float default_value=1.0) const |
MDArray< Matrix > | GetMatrixArray (Int32 id, Matrix default_value=Matrix()) const |
MDArray< Vector > | GetVectorArray (Int32 id, Vector default_value=Vector()) const |
Get Array By Index | |
void * | GetIndexArray (Int32 index) const |
MDArray< Char > | GetCharIndexArray (Int32 index) const |
MDArray< UChar > | GetUCharIndexArray (Int32 index) const |
MDArray< Int32 > | GetLongIndexArray (Int32 index) const |
MDArray< UInt32 > | GetULongIndexArray (Int32 index) const |
MDArray< Bool > | GetBoolIndexArray (Int32 index) const |
MDArray< Int64 > | GetLLongIndexArray (Int32 index) const |
MDArray< Float > | GetRealIndexArray (Int32 index) const |
MDArray< Matrix > | GetMatrixIndexArray (Int32 index) const |
MDArray< Vector > | GetVectorIndexArray (Int32 index) const |
Copy/Merge | |
Bool | CopyTo (MoData *dest, Bool merge_data=false, Int max_count=-1) |
Bool | MergeData (MoData *source, Float percent) |
Miscellaneous | |
void | Flush (void) |
void | SetOffset (Int offset=0) |
void | SetLimit (Int limit=-1) |
void | SetColorMode (Int32 colorMode) |
Int32 | GetColorMode () const |
|
private |
|
private |
|
static |
|
static |
UInt32 GetDirty | ( | MDDIRTY | mask = MDDIRTY::NONE | ) | const |
Gets the dirty count. Can be used to check if something has changed.
[in] | mask | The dirty flag mask. Can be a combination of: DIRTYFLAGS |
void SetDirty | ( | MDDIRTY | mask = MDDIRTY::NONE | ) |
Marks the data as dirty.
[in] | mask | The dirty flag mask. Can be a combination of: DIRTYFLAGS |
Bool SetWithEx | ( | const MoDataEx & | md | ) |
Initializes the data with MoDataEx.
[in] | md | The data to use for initializing. |
void Clear | ( | Bool | reset | ) |
Clears the data in the arrays.
[in] | reset | If true, the arrays will be filled with their default values. |
Reads the data from a hyper file.
[in] | hf | The hyper file to read from. The caller owns the pointed hyper file. |
Writes the data to a hyper file.
[in] | hf | The hyper file to write to. The caller owns the pointed hyper file. |
Int GetMemorySize | ( | void | ) |
Gets the size of the data in bytes.
Sets the length of the arrays.
[in] | cnt | The new length of the arrays. |
Int GetCount | ( | void | ) |
Gets the length of the arrays.
Int32 GetArrayCount | ( | void | ) |
Gets the number of arrays.
Gets the description ID for the specified array index.
[in] | index | The array index. 0 <= index < GetArrayCount() |
Gets the ID for the specified array index.
[in] | index | The array index. 0 <= index < GetArrayCount() |
Gets the data type of the specified array index.
[in] | index | The array index. 0 <= index < GetArrayCount() |
Gets the data type of the specified array id.
[in] | id | The array ID: MODATA_IDS |
Gets the array index for the specified description id.
[in] | id | The description ID. |
Gets the array index for the specified array id.
[in] | id | The array ID: MODATA_IDS |
BaseContainer* GetDataInstance | ( | const DescID & | id | ) |
Gets a pointer to the container for the specified array description id.
[in] | id | The description ID. |
BaseContainer* GetDataInstance | ( | Int32 | id = -1 | ) |
Gets a pointer to the container for the specified array id.
[in] | id | The array ID: MODATA_IDS |
BaseContainer* GetDataIndexInstance | ( | Int32 | index | ) |
Gets a pointer to the container for the specified array index.
[in] | index | The array index. 0 <= index < GetArrayCount() |
BaseContainer GetData | ( | Int32 | id = -1 | ) |
Gets a copy of the container for the specified array id.
[in] | id | The array ID: MODATA_IDS |
void SetData | ( | const BaseContainer & | bc, |
Int32 | id = -1 |
||
) |
Sets the the container for the specified array id.
[in] | bc | The container to set. |
[in] | id | The array ID: MODATA_IDS |
AutoLock& GetAutoLock | ( | void | ) |
Must be used to lock the class with AutoLocker prior to accessing the MoData values directly to prevent threading issues and therefore crashes.
Int32 AddArray | ( | const DescID & | id, |
const maxon::String & | name = maxon::String() , |
||
Int32 | default_flags = 0 |
||
) |
Int32 AddArray | ( | Int32 | id, |
Int32 | type, | ||
const maxon::String & | name = maxon::String() , |
||
Int32 | default_flags = 0 |
||
) |
Adds the specified array.
[in] | id | The array ID: MODATA_IDS |
[in] | type | The type: DTYPE |
[in] | name | The name of the array. |
[in] | default_flags | The default flags: MOGENFLAG |
Removes the specified array.
[in] | id | The description ID of the array. |
Removes the specified array.
[in] | id | The array ID: MODATA_IDS |
void SetName | ( | const DescID & | id, |
const maxon::String & | name | ||
) |
Sets the name for the specified array description id.
[in] | id | The description ID of the array. |
[in] | name | The name of the array to set. |
void SetName | ( | Int32 | id, |
const maxon::String & | name | ||
) |
Sets the name for the specified array id.
[in] | id | The array ID: MODATA_IDS |
[in] | name | The name of the array to set. |
void SetIndexName | ( | Int32 | index, |
const maxon::String & | name | ||
) |
Sets the name for the specified array index.
[in] | index | The array index. 0 <= index < GetArrayCount() |
[in] | name | The name of the array to set. |
Gets the name of the specified array description id.
[in] | id | The description ID of the array. |
Gets the name of the specified array id.
[in] | id | The array ID: MODATA_IDS |
Gets the name of the specified array index.
[in] | index | The array index. 0 <= index < GetArrayCount() |
void* GetArray | ( | const DescID & | id | ) | const |
Gets a void pointer to an array.
[in] | id | The description ID of the array. |
Gets a Char array.
[in] | id | The description ID of the array. |
[in] | default_value | The default value of the array. |
Gets a UChar array.
[in] | id | The description ID of the array. |
[in] | default_value | The default value of the array. |
Gets an Int32/Long
array.
[in] | id | The description ID of the array. |
[in] | default_value | The default value of the array. |
Gets a UInt32/ULong
array.
[in] | id | The description ID of the array. |
[in] | default_value | The default value of the array. |
Gets a Bool array.
[in] | id | The description ID of the array. |
[in] | default_value | The default value of the array. |
Gets an Int64/LLong
array.
[in] | id | The description ID of the array. |
[in] | default_value | The default value of the array. |
Gets a Float/Real array.
[in] | id | The description ID of the array. |
[in] | default_value | The default value of the array. |
Gets a Matrix array.
[in] | id | The description ID of the array. |
[in] | default_value | The default value of the array. |
Gets a Vector array.
[in] | id | The description ID of the array. |
[in] | default_value | The default value of the array. |
void* GetArray | ( | Int32 | id, |
MD_TYPE | type = MD_TYPE::MD_NONE |
||
) | const |
Gets a void pointer to an array.
[in] | id | The ID of the array: MODATA_IDS |
[in] | type | The type of the array: MD_TYPE |
Gets a Char array.
[in] | id | The ID of the array: MODATA_IDS |
[in] | default_value | The default value of the array. |
Gets a UChar array.
[in] | id | The ID of the array: MODATA_IDS |
[in] | default_value | The default value of the array. |
Gets an Int32/Long array.
[in] | id | The ID of the array: MODATA_IDS |
[in] | default_value | The default value of the array. |
Gets a UInt32/ULong array.
[in] | id | The ID of the array: MODATA_IDS |
[in] | default_value | The default value of the array. |
Gets a Bool array.
[in] | id | The ID of the array: MODATA_IDS |
[in] | default_value | The default value of the array. |
Gets a Int64/LLong array.
[in] | id | The ID of the array: MODATA_IDS |
[in] | default_value | The default value of the array. |
Gets a Float/Real array.
[in] | id | The ID of the array: MODATA_IDS |
[in] | default_value | The default value of the array. |
Gets a Matrix array.
[in] | id | The ID of the array: MODATA_IDS |
[in] | default_value | The default value of the array. |
Gets a Vector array.
[in] | id | The ID of the array: MODATA_IDS |
[in] | default_value | The default value of the array. |
void* GetIndexArray | ( | Int32 | index | ) | const |
Gets a void pointer to an array.
[in] | index | The index of the array: 0 <= index < GetArrayCount() |
Gets a Char array.
[in] | index | The index of the array: 0 <= index < GetArrayCount() |
Gets a UChar array.
[in] | index | The index of the array: 0 <= index < GetArrayCount() |
Gets an Int32/Long array.
[in] | index | The index of the array: 0 <= index < GetArrayCount() |
Gets a UInt32/ULong array.
[in] | index | The index of the array: 0 <= index < GetArrayCount() |
Gets a Bool array.
[in] | index | The index of the array: 0 <= index < GetArrayCount() |
Gets a Int64/LLong array.
[in] | index | The index of the array: 0 <= index < GetArrayCount() |
Gets a Float/Real array.
[in] | index | The index of the array: 0 <= index < GetArrayCount() |
Gets a Matrix array.
[in] | index | The index of the array: 0 <= index < GetArrayCount() |
Gets a Vector array.
[in] | index | The index of the array: 0 <= index < GetArrayCount() |
Copies the MoGraph data to dest.
[in] | dest | The destination MoGraph data. The caller owns the pointed data. |
[in] | merge_data | If true the source and destination data are merged. If false a straight one-to-one copy is made. For instance if the source contains a matrix array and the destination a matrix and a real array the real array will still exist after the merge action. |
[in] | max_count | The maximum number of array elements to copy. This limits the array size of the copy. |
Merges the MoGraph data with another.
[in] | source | The source MoGraph data. The caller owns the pointed data. |
[in] | percent | The blend factor for the merge of the data, going from 0.0 to 1.0 (0 to 100%). |
void Flush | ( | void | ) |
Flushes the MoGraph data.
All data is cleared and the arrays are freed.
void SetOffset | ( | Int | offset = 0 | ) |
Sets an offset from the beginning of the arrays, for example array[0] becomes array[offset].
[in] | offset | The array offset: 0 <= offset < GetCount() |
void SetLimit | ( | Int | limit = -1 | ) |
Sets a limit for the array. All data is kept internally. Can be useful for certain cases for instance merging.
[in] | limit | The array limit: 0 <= limit < GetCount() |
void SetColorMode | ( | Int32 | colorMode | ) |
Sets the color mode.
[in] | colorMode | The new color mode. |
Int32 GetColorMode | ( | ) | const |
Gets the color mode.