Isle
Loading...
Searching...
No Matches
legoanimactor.h
Go to the documentation of this file.
1#ifndef LEGOANIMACTOR_H
2#define LEGOANIMACTOR_H
3
4#include "decomp.h"
5#include "legopathactor.h"
6
7class LegoAnim;
8
19 LegoAnimActorStruct(float p_unk0x00, LegoAnim* p_AnimTreePtr, LegoROI** p_roiMap, MxU32 p_numROIs);
20
23
26 float GetDuration();
27
29 float GetUnknown0x00() { return m_unk0x00; }
30
33
35 LegoROI** GetROIMap() { return m_roiMap; }
36
37 // TODO: Possibly private
38 float m_unk0x00;
42 vector<undefined*> m_unk0x10;
43};
44
49class LegoAnimActor : public virtual LegoPathActor {
50public:
53
55 ~LegoAnimActor() override;
56
60 void ParseAction(char* p_extra) override; // vtable+0x20
61
64 void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30
65
69 void Animate(float p_time) override; // vtable+0x70
70
73 void VTable0x74(Matrix4& p_transform) override; // vtable+0x74
74
78 virtual MxResult FUN_1001c1f0(float& p_und);
79
84 virtual MxResult FUN_1001c360(float p_und, Matrix4& p_transform);
85
92 virtual MxResult FUN_1001c450(LegoAnim* p_AnimTreePtr, float p_unk0x00, LegoROI** p_roiMap, MxU32 p_numROIs);
93
95 virtual void ClearMaps();
96
98 const char* ClassName() const override // vtable+0x0c
99 {
100 return "LegoAnimActor";
101 }
102
106 MxBool IsA(const char* p_name) const override // vtable+0x10
107 {
108 return !strcmp(p_name, LegoAnimActor::ClassName()) || LegoPathActor::IsA(p_name);
109 }
110
111protected:
112 vector<LegoAnimActorStruct*> m_animMaps;
114};
115
116#endif // LEGOANIMACTOR_H
[AI] Path-based actor which supports skeletal/mesh animation via an animation tree and multiple anima...
Definition: legoanimactor.h:49
MxBool IsA(const char *p_name) const override
[AI] Checks for runtime type equality ("IsA" support); matches for this class or parent.
void ParseAction(char *p_extra) override
[AI] Handles extra action strings, looks for animation assignments and delegates to presenters (overr...
void SetWorldSpeed(MxFloat p_worldSpeed) override
[AI] Sets the current world speed and chooses which animation (from the animation map list) should be...
virtual void ClearMaps()
[AI] Deallocates all animation map structures and selects no animation; resets current animation inde...
vector< LegoAnimActorStruct * > m_animMaps
[AI] List of animation structures, each representing a valid animation for different speed/phase rang...
~LegoAnimActor() override
[AI] Destructor cleans up all animation map structures.
virtual MxResult FUN_1001c360(float p_und, Matrix4 &p_transform)
[AI] Applies the animation transform for the current animation at the given phase,...
LegoAnimActor()
[AI] Initializes LegoAnimActor and sets the current animation index to -1.
Definition: legoanimactor.h:52
virtual MxResult FUN_1001c450(LegoAnim *p_AnimTreePtr, float p_unk0x00, LegoROI **p_roiMap, MxU32 p_numROIs)
[AI] Adds a new animation mapping (LegoAnimActorStruct) with a tree, threshold, and mesh mapping.
MxS16 m_curAnim
[AI] Index of currently selected animation map (-1 if none active). [AI]
virtual MxResult FUN_1001c1f0(float &p_und)
[AI] Computes the animation phase offset within the current animation, adjusts for looping.
void Animate(float p_time) override
[AI] Performs per-frame update; applies the appropriate animation to mesh ROIs based on speed and sta...
const char * ClassName() const override
[AI] Returns the class name string for RTTI and type checking.
Definition: legoanimactor.h:98
void VTable0x74(Matrix4 &p_transform) override
[AI] Applies the current animation's transforms to the provided matrix, propagates to mesh hierarchie...
[AI] Root class for all node-based animation blending/structure.
Definition: legoanim.h:356
[AI] An actor that moves along a predefined path, supporting boundary transitions,...
Definition: legopathactor.h:32
MxBool IsA(const char *p_name) const override
[AI] RTTI-like check, matches against own or base class name for IsA hierarchy checks.
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
Definition: legoroi.h:43
4x4 Matrix class with virtual interface for manipulation and transformation.
Definition: matrix.h:24
#define override
Definition: compat.h:21
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
signed short MxS16
[AI]
Definition: mxtypes.h:26
float MxFloat
[AI]
Definition: mxtypes.h:68
unsigned int MxU32
[AI]
Definition: mxtypes.h:32
[AI] Holds per-animation instance data for a LegoAnimActor.
Definition: legoanimactor.h:13
float GetDuration()
[AI] Gets the length, in seconds, of the animation (delegates to anim tree).
LegoAnim * GetAnimTreePtr()
[AI] Returns the root animation tree node for this mapping.
Definition: legoanimactor.h:32
LegoAnim * m_AnimTreePtr
[AI] Root of animation tree for this animation [AI]
Definition: legoanimactor.h:39
vector< undefined * > m_unk0x10
[AI] Holds per-instance temporary or auxiliary animation data [AI_SUGGESTED_NAME: tempAnimationData]
Definition: legoanimactor.h:42
MxU32 m_numROIs
[AI] Number of entries in ROI map [AI]
Definition: legoanimactor.h:41
LegoROI ** m_roiMap
[AI] Mapping of animation nodes to LEGO ROIs (meshes) [AI]
Definition: legoanimactor.h:40
LegoROI ** GetROIMap()
[AI] Returns the mapping of tree nodes to LegoROI pointers (array of pointers, one per mesh/node).
Definition: legoanimactor.h:35
~LegoAnimActorStruct()
[AI] Destructor: Deallocates dynamic vector data associated with the animation entry.
float GetUnknown0x00()
[AI] Gets the selection/duration/animation threshold value associated with this entry.
Definition: legoanimactor.h:29
float m_unk0x00
[AI] Animation activation/duration threshold (used to decide which animation is active) [AI]
Definition: legoanimactor.h:38