Functions

Animation/Target

Brief descriptions

Functions

nau::animation::getAnimatableTarget(const IAnimatable::Ptr& fromTarget)

Casts IAnimatable object to a specified type.

nau::animation::getAnimatableTarget(AnimationState& state)

Retrieves the animated object from the animation state.

Detailed information

animation::getAnimatableTarget

engine/core/modules/animation/include/nau/animation/playback/animation.h

template<typename TInstance>
TInstance *nau::animation::getAnimatableTarget(const IAnimatable::Ptr &fromTarget)

Casts IAnimatable object to a specified type.

Template Parameters:

TInstance – Type of the animated object. Usually it is a game object component.

Parameters:

fromTarget[in] A pointer to the object implementing IAnimatable interface.

Returns:

Casted pointer to the object or nullptr on casting failure.


animation::getAnimatableTarget

engine/core/modules/animation/include/nau/animation/playback/animation.h

template<typename TInstance>
TInstance *nau::animation::getAnimatableTarget(AnimationState &state)

Retrieves the animated object from the animation state.

Parameters:

state[in] State of the animation associated with the requested object.

Returns:

A pointer to the animated object.