Classes¶
Animation/Keyframe Animation
Brief descriptions¶
Classes |
|
Base class for a keyframe. |
|
Provides a default implementation for an animation keyframe class. |
|
Detailed information¶
animation::KeyFrame¶
engine/core/modules/animation/include/nau/animation/data/keyframe.h
-
class KeyFrame : public virtual IRefCounted¶
Base class for a keyframe.
Subclassed by nau::animation::KeyFrameImpl< TValue >
animation::KeyFrameImpl¶
engine/core/modules/animation/include/nau/animation/data/keyframe.h
-
template<class TValue>
class KeyFrameImpl : public nau::animation::KeyFrame¶ Provides a default implementation for an animation keyframe class.
- Template Parameters:
TValue – Type of the animated parameter.
Public Functions
-
KeyFrameImpl() = default¶
Default constructor.
-
inline KeyFrameImpl(int frame, const TValue &value)¶
Initialization constructor.
- Parameters:
frame – [in] Index of the frame in the animation.
value – [in] Keyframe parameter value. See m_value
-
inline const TValue &getValue() const¶
Retrieves the keyframe parameter value.
See m_value.
- Returns:
Keyframe parameter value.
-
inline int getFrame() const¶
Retrieves the index of the keyframe among other (ordinary) frames.
animation::KeyFrameAnimationPlayer¶
engine/core/modules/animation/include/nau/animation/playback/animation_player_keyframe.h
-
class KeyFrameAnimationPlayer : public nau::animation::IAnimationPlayer¶
Public Functions
-
KeyFrameAnimationPlayer(AnimationInstance&)¶
-
virtual int getDurationInFrames() const override¶
Retrieves the animation duration in frames.
- Returns:
Number of frames composing the animation
-
virtual void play() override¶
Continues the animation playback.
-
virtual void pause(bool pause) override¶
Pauses or continues animation playback.
- Parameters:
pause – [in] Indicates whether the playback should be paused or not.
-
virtual void stop() override¶
Stops the playback and resets the animation to the first frame.
-
virtual bool isPaused() const override¶
Checks whether the playback is currently paused.
- Returns:
true
if the animation is on pause,false
otherwsise.
-
virtual bool isReversed() const override¶
Retrieves the playback direction.
- Returns:
true
if the playback direction is reversed,false
if it is forward.
-
virtual void reverse(bool reverse) override¶
Switches the direction of the playback.
- Parameters:
Indicates – [in] whether the playback direction should be forward or reversed.
-
virtual void setPlaybackSpeed(float speed) override¶
Changes the animation playback speed value.
- Parameters:
Value – [in] to assign.
-
virtual float getPlaybackSpeed() const override¶
Retrieves the animation playback speed.
- Returns:
Animation playback speed.
-
virtual int getPlayingFrame() const override¶
Retrieves the index of the animation frame that the player is currently playing.
- Returns:
Animation played frame.
-
virtual void jumpToFirstFrame() override¶
Changes the currently played frame to the first one.
-
virtual void jumpToLastFrame() override¶
Changes the currently played frame to the last one.
This effectively finishes the playback.
-
virtual void jumpToFrame(int frameNum) override¶
Changes the currently played frame to the specified index.
- Parameters:
Index – [in] of the frame the playback will continue with.
Protected Functions
-
AnimationState &getAnimState()¶
-
const AnimationState &getAnimState() const¶
-
AnimationInstance &getAnimInstance()¶
-
const AnimationInstance &getAnimInstance() const¶
Private Members
-
AnimationInstance &m_animInstance¶
-
KeyFrameAnimationPlayer(AnimationInstance&)¶
animation::BoolAnimation¶
engine/core/modules/animation/include/nau/animation/playback/animation_scalars.h
-
class BoolAnimation : public nau::animation::AnimationImpl<bool>¶
Protected Functions
-
virtual void apply(int frame, AnimationState &animationState) const override¶
Animates the target according to the current animation state.
- Parameters:
frame – [in] Current frame index.
animationState – [in] Animation state.
-
virtual void apply(int frame, AnimationState &animationState) const override¶
animation::IntegerAnimation¶
engine/core/modules/animation/include/nau/animation/playback/animation_scalars.h
-
class IntegerAnimation : public nau::animation::AnimationImpl<int>¶
Public Functions
-
virtual void apply(int frame, AnimationState &animationState) const override¶
Animates the target according to the current animation state.
- Parameters:
frame – [in] Current frame index.
animationState – [in] Animation state.
Protected Functions
-
int interpolate(int targetFrame, const TKeyFrame &from, const TKeyFrame &to, AnimationState &animationState) const¶
-
virtual void apply(int frame, AnimationState &animationState) const override¶
animation::FloatAnimation¶
engine/core/modules/animation/include/nau/animation/playback/animation_scalars.h
-
class FloatAnimation : public nau::animation::AnimationImpl<float>¶
Subclassed by nau::animation::OpacityAnimation
Public Functions
-
virtual void apply(int frame, AnimationState &animationState) const override¶
Animates the target according to the current animation state.
- Parameters:
frame – [in] Current frame index.
animationState – [in] Animation state.
Protected Functions
-
float interpolate(int targetFrame, const TKeyFrame &from, const TKeyFrame &to, AnimationState &animationState) const¶
-
virtual void apply(int frame, AnimationState &animationState) const override¶
animation::ScalarParameterAnimatable¶
engine/core/modules/animation/include/nau/animation/playback/animation_scalars.h
-
class ScalarParameterAnimatable : public nau::animation::IAnimatable¶
animation::TransformAnimation¶
engine/core/modules/animation/include/nau/animation/playback/animation_transforms.h
-
class TransformAnimation : public nau::animation::AnimationImpl<math::Transform>¶
Public Functions
-
virtual void apply(int frame, AnimationState &animationState) const override¶
Animates the target according to the current animation state.
- Parameters:
frame – [in] Current frame index.
animationState – [in] Animation state.
Private Functions
-
math::Transform interpolate(int targetFrame, const TKeyFrame &from, const TKeyFrame &to, AnimationState &animationState) const¶
-
virtual void apply(int frame, AnimationState &animationState) const override¶
animation::TranslationAnimation¶
engine/core/modules/animation/include/nau/animation/playback/animation_transforms.h
-
class TranslationAnimation : public nau::animation::AnimationImpl<math::vec3>¶
Public Functions
-
virtual void apply(int frame, AnimationState &animationState) const override¶
Animates the target according to the current animation state.
- Parameters:
frame – [in] Current frame index.
animationState – [in] Animation state.
Private Functions
-
math::vec3 interpolate(int targetFrame, const TKeyFrame &from, const TKeyFrame &to, AnimationState &animationState) const¶
-
virtual void apply(int frame, AnimationState &animationState) const override¶
animation::RotationAnimation¶
engine/core/modules/animation/include/nau/animation/playback/animation_transforms.h
-
class RotationAnimation : public nau::animation::AnimationImpl<math::quat>¶
Public Functions
-
virtual void apply(int frame, AnimationState &animationState) const override¶
Animates the target according to the current animation state.
- Parameters:
frame – [in] Current frame index.
animationState – [in] Animation state.
Private Functions
-
math::quat interpolate(int targetFrame, const TKeyFrame &from, const TKeyFrame &to, AnimationState &animationState) const¶
-
virtual void apply(int frame, AnimationState &animationState) const override¶
animation::ScaleAnimation¶
engine/core/modules/animation/include/nau/animation/playback/animation_transforms.h
-
class ScaleAnimation : public nau::animation::AnimationImpl<math::vec3>¶
Public Functions
-
virtual void apply(int frame, AnimationState &animationState) const override¶
Animates the target according to the current animation state.
- Parameters:
frame – [in] Current frame index.
animationState – [in] Animation state.
Private Functions
-
math::vec3 interpolate(int targetFrame, const TKeyFrame &from, const TKeyFrame &to, AnimationState &animationState) const¶
-
virtual void apply(int frame, AnimationState &animationState) const override¶
animation::SkewAnimation¶
engine/core/modules/animation/include/nau/animation/playback/animation_transforms.h
-
class SkewAnimation : public nau::animation::AnimationImpl<math::vec2>¶
Public Functions
-
virtual void apply(int frame, AnimationState &animationState) const override¶
Animates the target according to the current animation state.
- Parameters:
frame – [in] Current frame index.
animationState – [in] Animation state.
Private Functions
-
math::vec2 interpolate(int targetFrame, const TKeyFrame &from, const TKeyFrame &to, AnimationState &animationState) const¶
-
virtual void apply(int frame, AnimationState &animationState) const override¶