Isle
Loading...
Searching...
No Matches
LegoAnim Class Reference

[AI] Root class for all node-based animation blending/structure. More...

#include <legoanim.h>

Inheritance diagram for LegoAnim:
Collaboration diagram for LegoAnim:

Public Member Functions

 LegoAnim ()
 [AI] Constructs an empty animation object, with no actors or tracks. More...
 
 ~LegoAnim () override
 [AI] Destructor, deallocates actors and camera animation. More...
 
LegoTime GetDuration ()
 [AI] Duration (in time units) of the animation. More...
 
LegoU32 GetNumActors ()
 [AI] Number of animated actors/models in the animation. More...
 
LegoResult Write (LegoStorage *p_storage) override
 [AI] Serializes all model and animation data to storage. More...
 
virtual LegoResult Read (LegoStorage *p_storage, LegoS32 p_parseScene)
 [AI] Loads model and animation data from storage, optionally including scene/camera animation. More...
 
const LegoCharGetActorName (LegoU32 p_index)
 [AI] Gets the name of the actor at a given index. More...
 
undefined4 GetActorUnknown0x04 (LegoU32 p_index)
 [AI] Gets the actor's "unk0x04" property at a given index. More...
 
LegoAnimSceneGetCamAnim ()
 [AI] Gets the optional camera/scene animation track. More...
 
- Public Member Functions inherited from LegoTree
 LegoTree ()
 [AI] Constructs an empty tree (root not allocated). [AI] More...
 
virtual ~LegoTree ()
 [AI] Recursively destroys all tree nodes and their payloads. [AI] More...
 
LegoTreeNodeGetRoot ()
 [AI] Returns a pointer to the root node of the tree. [AI] More...
 
void SetRoot (LegoTreeNode *p_root)
 [AI] Assigns the root node pointer for the tree (takes ownership). More...
 
virtual LegoResult Read (LegoStorage *p_storage)
 [AI] Loads the tree structure recursively from the given storage. More...
 
virtual LegoResult Write (LegoStorage *p_storage)
 [AI] Serializes the tree structure recursively to the given storage. More...
 

Protected Member Functions

LegoTreeNodeDataCreateData () override
 [AI] Creates a node data instance for the animation tree nodes (factory method). More...
 
- Protected Member Functions inherited from LegoTree
LegoResult Read (LegoStorage *p_storage, LegoTreeNode *&p_node)
 [AI] Reads a subtree recursively from storage, creating a new node and reading its data/children. More...
 
LegoResult Write (LegoStorage *p_storage, LegoTreeNode *p_node)
 [AI] Writes a subtree recursively to storage from the given node. More...
 
void Delete (LegoTreeNode *p_node)
 [AI] Recursively deletes an entire subtree starting at the given node. More...
 
virtual LegoTreeNodeDataCreateData ()
 [AI] Virtual function to instantiate node payload objects for the tree structure. More...
 

Protected Attributes

LegoTime m_duration
 [AI] Animation duration in time units. More...
 
LegoAnimActorEntrym_modelList
 [AI] Array of actor/model entries animated by this object. More...
 
LegoU32 m_numActors
 [AI] Number of actors/models. More...
 
LegoAnimScenem_camAnim
 [AI] Pointer to camera/scene animation (may be nullptr). More...
 
- Protected Attributes inherited from LegoTree
LegoTreeNodem_root
 [AI] Root node of the tree. nullptr if tree is empty. Owned by the tree instance. [AI] More...
 

Detailed Description

[AI] Root class for all node-based animation blending/structure.

[AI] Contains top-level control over all node animation for a scene or model. Includes list of animated model actors and (optionally) a camera or scene animation track.

Definition at line 356 of file legoanim.h.

Constructor & Destructor Documentation

◆ LegoAnim()

LegoAnim::LegoAnim ( )

[AI] Constructs an empty animation object, with no actors or tracks.

Definition at line 1013 of file legoanim.cpp.

◆ ~LegoAnim()

LegoAnim::~LegoAnim ( )
override

[AI] Destructor, deallocates actors and camera animation.

Definition at line 1022 of file legoanim.cpp.

Member Function Documentation

◆ CreateData()

LegoTreeNodeData * LegoAnim::CreateData ( )
inlineoverrideprotectedvirtual

[AI] Creates a node data instance for the animation tree nodes (factory method).

Reimplemented from LegoTree.

Definition at line 387 of file legoanim.h.

◆ GetActorName()

const LegoChar * LegoAnim::GetActorName ( LegoU32  p_index)

[AI] Gets the name of the actor at a given index.

Parameters
p_indexActor index [AI]

Definition at line 1150 of file legoanim.cpp.

◆ GetActorUnknown0x04()

undefined4 LegoAnim::GetActorUnknown0x04 ( LegoU32  p_index)

[AI] Gets the actor's "unk0x04" property at a given index.

[AI_SUGGESTED_NAME: GetActorProperty]

Parameters
p_indexActor index [AI]

Definition at line 1161 of file legoanim.cpp.

◆ GetCamAnim()

LegoAnimScene * LegoAnim::GetCamAnim ( )
inline

[AI] Gets the optional camera/scene animation track.

Definition at line 378 of file legoanim.h.

◆ GetDuration()

LegoTime LegoAnim::GetDuration ( )
inline

[AI] Duration (in time units) of the animation.

Definition at line 361 of file legoanim.h.

◆ GetNumActors()

LegoU32 LegoAnim::GetNumActors ( )
inline

[AI] Number of animated actors/models in the animation.

Definition at line 362 of file legoanim.h.

◆ Read()

LegoResult LegoAnim::Read ( LegoStorage p_storage,
LegoS32  p_parseScene 
)
virtual

[AI] Loads model and animation data from storage, optionally including scene/camera animation.

Parameters
p_storageStorage object to read from [AI]
p_parseSceneIf nonzero, also loads and parses the camera/scene animation [AI]

Definition at line 1038 of file legoanim.cpp.

◆ Write()

LegoResult LegoAnim::Write ( LegoStorage p_storage)
overridevirtual

[AI] Serializes all model and animation data to storage.

Reimplemented from LegoTree.

Definition at line 1105 of file legoanim.cpp.

Member Data Documentation

◆ m_camAnim

LegoAnimScene* LegoAnim::m_camAnim
protected

[AI] Pointer to camera/scene animation (may be nullptr).

Definition at line 384 of file legoanim.h.

◆ m_duration

LegoTime LegoAnim::m_duration
protected

[AI] Animation duration in time units.

Definition at line 381 of file legoanim.h.

◆ m_modelList

LegoAnimActorEntry* LegoAnim::m_modelList
protected

[AI] Array of actor/model entries animated by this object.

Definition at line 382 of file legoanim.h.

◆ m_numActors

LegoU32 LegoAnim::m_numActors
protected

[AI] Number of actors/models.

Definition at line 383 of file legoanim.h.


The documentation for this class was generated from the following files: