ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Stark::Resources::AnimSkeleton Class Reference

Animates a 3D mesh skeleton. More...

#include <anim.h>

Inheritance diagram for Stark::Resources::AnimSkeleton:
Collaboration diagram for Stark::Resources::AnimSkeleton:

List of all members.

Public Member Functions

 AnimSkeleton (Object *parent, byte subType, uint16 index, const Common::String &name)
 ~AnimSkeleton () override
void readData (Formats::XRCReadStream *stream) override
 Deserialize the resource static data and initial state.
void onPostRead () override
 Called when the node's initialization is complete.
void onAllLoaded () override
 Called when the resource sub-tree is entirely loaded.
void onGameLoop () override
 Called once per game loop.
void onPreDestroy () override
 Called before a resource sub-tree is unloaded.
void applyToItem (Item *item) override
 Associate the animation to an Item.
void removeFromItem (Item *item) override
 Dissociate the animation from an item.
VisualgetVisual () override
 Obtain the Visual to be used to render the animation.
void playAsAction (ItemVisual *item) override
 Play the animation as an action for an item.
bool isAtTime (uint32 time) const override
 Checks if the elapsed time since the animation start is greater than a specified duration.
bool isDone () const override
 Is this animation done playing.
uint32 getMovementSpeed () const override
 Get the anim movement speed in units per seconds.
uint32 getIdleActionFrequency () const override
 Get the chance the animation has to play among other idle actions from the same anim hierarchy.
void shouldResetItem (bool resetItem) override
 When this animation is playing as an action should a new animation be chosen for the item as soon as this one completes based on the item's activity? This is true by default, but setting it to false allows scripts to chose precisely the new animation to play, and to start it in the same frame as this one is removed.
void resetItem () override
 Remove this action animation for the item and select a new animation based on the item's current activity.
uint32 getRemainingTime () const
 Get the duration in milliseconds before the animation loops ends.
uint32 getCurrentTime () const
 Get the position in the animation loop in milliseconds.

Protected Member Functions

void printData () override

Protected Attributes

bool _castsShadow
Common::String _archiveName
Common::String _animFilename
bool _loop
uint32 _movementSpeed
uint32 _idleActionFrequency
uint32 _totalTime
uint32 _currentTime
bool _done
SkeletonAnim_skeletonAnim
VisualActor_visual
ItemVisual_actionItem
bool _shouldResetItem

Detailed Description

Animates a 3D mesh skeleton.

Definition at line 283 of file anim.h.


Constructor & Destructor Documentation

Stark::Resources::AnimSkeleton::AnimSkeleton ( Object parent,
byte  subType,
uint16  index,
const Common::String name 
)

Definition at line 484 of file anim.cpp.

Stark::Resources::AnimSkeleton::~AnimSkeleton (  )  [override]

Definition at line 479 of file anim.cpp.


Member Function Documentation

void Stark::Resources::AnimSkeleton::applyToItem ( Item item  )  [override, virtual]

Associate the animation to an Item.

Reimplemented from Stark::Resources::Anim.

Definition at line 499 of file anim.cpp.

uint32 Stark::Resources::AnimSkeleton::getCurrentTime (  )  const

Get the position in the animation loop in milliseconds.

Definition at line 625 of file anim.cpp.

uint32 Stark::Resources::AnimSkeleton::getIdleActionFrequency (  )  const [override, virtual]

Get the chance the animation has to play among other idle actions from the same anim hierarchy.

Reimplemented from Stark::Resources::Anim.

Definition at line 652 of file anim.cpp.

uint32 Stark::Resources::AnimSkeleton::getMovementSpeed (  )  const [override, virtual]

Get the anim movement speed in units per seconds.

Reimplemented from Stark::Resources::Anim.

Definition at line 621 of file anim.cpp.

uint32 Stark::Resources::AnimSkeleton::getRemainingTime (  )  const

Get the duration in milliseconds before the animation loops ends.

Definition at line 629 of file anim.cpp.

