Isle
Loading...
Searching...
No Matches
legoanim.h
Go to the documentation of this file.
1#ifndef __LEGOANIM_H
2#define __LEGOANIM_H
3
4#include "decomp.h"
5#include "misc/legostorage.h"
6#include "misc/legotree.h"
7
8class Matrix4;
9
13public:
15 enum Flags {
16 c_bit1 = 0x01,
17 c_bit2 = 0x02,
18 c_bit3 = 0x04
19 };
20
21 LegoAnimKey();
22 LegoResult Read(LegoStorage* p_storage);
23 LegoResult Write(LegoStorage* p_storage);
24 LegoFloat GetTime() { return m_time; }
25
27 void SetTime(MxS32 p_time) { m_time = p_time; }
28
29 LegoU32 TestBit1() { return m_flags & c_bit1; }
30 LegoU32 TestBit2() { return m_flags & c_bit2; }
31 LegoU32 TestBit3() { return m_flags & c_bit3; }
32
34 void FUN_100739a0(MxS32 p_param)
35 {
36 if (p_param) {
37 m_flags |= c_bit1;
38 }
39 else {
40 m_flags &= ~c_bit1;
41 }
42 }
43
44protected:
47};
48
52public:
54 LegoResult Read(LegoStorage* p_storage);
55 LegoResult Write(LegoStorage* p_storage);
56 LegoFloat GetX() { return m_x; }
57 void SetX(LegoFloat p_x) { m_x = p_x; }
58 LegoFloat GetY() { return m_y; }
59 void SetY(LegoFloat p_y) { m_y = p_y; }
60 LegoFloat GetZ() { return m_z; }
61 void SetZ(LegoFloat p_z) { m_z = p_z; }
62
63protected:
67};
68
72public:
74 LegoResult Read(LegoStorage* p_storage);
75 LegoResult Write(LegoStorage* p_storage);
76
77 LegoFloat GetAngle() { return m_angle; }
78 void SetAngle(LegoFloat p_angle) { m_angle = p_angle; }
79 LegoFloat GetX() { return m_x; }
80 void SetX(LegoFloat p_x) { m_x = p_x; }
81 LegoFloat GetY() { return m_y; }
82 void SetY(LegoFloat p_y) { m_y = p_y; }
83 LegoFloat GetZ() { return m_z; }
84 void SetZ(LegoFloat p_z) { m_z = p_z; }
85
86protected:
91};
92
95class LegoScaleKey : public LegoAnimKey {
96public:
97 LegoScaleKey();
98 LegoResult Read(LegoStorage* p_storage);
99 LegoResult Write(LegoStorage* p_storage);
100 LegoFloat GetX() { return m_x; }
101 void SetX(LegoFloat p_x) { m_x = p_x; }
102 LegoFloat GetY() { return m_y; }
103 void SetY(LegoFloat p_y) { m_y = p_y; }
104 LegoFloat GetZ() { return m_z; }
105 void SetZ(LegoFloat p_z) { m_z = p_z; }
106
107protected:
111};
112
115class LegoMorphKey : public LegoAnimKey {
116public:
117 LegoMorphKey();
118 LegoResult Read(LegoStorage* p_storage);
119 LegoResult Write(LegoStorage* p_storage);
121 void SetUnknown0x08(LegoBool p_unk0x08) { m_unk0x08 = p_unk0x08; }
122
123protected:
125};
126
130public:
132 LegoResult Read(LegoStorage* p_storage);
133 LegoResult Write(LegoStorage* p_storage);
134
135 LegoFloat GetZ() { return m_z; }
136
137protected:
139};
140
145public:
147 ~LegoAnimNodeData() override;
148 LegoResult Read(LegoStorage* p_storage) override;
149 LegoResult Write(LegoStorage* p_storage) override;
150
152 void SetName(LegoChar* p_name);
153
158
162
163 LegoChar* GetName() { return m_name; }
166 void SetNumRotationKeys(LegoU16 p_numRotationKeys) { m_numRotationKeys = p_numRotationKeys; }
167
170 {
171 m_rotationKeys = p_keys;
172 m_rotationIndex = 0;
173 }
174
179
182
186
187 void SetTranslationIndex(LegoU32 p_translationIndex) { m_translationIndex = p_translationIndex; }
188 void SetRotationIndex(LegoU32 p_rotationIndex) { m_rotationIndex = p_rotationIndex; }
189 void SetScaleIndex(LegoU32 p_scaleIndex) { m_scaleIndex = p_scaleIndex; }
190 void SetMorphIndex(LegoU32 p_morphIndex) { m_morphIndex = p_morphIndex; }
191
193 void SetMorphKeys(LegoMorphKey* p_morphKeys)
194 {
195 m_morphKeys = p_morphKeys;
196 m_morphIndex = 0;
197 }
198
199 void SetNumMorphKeys(LegoU16 p_numMorphKeys) { m_numMorphKeys = p_numMorphKeys; }
200 void SetUnknown0x20(LegoU16 p_unk0x20) { m_unk0x20 = p_unk0x20; }
201 void SetUnknown0x22(LegoU16 p_unk0x22) { m_unk0x22 = p_unk0x22; }
202
207 {
208 return CreateLocalTransform((LegoFloat) p_time, p_matrix);
209 }
210
213
220 inline static void GetTranslation(
221 LegoU16 p_numTranslationKeys,
222 LegoTranslationKey* p_translationKeys,
223 LegoFloat p_time,
224 Matrix4& p_matrix,
225 LegoU32& p_old_index
226 );
227
234 static void GetRotation(
235 LegoU16 p_numRotationKeys,
236 LegoRotationKey* p_rotationKeys,
237 LegoFloat p_time,
238 Matrix4& p_matrix,
239 LegoU32& p_old_index
240 );
241
248 inline static void GetScale(
249 LegoU16 p_numScaleKeys,
250 LegoScaleKey* p_scaleKeys,
251 LegoFloat p_time,
252 Matrix4& p_matrix,
253 LegoU32& p_old_index
254 );
255
262 inline static LegoFloat Interpolate(
263 LegoFloat p_time,
264 LegoAnimKey& p_key1,
265 LegoFloat p_value1,
266 LegoAnimKey& p_key2,
267 LegoFloat p_value2
268 );
269
274 inline static LegoAnimKey& GetKey(LegoU32 p_i, LegoAnimKey* p_keys, LegoU32 p_size);
275
284 static LegoU32 FindKeys(
285 LegoFloat p_time,
286 LegoU32 p_numKeys,
287 LegoAnimKey* p_keys,
288 LegoU32 p_size,
289 LegoU32& p_new_index,
290 LegoU32& p_old_index
291 );
292
293protected:
309};
310
316};
317
322public:
323 LegoAnimScene();
325 LegoResult Read(LegoStorage* p_storage);
326 LegoResult Write(LegoStorage* p_storage);
327
331 LegoResult FUN_1009f490(LegoFloat p_time, Matrix4& p_matrix);
332
333 LegoU32 GetUnknown0x18() { return m_unk0x18; }
334 LegoU32 GetUnknown0x1c() { return m_unk0x1c; }
335 LegoU32 GetUnknown0x20() { return m_unk0x20; }
336
337 void SetUnknown0x18(LegoU32 p_unk0x18) { m_unk0x18 = p_unk0x18; }
338 void SetUnknown0x1c(LegoU32 p_unk0x1c) { m_unk0x1c = p_unk0x1c; }
339 void SetUnknown0x20(LegoU32 p_unk0x20) { m_unk0x20 = p_unk0x20; }
340
341private:
342 LegoU16 m_unk0x00;
343 LegoTranslationKey* m_unk0x04;
344 LegoU16 m_unk0x08;
345 LegoTranslationKey* m_unk0x0c;
346 LegoU16 m_unk0x10;
347 LegoUnknownKey* m_unk0x14;
348 LegoU32 m_unk0x18;
349 LegoU32 m_unk0x1c;
350 LegoU32 m_unk0x20;
351};
352
356class LegoAnim : public LegoTree {
357public:
358 LegoAnim();
359 ~LegoAnim() override;
360
363 LegoResult Write(LegoStorage* p_storage) override;
364
368 virtual LegoResult Read(LegoStorage* p_storage, LegoS32 p_parseScene);
369
372 const LegoChar* GetActorName(LegoU32 p_index);
373
377
379
380protected:
385
387 LegoTreeNodeData* CreateData() override { return new LegoAnimNodeData(); }
388};
389
390#endif // __LEGOANIM_H
[AI] Represents a single generic animation keyframe, containing timing and per-keyframe flags.
Definition: legoanim.h:12
void FUN_100739a0(MxS32 p_param)
[AI] Sets or clears bit1 depending on the parameter.
Definition: legoanim.h:34
LegoFloat GetTime()
[AI] Retrieves the time (frame/tick) of this key.
Definition: legoanim.h:24
Flags
[AI] Bitmask flag definitions for animation keys.
Definition: legoanim.h:15
@ c_bit3
[AI] Third bit, used for certain special processing during animation.
Definition: legoanim.h:18
@ c_bit2
[AI] Secondary bit, meaning varies by context.
Definition: legoanim.h:17
@ c_bit1
[AI] Indicates if the key affects the output (meaning depends on derived type).
Definition: legoanim.h:16
LegoU32 TestBit2()
[AI] Tests if flag bit2 is set.
Definition: legoanim.h:30
LegoAnimKey()
[AI] Constructs an animation key with zero time and cleared flags.
Definition: legoanim.cpp:286
LegoU32 TestBit1()
[AI] Tests if flag bit1 is set.
Definition: legoanim.h:29
void SetTime(MxS32 p_time)
[AI] Sets the key's time (from an integer value, used during deserialization or legacy data).
Definition: legoanim.h:27
LegoU32 TestBit3()
[AI] Tests if flag bit3 is set.
Definition: legoanim.h:31
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes the animation key to storage.
Definition: legoanim.cpp:309
LegoResult Read(LegoStorage *p_storage)
[AI] Deserializes the animation key from storage.
Definition: legoanim.cpp:293
LegoFloat m_time
[AI] Time/sample/frame when this key occurs.
Definition: legoanim.h:46
LegoU8 m_flags
[AI] Flags controlling key behavior or interpolation (see Flags enum).
Definition: legoanim.h:45
[AI] Holds per-node animation data for a model's animation tree.
Definition: legoanim.h:144
LegoU32 GetRotationIndex()
[AI] Gets last used/optimized rotation index for interpolation.
Definition: legoanim.h:176
LegoRotationKey * m_rotationKeys
[AI] Array of rotation keyframes.
Definition: legoanim.h:300
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.
Definition: legoanim.cpp:1007
LegoU32 m_rotationIndex
[AI] Index cache for optimized rotation lookup/interpolation.
Definition: legoanim.h:306
LegoU16 m_numTranslationKeys
[AI] Number of translation keyframes.
Definition: legoanim.h:295
LegoChar * m_name
[AI] Animation node name.
Definition: legoanim.h:294
void SetScaleIndex(LegoU32 p_scaleIndex)
[AI] Sets last used scale index.
Definition: legoanim.h:189
LegoU32 m_morphIndex
[AI] Index cache for optimized morph lookup/interpolation.
Definition: legoanim.h:308
LegoBool FUN_100a0990(LegoTime p_time)
[AI] Convenience: evaluate morph state at integer time value.
Definition: legoanim.h:212
LegoU16 m_numScaleKeys
[AI] Number of scale keyframes.
Definition: legoanim.h:297
~LegoAnimNodeData() override
[AI] Cleans up all allocated animation key arrays and the node name. [AI]
Definition: legoanim.cpp:537
LegoU16 m_numRotationKeys
[AI] Number of rotation keyframes.
Definition: legoanim.h:296
void SetNumMorphKeys(LegoU16 p_numMorphKeys)
[AI] Sets morph key count.
Definition: legoanim.h:199
void SetRotationKeys(LegoRotationKey *p_keys)
[AI] Sets the node's rotation keys array, resets rotation index.
Definition: legoanim.h:169
LegoRotationKey * GetRotationKey(MxS32 index)
[AI] Access a pointer to the i-th rotation key.
Definition: legoanim.h:185
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.
Definition: legoanim.cpp:996
void SetTranslationIndex(LegoU32 p_translationIndex)
[AI] Sets last used translation index.
Definition: legoanim.h:187
void SetUnknown0x20(LegoU16 p_unk0x20)
[AI] Sets unknown parameter (possibly camera/scene state).
Definition: legoanim.h:200
void SetUnknown0x22(LegoU16 p_unk0x22)
[AI] Sets unknown parameter (possibly camera/scene state).
Definition: legoanim.h:201
LegoAnimNodeData()
[AI] Default-initializes all animation key counts to zero and pointers to NULL. [AI]
Definition: legoanim.cpp:516
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.
Definition: legoanim.cpp:765
LegoResult CreateLocalTransform(LegoFloat p_time, Matrix4 &p_matrix)
[AI] Computes the interpolated local transformation matrix for this node at the given animation time.
Definition: legoanim.cpp:728
LegoU32 GetScaleIndex()
[AI] Gets last used/optimized scale index for interpolation.
Definition: legoanim.h:177
void SetMorphIndex(LegoU32 p_morphIndex)
[AI] Sets last used morph index.
Definition: legoanim.h:190
LegoScaleKey * m_scaleKeys
[AI] Array of scale keyframes.
Definition: legoanim.h:301
LegoResult Read(LegoStorage *p_storage) override
[AI] Reads all node keyframe arrays, name, and meta from storage.
Definition: legoanim.cpp:558
void SetMorphKeys(LegoMorphKey *p_morphKeys)
Definition: legoanim.h:193
LegoBool FUN_100a0990(LegoFloat p_time)
[AI] Evaluates morph keys at the given animation time and returns result (typically affects mesh shap...
Definition: legoanim.cpp:923
void SetName(LegoChar *p_name)
[AI] Sets the node's name (deep-copies string).
Definition: legoanim.cpp:717
LegoMorphKey * GetMorphKeys()
[AI] Returns pointer to morph keyframes array.
Definition: legoanim.h:192
LegoMorphKey * m_morphKeys
[AI] Array of morph keyframes.
Definition: legoanim.h:302
LegoU16 GetUnknown0x20()
[AI] Unknown, used in scene/camera calculations (purpose unclear).
Definition: legoanim.h:180
LegoU32 GetTranslationIndex()
[AI] Gets last used/optimized translation index for interpolation.
Definition: legoanim.h:175
LegoU16 GetNumRotationKeys()
[AI] Number of rotation keys for this node.
Definition: legoanim.h:165
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.
Definition: legoanim.cpp:892
LegoTranslationKey * m_translationKeys
[AI] Array of translation keyframes.
Definition: legoanim.h:299
void SetRotationIndex(LegoU32 p_rotationIndex)
[AI] Sets last used rotation index.
Definition: legoanim.h:188
LegoU32 m_scaleIndex
[AI] Index cache for optimized scale lookup/interpolation.
Definition: legoanim.h:307
LegoU16 GetNumTranslationKeys()
[AI] Number of translation keys for this node.
Definition: legoanim.h:164
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.
Definition: legoanim.cpp:946
LegoResult Write(LegoStorage *p_storage) override
[AI] Writes all node keyframe arrays, name, and meta to storage.
Definition: legoanim.cpp:650
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.
Definition: legoanim.cpp:829
LegoU16 m_unk0x22
[AI] Unknown, used in camera/scene morph/rotation (purpose unclear).
Definition: legoanim.h:304
LegoChar * GetName()
[AI] Name of this animation node (used for lookup/mapping to scene graph).
Definition: legoanim.h:163
LegoU32 m_translationIndex
[AI] Index cache for optimized translation lookup/interpolation.
Definition: legoanim.h:305
LegoU32 GetMorphIndex()
[AI] Gets last used/optimized morph index for interpolation.
Definition: legoanim.h:178
LegoU16 m_unk0x20
[AI] Unknown, used in camera/scene morph/rotation (purpose unclear).
Definition: legoanim.h:303
LegoResult CreateLocalTransform(LegoTime p_time, Matrix4 &p_matrix)
[AI] Convenience: overloaded CreateLocalTransform for time in integer time units.
Definition: legoanim.h:206
void SetNumRotationKeys(LegoU16 p_numRotationKeys)
[AI] Sets the number of rotation keys for this node.
Definition: legoanim.h:166
LegoU16 GetUnknown0x22()
[AI] Unknown, used in scene/camera calculations (purpose unclear).
Definition: legoanim.h:181
LegoU16 m_numMorphKeys
[AI] Number of morph keyframes.
Definition: legoanim.h:298
[AI] Represents an animation scene; possibly used for camera motion or global transforms.
Definition: legoanim.h:321
LegoU32 GetUnknown0x1c()
[AI] Cached index for translation key interpolation (for second translation key array).
Definition: legoanim.h:334
LegoResult FUN_1009f490(LegoFloat p_time, Matrix4 &p_matrix)
[AI] Evaluates this scene's animation at the given time, updating the passed matrix.
Definition: legoanim.cpp:202
LegoAnimScene()
[AI] Default construction, zeroes all data pointers and counters.
Definition: legoanim.cpp:59
~LegoAnimScene()
[AI] Destroys the scene, frees all allocated key arrays.
Definition: legoanim.cpp:73
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes the entire scene data to storage, including all translation/unknown key arrays.
Definition: legoanim.cpp:93
LegoResult Read(LegoStorage *p_storage)
[AI] Reads the entire scene data from storage, including all translation/unknown key arrays.
Definition: legoanim.cpp:135
void SetUnknown0x18(LegoU32 p_unk0x18)
[AI] Sets cached translation index (first stream).
Definition: legoanim.h:337
void SetUnknown0x1c(LegoU32 p_unk0x1c)
[AI] Sets cached translation index (second stream).
Definition: legoanim.h:338
void SetUnknown0x20(LegoU32 p_unk0x20)
[AI] Sets cached key interpolation index (unknown key type).
Definition: legoanim.h:339
LegoU32 GetUnknown0x20()
[AI] Cached index for unknown key interpolation.
Definition: legoanim.h:335
LegoU32 GetUnknown0x18()
[AI] Cached index for translation key interpolation (for first translation key array).
Definition: legoanim.h:333
[AI] Root class for all node-based animation blending/structure.
Definition: legoanim.h:356
LegoTime GetDuration()
[AI] Duration (in time units) of the animation.
Definition: legoanim.h:361
LegoAnimActorEntry * m_modelList
[AI] Array of actor/model entries animated by this object.
Definition: legoanim.h:382
virtual LegoResult Read(LegoStorage *p_storage, LegoS32 p_parseScene)
[AI] Loads model and animation data from storage, optionally including scene/camera animation.
Definition: legoanim.cpp:1038
LegoAnimScene * m_camAnim
[AI] Pointer to camera/scene animation (may be nullptr).
Definition: legoanim.h:384
LegoU32 m_numActors
[AI] Number of actors/models.
Definition: legoanim.h:383
~LegoAnim() override
[AI] Destructor, deallocates actors and camera animation.
Definition: legoanim.cpp:1022
undefined4 GetActorUnknown0x04(LegoU32 p_index)
[AI] Gets the actor's "unk0x04" property at a given index.
Definition: legoanim.cpp:1161
LegoTime m_duration
[AI] Animation duration in time units.
Definition: legoanim.h:381
LegoAnim()
[AI] Constructs an empty animation object, with no actors or tracks.
Definition: legoanim.cpp:1013
LegoU32 GetNumActors()
[AI] Number of animated actors/models in the animation.
Definition: legoanim.h:362
const LegoChar * GetActorName(LegoU32 p_index)
[AI] Gets the name of the actor at a given index.
Definition: legoanim.cpp:1150
LegoAnimScene * GetCamAnim()
[AI] Gets the optional camera/scene animation track.
Definition: legoanim.h:378
LegoResult Write(LegoStorage *p_storage) override
[AI] Serializes all model and animation data to storage.
Definition: legoanim.cpp:1105
LegoTreeNodeData * CreateData() override
[AI] Creates a node data instance for the animation tree nodes (factory method).
Definition: legoanim.h:387
[AI] Animation key for morphing states or mesh morphing.
Definition: legoanim.h:115
LegoBool GetUnknown0x08()
[AI] Gets the morph Boolean value (meaning unknown).
Definition: legoanim.h:120
LegoMorphKey()
[AI] Constructs a morph key with an unset ("off") state.
Definition: legoanim.cpp:1172
LegoBool m_unk0x08
[AI][AI_SUGGESTED_NAME: m_morphState] Morphing state or flag at this key (meaning unknown).
Definition: legoanim.h:124
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes the morph key to storage.
Definition: legoanim.cpp:1195
LegoResult Read(LegoStorage *p_storage)
[AI] Deserializes the morph key from storage.
Definition: legoanim.cpp:1178
void SetUnknown0x08(LegoBool p_unk0x08)
[AI] Sets the morph Boolean value (meaning unknown).
Definition: legoanim.h:121
[AI] Animation key class for rotations (axis-angle format).
Definition: legoanim.h:71
void SetX(LegoFloat p_x)
[AI] Sets the X-axis of the rotation.
Definition: legoanim.h:80
LegoFloat GetY()
[AI] Gets the Y-axis of the rotation.
Definition: legoanim.h:81
LegoFloat m_z
[AI] Axis-angle rotation: Z component.
Definition: legoanim.h:90
LegoRotationKey()
[AI] Constructs a rotation key with default (identity) rotation.
Definition: legoanim.cpp:384
LegoFloat m_x
[AI] Axis-angle rotation: X component.
Definition: legoanim.h:88
LegoFloat GetZ()
[AI] Gets the Z-axis of the rotation.
Definition: legoanim.h:83
LegoFloat m_y
[AI] Axis-angle rotation: Y component.
Definition: legoanim.h:89
LegoFloat GetX()
[AI] Gets the X-axis of the rotation.
Definition: legoanim.h:79
LegoResult Read(LegoStorage *p_storage)
[AI] Deserializes the rotation key from storage.
Definition: legoanim.cpp:393
void SetY(LegoFloat p_y)
[AI] Sets the Y-axis of the rotation.
Definition: legoanim.h:82
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes the rotation key to storage.
Definition: legoanim.cpp:426
LegoFloat GetAngle()
[AI] Gets the rotation angle (around the axis).
Definition: legoanim.h:77
void SetAngle(LegoFloat p_angle)
[AI] Sets the rotation angle.
Definition: legoanim.h:78
LegoFloat m_angle
[AI] Axis-angle rotation: the angle value.
Definition: legoanim.h:87
void SetZ(LegoFloat p_z)
[AI] Sets the Z-axis of the rotation.
Definition: legoanim.h:84
[AI] Animation key class for scaling transformations.
Definition: legoanim.h:95
LegoFloat GetX()
[AI] Gets the scaling X factor.
Definition: legoanim.h:100
LegoFloat m_x
[AI] Scale along the X-axis.
Definition: legoanim.h:108
LegoFloat m_z
[AI] Scale along the Z-axis.
Definition: legoanim.h:110
void SetX(LegoFloat p_x)
[AI] Sets the scaling X factor.
Definition: legoanim.h:101
void SetY(LegoFloat p_y)
[AI] Sets the scaling Y factor.
Definition: legoanim.h:103
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes the scale key to storage.
Definition: legoanim.cpp:491
LegoResult Read(LegoStorage *p_storage)
[AI] Deserializes the scale key from storage.
Definition: legoanim.cpp:462
LegoFloat GetZ()
[AI] Gets the scaling Z factor.
Definition: legoanim.h:104
LegoFloat m_y
[AI] Scale along the Y-axis.
Definition: legoanim.h:109
LegoFloat GetY()
[AI] Gets the scaling Y factor.
Definition: legoanim.h:102
LegoScaleKey()
[AI] Constructs a scale key (default: scale factor 1,1,1).
Definition: legoanim.cpp:454
void SetZ(LegoFloat p_z)
[AI] Sets the scaling Z factor.
Definition: legoanim.h:105
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Definition: legostorage.h:16
[AI] Animation key class for translations (vector 3D positions).
Definition: legoanim.h:51
LegoFloat m_y
[AI] Translation along Y-axis.
Definition: legoanim.h:65
void SetX(LegoFloat p_x)
[AI] Sets the translation X component.
Definition: legoanim.h:57
LegoTranslationKey()
[AI] Constructs a translation key with all translation components set to zero.
Definition: legoanim.cpp:322
LegoFloat m_z
[AI] Translation along Z-axis.
Definition: legoanim.h:66
LegoFloat m_x
[AI] Translation along X-axis.
Definition: legoanim.h:64
LegoFloat GetZ()
[AI] Gets the translation Z component.
Definition: legoanim.h:60
void SetY(LegoFloat p_y)
[AI] Sets the translation Y component.
Definition: legoanim.h:59
LegoFloat GetX()
[AI] Gets the translation X component.
Definition: legoanim.h:56
void SetZ(LegoFloat p_z)
[AI] Sets the translation Z component.
Definition: legoanim.h:61
LegoFloat GetY()
[AI] Gets the translation Y component.
Definition: legoanim.h:58
LegoResult Read(LegoStorage *p_storage)
[AI] Deserializes this translation key from storage.
Definition: legoanim.cpp:330
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes this translation key to storage.
Definition: legoanim.cpp:359
[AI] Abstract base class for storing data payloads inside nodes of a tree structure,...
Definition: legotree.h:15
[AI] Represents an N-ary tree of LegoTreeNode objects, with support for recursive reading and writing...
Definition: legotree.h:102
[AI] Animation key of unknown type, used internally by camera/track animation.
Definition: legoanim.h:129
LegoResult Read(LegoStorage *p_storage)
[AI] Deserializes the unknown key from storage.
Definition: legoanim.cpp:26
LegoFloat m_z
[AI][AI_SUGGESTED_NAME: m_angleOrZ] Tracks either a Z translation or angle for camera movement.
Definition: legoanim.h:138
LegoFloat GetZ()
[AI] Gets the Z/angle value (usage specific to context).
Definition: legoanim.h:135
LegoUnknownKey()
[AI] Constructs the unknown key, initializing value to zero.
Definition: legoanim.cpp:20
LegoResult Write(LegoStorage *p_storage)
[AI] Serializes the unknown key to storage.
Definition: legoanim.cpp:43
4x4 Matrix class with virtual interface for manipulation and transformation.
Definition: matrix.h:24
unsigned int undefined4
Definition: decomp.h:28
unsigned long LegoU32
[AI] Unsigned 32-bit integer type for cross-platform compatibility.
Definition: legotypes.h:71
LegoS32 LegoTime
[AI] Time value, typically used for tick counts, durations, or timing; defined as a signed 32-bit int...
Definition: legotypes.h:95
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
Definition: legotypes.h:83
unsigned char LegoU8
[AI] Unsigned 8-bit integer type used throughout LEGO Island.
Definition: legotypes.h:47
LegoS32 LegoResult
[AI] Function result type (return code): typically SUCCESS (0) or FAILURE (-1).
Definition: legotypes.h:101
long LegoS32
[AI] Signed 32-bit integer type for cross-platform compatibility.
Definition: legotypes.h:65
unsigned short LegoU16
[AI] Unsigned 16-bit integer type for cross-platform compatibility.
Definition: legotypes.h:59
float LegoFloat
[AI] Floating point type used throughout LEGO Island.
Definition: legotypes.h:77
LegoU8 LegoBool
[AI] Boolean value used throughout the codebase.
Definition: legotypes.h:89
signed int MxS32
[AI]
Definition: mxtypes.h:38
[AI] Describes a single actor or model referenced by an animation.
Definition: legoanim.h:313
LegoChar * m_name
[AI] Name of the actor/model.
Definition: legoanim.h:314
undefined4 m_unk0x04
[AI] Unknown. May refer to a flag, index, or property (purpose unclear). [AI_SUGGESTED_NAME: m_actorP...
Definition: legoanim.h:315