|
Isle
|
[AI] Holds per-node animation data for a model's animation tree. More...
#include <legoanim.h>


Public Member Functions | |
| LegoAnimNodeData () | |
| [AI] Default-initializes all animation key counts to zero and pointers to NULL. [AI] More... | |
| ~LegoAnimNodeData () override | |
| [AI] Cleans up all allocated animation key arrays and the node name. [AI] More... | |
| LegoResult | Read (LegoStorage *p_storage) override |
| [AI] Reads all node keyframe arrays, name, and meta from storage. More... | |
| LegoResult | Write (LegoStorage *p_storage) override |
| [AI] Writes all node keyframe arrays, name, and meta to storage. More... | |
| void | SetName (LegoChar *p_name) |
| [AI] Sets the node's name (deep-copies string). More... | |
| LegoResult | CreateLocalTransform (LegoFloat p_time, Matrix4 &p_matrix) |
| [AI] Computes the interpolated local transformation matrix for this node at the given animation time. More... | |
| LegoBool | FUN_100a0990 (LegoFloat p_time) |
| [AI] Evaluates morph keys at the given animation time and returns result (typically affects mesh shape or blend shape state). More... | |
| LegoChar * | GetName () |
| [AI] Name of this animation node (used for lookup/mapping to scene graph). More... | |
| LegoU16 | GetNumTranslationKeys () |
| [AI] Number of translation keys for this node. More... | |
| LegoU16 | GetNumRotationKeys () |
| [AI] Number of rotation keys for this node. More... | |
| void | SetNumRotationKeys (LegoU16 p_numRotationKeys) |
| [AI] Sets the number of rotation keys for this node. More... | |
| void | SetRotationKeys (LegoRotationKey *p_keys) |
| [AI] Sets the node's rotation keys array, resets rotation index. More... | |
| LegoU32 | GetTranslationIndex () |
| [AI] Gets last used/optimized translation index for interpolation. More... | |
| LegoU32 | GetRotationIndex () |
| [AI] Gets last used/optimized rotation index for interpolation. More... | |
| LegoU32 | GetScaleIndex () |
| [AI] Gets last used/optimized scale index for interpolation. More... | |
| LegoU32 | GetMorphIndex () |
| [AI] Gets last used/optimized morph index for interpolation. More... | |
| LegoU16 | GetUnknown0x20 () |
| [AI] Unknown, used in scene/camera calculations (purpose unclear). More... | |
| LegoU16 | GetUnknown0x22 () |
| [AI] Unknown, used in scene/camera calculations (purpose unclear). More... | |
| LegoRotationKey * | GetRotationKey (MxS32 index) |
| [AI] Access a pointer to the i-th rotation key. More... | |
| void | SetTranslationIndex (LegoU32 p_translationIndex) |
| [AI] Sets last used translation index. More... | |
| void | SetRotationIndex (LegoU32 p_rotationIndex) |
| [AI] Sets last used rotation index. More... | |
| void | SetScaleIndex (LegoU32 p_scaleIndex) |
| [AI] Sets last used scale index. More... | |
| void | SetMorphIndex (LegoU32 p_morphIndex) |
| [AI] Sets last used morph index. More... | |
| LegoMorphKey * | GetMorphKeys () |
| [AI] Returns pointer to morph keyframes array. More... | |
| void | SetMorphKeys (LegoMorphKey *p_morphKeys) |
| void | SetNumMorphKeys (LegoU16 p_numMorphKeys) |
| [AI] Sets morph key count. More... | |
| void | SetUnknown0x20 (LegoU16 p_unk0x20) |
| [AI] Sets unknown parameter (possibly camera/scene state). More... | |
| void | SetUnknown0x22 (LegoU16 p_unk0x22) |
| [AI] Sets unknown parameter (possibly camera/scene state). More... | |
| LegoResult | CreateLocalTransform (LegoTime p_time, Matrix4 &p_matrix) |
| [AI] Convenience: overloaded CreateLocalTransform for time in integer time units. More... | |
| LegoBool | FUN_100a0990 (LegoTime p_time) |
| [AI] Convenience: evaluate morph state at integer time value. More... | |
Public Member Functions inherited from LegoTreeNodeData | |
| LegoTreeNodeData () | |
| [AI] Default constructor. More... | |
| virtual | ~LegoTreeNodeData () |
| [AI] Virtual destructor for safe polymorphic deletion of derived classes. More... | |
| virtual LegoResult | Read (LegoStorage *p_storage) |
| [AI] Virtual function for deserializing node data from a generic LegoStorage device. More... | |
| virtual LegoResult | Write (LegoStorage *p_storage) |
| [AI] Virtual function for serializing node data to a generic LegoStorage device. More... | |
Static Public Member Functions | |
| static void | GetTranslation (LegoU16 p_numTranslationKeys, LegoTranslationKey *p_translationKeys, LegoFloat p_time, Matrix4 &p_matrix, LegoU32 &p_old_index) |
| [AI] Computes interpolated translation for a node at specified time, filling p_matrix. More... | |
| static void | GetRotation (LegoU16 p_numRotationKeys, LegoRotationKey *p_rotationKeys, LegoFloat p_time, Matrix4 &p_matrix, LegoU32 &p_old_index) |
| [AI] Computes interpolated rotation at a given time, filling p_matrix. More... | |
| static void | GetScale (LegoU16 p_numScaleKeys, LegoScaleKey *p_scaleKeys, LegoFloat p_time, Matrix4 &p_matrix, LegoU32 &p_old_index) |
| [AI] Computes interpolated scaling on a node at given time, updating p_matrix. More... | |
| static LegoFloat | Interpolate (LegoFloat p_time, LegoAnimKey &p_key1, LegoFloat p_value1, LegoAnimKey &p_key2, LegoFloat p_value2) |
| [AI] Performs linear interpolation between two key values for the given time. More... | |
| static LegoAnimKey & | GetKey (LegoU32 p_i, LegoAnimKey *p_keys, LegoU32 p_size) |
| [AI] Retrieves a reference to the p_i-th LegoAnimKey of given size. More... | |
| static LegoU32 | FindKeys (LegoFloat p_time, LegoU32 p_numKeys, LegoAnimKey *p_keys, LegoU32 p_size, LegoU32 &p_new_index, LegoU32 &p_old_index) |
| [AI] Finds surrounding key(s) for interpolation at p_time. More... | |
Protected Attributes | |
| LegoChar * | m_name |
| [AI] Animation node name. More... | |
| LegoU16 | m_numTranslationKeys |
| [AI] Number of translation keyframes. More... | |
| LegoU16 | m_numRotationKeys |
| [AI] Number of rotation keyframes. More... | |
| LegoU16 | m_numScaleKeys |
| [AI] Number of scale keyframes. More... | |
| LegoU16 | m_numMorphKeys |
| [AI] Number of morph keyframes. More... | |
| LegoTranslationKey * | m_translationKeys |
| [AI] Array of translation keyframes. More... | |
| LegoRotationKey * | m_rotationKeys |
| [AI] Array of rotation keyframes. More... | |
| LegoScaleKey * | m_scaleKeys |
| [AI] Array of scale keyframes. More... | |
| LegoMorphKey * | m_morphKeys |
| [AI] Array of morph keyframes. More... | |
| LegoU16 | m_unk0x20 |
| [AI] Unknown, used in camera/scene morph/rotation (purpose unclear). More... | |
| LegoU16 | m_unk0x22 |
| [AI] Unknown, used in camera/scene morph/rotation (purpose unclear). More... | |
| LegoU32 | m_translationIndex |
| [AI] Index cache for optimized translation lookup/interpolation. More... | |
| LegoU32 | m_rotationIndex |
| [AI] Index cache for optimized rotation lookup/interpolation. More... | |
| LegoU32 | m_scaleIndex |
| [AI] Index cache for optimized scale lookup/interpolation. More... | |
| LegoU32 | m_morphIndex |
| [AI] Index cache for optimized morph lookup/interpolation. More... | |
[AI] Holds per-node animation data for a model's animation tree.
[AI] Contains keyframe arrays for translation, rotation, scale, and morph animations, plus per-node name and anonymous flags. Provides transformation generation for a given time. Inherits from LegoTreeNodeData, fitting into a hierarchical animation structure.
Definition at line 144 of file legoanim.h.
| LegoAnimNodeData::LegoAnimNodeData | ( | ) |
[AI] Default-initializes all animation key counts to zero and pointers to NULL. [AI]
Definition at line 516 of file legoanim.cpp.
|
override |
[AI] Cleans up all allocated animation key arrays and the node name. [AI]
Definition at line 537 of file legoanim.cpp.
| LegoResult LegoAnimNodeData::CreateLocalTransform | ( | LegoFloat | p_time, |
| Matrix4 & | p_matrix | ||
| ) |
[AI] Computes the interpolated local transformation matrix for this node at the given animation time.
| p_time | Time to evaluate animation at [AI] |
| p_matrix | Resulting local transformation matrix [AI] |
Definition at line 728 of file legoanim.cpp.
|
inline |
[AI] Convenience: overloaded CreateLocalTransform for time in integer time units.
| p_time | Animation time (integer) [AI] |
| p_matrix | Result matrix [AI] |
Definition at line 206 of file legoanim.h.
|
static |
[AI] Finds surrounding key(s) for interpolation at p_time.
| p_time | Current animation time [AI] |
| p_numKeys | Number of keys in array [AI] |
| p_keys | Key array [AI] |
| p_size | Stride/size of keys [AI] |
| p_new_index | Resulting key index [AI] |
| p_old_index | Key search starting index (in/out) [AI] |
Definition at line 946 of file legoanim.cpp.
[AI] Evaluates morph keys at the given animation time and returns result (typically affects mesh shape or blend shape state).
| p_time | Time to evaluate morph at [AI] |
Definition at line 923 of file legoanim.cpp.
[AI] Convenience: evaluate morph state at integer time value.
Definition at line 212 of file legoanim.h.
|
inlinestatic |
[AI] Retrieves a reference to the p_i-th LegoAnimKey of given size.
| p_i | Array index [AI] |
| p_keys | Start of keyframe array [AI] |
| p_size | Stride/size of each keyframe [AI] |
Definition at line 1007 of file legoanim.cpp.
|
inline |
[AI] Gets last used/optimized morph index for interpolation.
Definition at line 178 of file legoanim.h.
|
inline |
[AI] Returns pointer to morph keyframes array.
Definition at line 192 of file legoanim.h.
|
inline |
[AI] Name of this animation node (used for lookup/mapping to scene graph).
Definition at line 163 of file legoanim.h.
|
inline |
[AI] Number of rotation keys for this node.
Definition at line 165 of file legoanim.h.
|
inline |
[AI] Number of translation keys for this node.
Definition at line 164 of file legoanim.h.
|
static |
[AI] Computes interpolated rotation at a given time, filling p_matrix.
| p_numRotationKeys | Count of rotation keys [AI] |
| p_rotationKeys | Rotation keys array [AI] |
| p_time | Animation time [AI] |
| p_matrix | Matrix to set [AI] |
| p_old_index | Key search starting index (pass in/out) [AI] |
Definition at line 829 of file legoanim.cpp.
|
inline |
[AI] Gets last used/optimized rotation index for interpolation.
Definition at line 176 of file legoanim.h.
|
inline |
[AI] Access a pointer to the i-th rotation key.
| index | Array index (0-based) [AI] |
Definition at line 185 of file legoanim.h.
|
inlinestatic |
[AI] Computes interpolated scaling on a node at given time, updating p_matrix.
| p_numScaleKeys | Number of scale keys [AI] |
| p_scaleKeys | Scale keys array [AI] |
| p_time | Animation time [AI] |
| p_matrix | Matrix to update [AI] |
| p_old_index | Key search starting index (pass in/out) [AI] |
Definition at line 892 of file legoanim.cpp.
|
inline |
[AI] Gets last used/optimized scale index for interpolation.
Definition at line 177 of file legoanim.h.
|
inlinestatic |
[AI] Computes interpolated translation for a node at specified time, filling p_matrix.
| p_numTranslationKeys | Count of translation keys in array [AI] |
| p_translationKeys | Translation keys array [AI] |
| p_time | Animation time [AI] |
| p_matrix | Matrix to be set [AI] |
| p_old_index | Key search starting index (pass in/out optimized for playback) [AI] |
Definition at line 765 of file legoanim.cpp.
|
inline |
[AI] Gets last used/optimized translation index for interpolation.
Definition at line 175 of file legoanim.h.
|
inline |
[AI] Unknown, used in scene/camera calculations (purpose unclear).
Definition at line 180 of file legoanim.h.
|
inline |
[AI] Unknown, used in scene/camera calculations (purpose unclear).
Definition at line 181 of file legoanim.h.
|
inlinestatic |
[AI] Performs linear interpolation between two key values for the given time.
| p_time | Current animation time [AI] |
| p_key1 | First keyframe [AI] |
| p_value1 | Value at first keyframe [AI] |
| p_key2 | Second keyframe [AI] |
| p_value2 | Value at second keyframe [AI] |
Definition at line 996 of file legoanim.cpp.
|
overridevirtual |
[AI] Reads all node keyframe arrays, name, and meta from storage.
| p_storage | Storage to read from. [AI] |
Reimplemented from LegoTreeNodeData.
Definition at line 558 of file legoanim.cpp.
|
inline |
[AI] Sets last used morph index.
Definition at line 190 of file legoanim.h.
|
inline |
Definition at line 193 of file legoanim.h.
| void LegoAnimNodeData::SetName | ( | LegoChar * | p_name | ) |
[AI] Sets the node's name (deep-copies string).
Definition at line 717 of file legoanim.cpp.
|
inline |
[AI] Sets morph key count.
Definition at line 199 of file legoanim.h.
|
inline |
[AI] Sets the number of rotation keys for this node.
Definition at line 166 of file legoanim.h.
|
inline |
[AI] Sets last used rotation index.
Definition at line 188 of file legoanim.h.
|
inline |
[AI] Sets the node's rotation keys array, resets rotation index.
Definition at line 169 of file legoanim.h.
|
inline |
[AI] Sets last used scale index.
Definition at line 189 of file legoanim.h.
|
inline |
[AI] Sets last used translation index.
Definition at line 187 of file legoanim.h.
|
inline |
[AI] Sets unknown parameter (possibly camera/scene state).
Definition at line 200 of file legoanim.h.
|
inline |
[AI] Sets unknown parameter (possibly camera/scene state).
Definition at line 201 of file legoanim.h.
|
overridevirtual |
[AI] Writes all node keyframe arrays, name, and meta to storage.
| p_storage | Storage to write to. [AI] |
Reimplemented from LegoTreeNodeData.
Definition at line 650 of file legoanim.cpp.
|
protected |
[AI] Index cache for optimized morph lookup/interpolation.
Definition at line 308 of file legoanim.h.
|
protected |
[AI] Array of morph keyframes.
Definition at line 302 of file legoanim.h.
|
protected |
[AI] Animation node name.
Definition at line 294 of file legoanim.h.
|
protected |
[AI] Number of morph keyframes.
Definition at line 298 of file legoanim.h.
|
protected |
[AI] Number of rotation keyframes.
Definition at line 296 of file legoanim.h.
|
protected |
[AI] Number of scale keyframes.
Definition at line 297 of file legoanim.h.
|
protected |
[AI] Number of translation keyframes.
Definition at line 295 of file legoanim.h.
|
protected |
[AI] Index cache for optimized rotation lookup/interpolation.
Definition at line 306 of file legoanim.h.
|
protected |
[AI] Array of rotation keyframes.
Definition at line 300 of file legoanim.h.
|
protected |
[AI] Index cache for optimized scale lookup/interpolation.
Definition at line 307 of file legoanim.h.
|
protected |
[AI] Array of scale keyframes.
Definition at line 301 of file legoanim.h.
|
protected |
[AI] Index cache for optimized translation lookup/interpolation.
Definition at line 305 of file legoanim.h.
|
protected |
[AI] Array of translation keyframes.
Definition at line 299 of file legoanim.h.
|
protected |
[AI] Unknown, used in camera/scene morph/rotation (purpose unclear).
Definition at line 303 of file legoanim.h.
|
protected |
[AI] Unknown, used in camera/scene morph/rotation (purpose unclear).
Definition at line 304 of file legoanim.h.