[AI] Represents a single generic animation keyframe, containing timing and per-keyframe flags.
void FUN_100739a0(MxS32 p_param)
[AI] Sets or clears bit1 depending on the parameter.
LegoFloat GetTime()
[AI] Retrieves the time (frame/tick) of this key.
Flags
[AI] Bitmask flag definitions for animation keys.
@ c_bit3
[AI] Third bit, used for certain special processing during animation.
@ c_bit2
[AI] Secondary bit, meaning varies by context.
@ c_bit1
[AI] Indicates if the key affects the output (meaning depends on derived type).
LegoU32 TestBit2()
[AI] Tests if flag bit2 is set.
LegoAnimKey()
[AI] Constructs an animation key with zero time and cleared flags.
LegoU32 TestBit1()
[AI] Tests if flag bit1 is set.
void SetTime(MxS32 p_time)
[AI] Sets the key's time (from an integer value, used during deserialization or legacy data).
LegoU32 TestBit3()
[AI] Tests if flag bit3 is set.
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes the animation key to storage.
LegoResult Read(LegoStorage *p_storage)
[AI] Deserializes the animation key from storage.
LegoFloat m_time
[AI] Time/sample/frame when this key occurs.
LegoU8 m_flags
[AI] Flags controlling key behavior or interpolation (see Flags enum).
[AI] Holds per-node animation data for a model's animation tree.
LegoU32 GetRotationIndex()
[AI] Gets last used/optimized rotation index for interpolation.
LegoRotationKey * m_rotationKeys
[AI] Array of rotation keyframes.
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.
LegoU32 m_rotationIndex
[AI] Index cache for optimized rotation lookup/interpolation.
LegoU16 m_numTranslationKeys
[AI] Number of translation keyframes.
LegoChar * m_name
[AI] Animation node name.
void SetScaleIndex(LegoU32 p_scaleIndex)
[AI] Sets last used scale index.
LegoU32 m_morphIndex
[AI] Index cache for optimized morph lookup/interpolation.
LegoBool FUN_100a0990(LegoTime p_time)
[AI] Convenience: evaluate morph state at integer time value.
LegoU16 m_numScaleKeys
[AI] Number of scale keyframes.
~LegoAnimNodeData() override
[AI] Cleans up all allocated animation key arrays and the node name. [AI]
LegoU16 m_numRotationKeys
[AI] Number of rotation keyframes.
void SetNumMorphKeys(LegoU16 p_numMorphKeys)
[AI] Sets morph key count.
void SetRotationKeys(LegoRotationKey *p_keys)
[AI] Sets the node's rotation keys array, resets rotation index.
LegoRotationKey * GetRotationKey(MxS32 index)
[AI] Access a pointer to the i-th rotation key.
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.
void SetTranslationIndex(LegoU32 p_translationIndex)
[AI] Sets last used translation index.
void SetUnknown0x20(LegoU16 p_unk0x20)
[AI] Sets unknown parameter (possibly camera/scene state).
void SetUnknown0x22(LegoU16 p_unk0x22)
[AI] Sets unknown parameter (possibly camera/scene state).
LegoAnimNodeData()
[AI] Default-initializes all animation key counts to zero and pointers to NULL. [AI]
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.
LegoResult CreateLocalTransform(LegoFloat p_time, Matrix4 &p_matrix)
[AI] Computes the interpolated local transformation matrix for this node at the given animation time.
LegoU32 GetScaleIndex()
[AI] Gets last used/optimized scale index for interpolation.
void SetMorphIndex(LegoU32 p_morphIndex)
[AI] Sets last used morph index.
LegoScaleKey * m_scaleKeys
[AI] Array of scale keyframes.
LegoResult Read(LegoStorage *p_storage) override
[AI] Reads all node keyframe arrays, name, and meta from storage.
void SetMorphKeys(LegoMorphKey *p_morphKeys)
LegoBool FUN_100a0990(LegoFloat p_time)
[AI] Evaluates morph keys at the given animation time and returns result (typically affects mesh shap...
void SetName(LegoChar *p_name)
[AI] Sets the node's name (deep-copies string).
LegoMorphKey * GetMorphKeys()
[AI] Returns pointer to morph keyframes array.
LegoMorphKey * m_morphKeys
[AI] Array of morph keyframes.
LegoU16 GetUnknown0x20()
[AI] Unknown, used in scene/camera calculations (purpose unclear).
LegoU32 GetTranslationIndex()
[AI] Gets last used/optimized translation index for interpolation.
LegoU16 GetNumRotationKeys()
[AI] Number of rotation keys for this node.
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.
LegoTranslationKey * m_translationKeys
[AI] Array of translation keyframes.
void SetRotationIndex(LegoU32 p_rotationIndex)
[AI] Sets last used rotation index.
LegoU32 m_scaleIndex
[AI] Index cache for optimized scale lookup/interpolation.
LegoU16 GetNumTranslationKeys()
[AI] Number of translation keys for this node.
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.
LegoResult Write(LegoStorage *p_storage) override
[AI] Writes all node keyframe arrays, name, and meta to storage.
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.
LegoU16 m_unk0x22
[AI] Unknown, used in camera/scene morph/rotation (purpose unclear).
LegoChar * GetName()
[AI] Name of this animation node (used for lookup/mapping to scene graph).
LegoU32 m_translationIndex
[AI] Index cache for optimized translation lookup/interpolation.
LegoU32 GetMorphIndex()
[AI] Gets last used/optimized morph index for interpolation.
LegoU16 m_unk0x20
[AI] Unknown, used in camera/scene morph/rotation (purpose unclear).
LegoResult CreateLocalTransform(LegoTime p_time, Matrix4 &p_matrix)
[AI] Convenience: overloaded CreateLocalTransform for time in integer time units.
void SetNumRotationKeys(LegoU16 p_numRotationKeys)
[AI] Sets the number of rotation keys for this node.
LegoU16 GetUnknown0x22()
[AI] Unknown, used in scene/camera calculations (purpose unclear).
LegoU16 m_numMorphKeys
[AI] Number of morph keyframes.
[AI] Represents an animation scene; possibly used for camera motion or global transforms.
LegoU32 GetUnknown0x1c()
[AI] Cached index for translation key interpolation (for second translation key array).
LegoResult FUN_1009f490(LegoFloat p_time, Matrix4 &p_matrix)
[AI] Evaluates this scene's animation at the given time, updating the passed matrix.
LegoAnimScene()
[AI] Default construction, zeroes all data pointers and counters.
~LegoAnimScene()
[AI] Destroys the scene, frees all allocated key arrays.
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes the entire scene data to storage, including all translation/unknown key arrays.
LegoResult Read(LegoStorage *p_storage)
[AI] Reads the entire scene data from storage, including all translation/unknown key arrays.
void SetUnknown0x18(LegoU32 p_unk0x18)
[AI] Sets cached translation index (first stream).
void SetUnknown0x1c(LegoU32 p_unk0x1c)
[AI] Sets cached translation index (second stream).
void SetUnknown0x20(LegoU32 p_unk0x20)
[AI] Sets cached key interpolation index (unknown key type).
LegoU32 GetUnknown0x20()
[AI] Cached index for unknown key interpolation.
LegoU32 GetUnknown0x18()
[AI] Cached index for translation key interpolation (for first translation key array).
[AI] Root class for all node-based animation blending/structure.
LegoTime GetDuration()
[AI] Duration (in time units) of the animation.
LegoAnimActorEntry * m_modelList
[AI] Array of actor/model entries animated by this object.
virtual LegoResult Read(LegoStorage *p_storage, LegoS32 p_parseScene)
[AI] Loads model and animation data from storage, optionally including scene/camera animation.
LegoAnimScene * m_camAnim
[AI] Pointer to camera/scene animation (may be nullptr).
LegoU32 m_numActors
[AI] Number of actors/models.
~LegoAnim() override
[AI] Destructor, deallocates actors and camera animation.
undefined4 GetActorUnknown0x04(LegoU32 p_index)
[AI] Gets the actor's "unk0x04" property at a given index.
LegoTime m_duration
[AI] Animation duration in time units.
LegoAnim()
[AI] Constructs an empty animation object, with no actors or tracks.
LegoU32 GetNumActors()
[AI] Number of animated actors/models in the animation.
const LegoChar * GetActorName(LegoU32 p_index)
[AI] Gets the name of the actor at a given index.
LegoAnimScene * GetCamAnim()
[AI] Gets the optional camera/scene animation track.
LegoResult Write(LegoStorage *p_storage) override
[AI] Serializes all model and animation data to storage.
LegoTreeNodeData * CreateData() override
[AI] Creates a node data instance for the animation tree nodes (factory method).
[AI] Animation key for morphing states or mesh morphing.
LegoBool GetUnknown0x08()
[AI] Gets the morph Boolean value (meaning unknown).
LegoMorphKey()
[AI] Constructs a morph key with an unset ("off") state.
LegoBool m_unk0x08
[AI][AI_SUGGESTED_NAME: m_morphState] Morphing state or flag at this key (meaning unknown).
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes the morph key to storage.
LegoResult Read(LegoStorage *p_storage)
[AI] Deserializes the morph key from storage.
void SetUnknown0x08(LegoBool p_unk0x08)
[AI] Sets the morph Boolean value (meaning unknown).
[AI] Animation key class for rotations (axis-angle format).
void SetX(LegoFloat p_x)
[AI] Sets the X-axis of the rotation.
LegoFloat GetY()
[AI] Gets the Y-axis of the rotation.
LegoFloat m_z
[AI] Axis-angle rotation: Z component.
LegoRotationKey()
[AI] Constructs a rotation key with default (identity) rotation.
LegoFloat m_x
[AI] Axis-angle rotation: X component.
LegoFloat GetZ()
[AI] Gets the Z-axis of the rotation.
LegoFloat m_y
[AI] Axis-angle rotation: Y component.
LegoFloat GetX()
[AI] Gets the X-axis of the rotation.
LegoResult Read(LegoStorage *p_storage)
[AI] Deserializes the rotation key from storage.
void SetY(LegoFloat p_y)
[AI] Sets the Y-axis of the rotation.
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes the rotation key to storage.
LegoFloat GetAngle()
[AI] Gets the rotation angle (around the axis).
void SetAngle(LegoFloat p_angle)
[AI] Sets the rotation angle.
LegoFloat m_angle
[AI] Axis-angle rotation: the angle value.
void SetZ(LegoFloat p_z)
[AI] Sets the Z-axis of the rotation.
[AI] Animation key class for scaling transformations.
LegoFloat GetX()
[AI] Gets the scaling X factor.
LegoFloat m_x
[AI] Scale along the X-axis.
LegoFloat m_z
[AI] Scale along the Z-axis.
void SetX(LegoFloat p_x)
[AI] Sets the scaling X factor.
void SetY(LegoFloat p_y)
[AI] Sets the scaling Y factor.
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes the scale key to storage.
LegoResult Read(LegoStorage *p_storage)
[AI] Deserializes the scale key from storage.
LegoFloat GetZ()
[AI] Gets the scaling Z factor.
LegoFloat m_y
[AI] Scale along the Y-axis.
LegoFloat GetY()
[AI] Gets the scaling Y factor.
LegoScaleKey()
[AI] Constructs a scale key (default: scale factor 1,1,1).
void SetZ(LegoFloat p_z)
[AI] Sets the scaling Z factor.
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
[AI] Animation key class for translations (vector 3D positions).
LegoFloat m_y
[AI] Translation along Y-axis.
void SetX(LegoFloat p_x)
[AI] Sets the translation X component.
LegoTranslationKey()
[AI] Constructs a translation key with all translation components set to zero.
LegoFloat m_z
[AI] Translation along Z-axis.
LegoFloat m_x
[AI] Translation along X-axis.
LegoFloat GetZ()
[AI] Gets the translation Z component.
void SetY(LegoFloat p_y)
[AI] Sets the translation Y component.
LegoFloat GetX()
[AI] Gets the translation X component.
void SetZ(LegoFloat p_z)
[AI] Sets the translation Z component.
LegoFloat GetY()
[AI] Gets the translation Y component.
LegoResult Read(LegoStorage *p_storage)
[AI] Deserializes this translation key from storage.
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes this translation key to storage.
[AI] Abstract base class for storing data payloads inside nodes of a tree structure,...
[AI] Represents an N-ary tree of LegoTreeNode objects, with support for recursive reading and writing...
[AI] Animation key of unknown type, used internally by camera/track animation.
LegoResult Read(LegoStorage *p_storage)
[AI] Deserializes the unknown key from storage.
LegoFloat m_z
[AI][AI_SUGGESTED_NAME: m_angleOrZ] Tracks either a Z translation or angle for camera movement.
LegoFloat GetZ()
[AI] Gets the Z/angle value (usage specific to context).
LegoUnknownKey()
[AI] Constructs the unknown key, initializing value to zero.
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes the unknown key to storage.
4x4 Matrix class with virtual interface for manipulation and transformation.
unsigned long LegoU32
[AI] Unsigned 32-bit integer type for cross-platform compatibility.
LegoS32 LegoTime
[AI] Time value, typically used for tick counts, durations, or timing; defined as a signed 32-bit int...
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
unsigned char LegoU8
[AI] Unsigned 8-bit integer type used throughout LEGO Island.
LegoS32 LegoResult
[AI] Function result type (return code): typically SUCCESS (0) or FAILURE (-1).
long LegoS32
[AI] Signed 32-bit integer type for cross-platform compatibility.
unsigned short LegoU16
[AI] Unsigned 16-bit integer type for cross-platform compatibility.
float LegoFloat
[AI] Floating point type used throughout LEGO Island.
LegoU8 LegoBool
[AI] Boolean value used throughout the codebase.
[AI] Describes a single actor or model referenced by an animation.
LegoChar * m_name
[AI] Name of the actor/model.
undefined4 m_unk0x04
[AI] Unknown. May refer to a flag, index, or property (purpose unclear). [AI_SUGGESTED_NAME: m_actorP...