Visual * Stark::Resources::AnimSkeleton::getVisual (  )  [override, virtual]

Obtain the Visual to be used to render the animation.

Implements Stark::Resources::Anim.

Definition at line 537 of file anim.cpp.

bool Stark::Resources::AnimSkeleton::isAtTime ( uint32  time  )  const [override, virtual]

Checks if the elapsed time since the animation start is greater than a specified duration.

Reimplemented from Stark::Resources::Anim.

Definition at line 648 of file anim.cpp.

bool Stark::Resources::AnimSkeleton::isDone (  )  const [inline, override, virtual]

Is this animation done playing.

Only valid for animations started with playAsAction.

Reimplemented from Stark::Resources::Anim.

Definition at line 301 of file anim.h.

void Stark::Resources::AnimSkeleton::onAllLoaded (  )  [override, virtual]

Called when the resource sub-tree is entirely loaded.

Allows to load data from other nodes.

Reimplemented from Stark::Resources::Object.

Definition at line 580 of file anim.cpp.

void Stark::Resources::AnimSkeleton::onGameLoop (  )  [override, virtual]

Called once per game loop.

Reimplemented from Stark::Resources::Object.

Definition at line 587 of file anim.cpp.

void Stark::Resources::AnimSkeleton::onPostRead (  )  [override, virtual]

Called when the node's initialization is complete.

Allows to load additional data from file.

Reimplemented from Stark::Resources::Object.

Definition at line 571 of file anim.cpp.

void Stark::Resources::AnimSkeleton::onPreDestroy (  )  [override, virtual]

Called before a resource sub-tree is unloaded.

Reimplemented from Stark::Resources::Object.

Definition at line 615 of file anim.cpp.

void Stark::Resources::AnimSkeleton::playAsAction ( ItemVisual item  )  [override, virtual]

Play the animation as an action for an item.

This sets up a callback to the item for when the animation completes.

Reimplemented from Stark::Resources::Anim.

Definition at line 638 of file anim.cpp.

void Stark::Resources::AnimSkeleton::printData (  )  [override, protected, virtual]

Reimplemented from Stark::Resources::Anim.

Definition at line 656 of file anim.cpp.

void Stark::Resources::AnimSkeleton::readData ( Formats::XRCReadStream stream  )  [override, virtual]

Deserialize the resource static data and initial state.

Reimplemented from Stark::Resources::Anim.

Definition at line 541 of file anim.cpp.

void Stark::Resources::AnimSkeleton::removeFromItem ( Item item  )  [override, virtual]

Dissociate the animation from an item.

Reimplemented from Stark::Resources::Anim.

Definition at line 529 of file anim.cpp.

void Stark::Resources::AnimSkeleton::resetItem (  )  [override, virtual]

Remove this action animation for the item and select a new animation based on the item's current activity.

Reimplemented from Stark::Resources::Anim.

Definition at line 606 of file anim.cpp.

void Stark::Resources::AnimSkeleton::shouldResetItem ( bool  resetItem  )  [override, virtual]

When this animation is playing as an action should a new animation be chosen for the item as soon as this one completes based on the item's activity? This is true by default, but setting it to false allows scripts to chose precisely the new animation to play, and to start it in the same frame as this one is removed.

Reimplemented from Stark::Resources::Anim.

Definition at line 634 of file anim.cpp.


Member Data Documentation

Definition at line 330 of file anim.h.

Definition at line 317 of file anim.h.

Definition at line 316 of file anim.h.

Definition at line 324 of file anim.h.

Definition at line 325 of file anim.h.

Definition at line 321 of file anim.h.

Definition at line 319 of file anim.h.

Definition at line 320 of file anim.h.

Definition at line 331 of file anim.h.

Definition at line 327 of file anim.h.

Definition at line 323 of file anim.h.

Definition at line 328 of file anim.h.


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


Generated on Sat Mar 23 2019 05:09:08 for ResidualVM by doxygen 1.7.1
curved edge   curved edge