Class representing a node property animation.
#include <scenetree/YiSceneNode.h>
Public Types | |
enum | Type { Type::PositionX, Type::PositionY, Type::PositionZ, Type::ScaleX, Type::ScaleY, Type::ScaleZ, Type::RotationX, Type::RotationY, Type::RotationZ, Type::Opacity, Type::SizeX, Type::SizeY, Type::SizeZ } |
Public Member Functions | |
PropertyAnimation (CYISceneNode *pNode, Type propetyType, float from, float to, uint32_t durMs, CYITimeInterpolator *pTimeInterpolator, bool dirtyLayout) | |
virtual | ~PropertyAnimation () |
void | Reconfigure (float from, float to, uint32_t durMs, CYITimeInterpolator *pTimeInterpolator, bool dirtyLayout) |
![]() | |
virtual | ~Listener () |
virtual void | OnAnimationBegin (CYIAnimation *pAnimation) |
Public Attributes | |
std::shared_ptr< CYISceneNodeProxy > | m_pNodeProxy |
Type | m_type |
CYIAnimation | m_animation |
float | m_from |
float | m_to |
bool | m_dirtyLayout |
Protected Member Functions | |
virtual void | OnAnimate (CYIAnimation *pAnim, float dataPosition) override |
virtual void | OnAnimationEnd (CYIAnimation *pAnim) override |
|
strong |
This enum contains a mapping of the node's properties for use with the node property animation system.
CYISceneNode::PropertyAnimation::PropertyAnimation | ( | CYISceneNode * | pNode, |
Type | propetyType, | ||
float | from, | ||
float | to, | ||
uint32_t | durMs, | ||
CYITimeInterpolator * | pTimeInterpolator, | ||
bool | dirtyLayout | ||
) |
Constructor that takes the node to animate, the property to animate, the range to animate between, the duration of the animation, a listener, a time interpolator and a flag indicating if the layout should be dirtied as part of the animation.
|
virtual |
|
overrideprotectedvirtual |
Called each step of the animation with the updated data position.
Reimplemented from CYIAnimation::Listener.
|
overrideprotectedvirtual |
Called upon completion of the animation.
Reimplemented from CYIAnimation::Listener.
void CYISceneNode::PropertyAnimation::Reconfigure | ( | float | from, |
float | to, | ||
uint32_t | durMs, | ||
CYITimeInterpolator * | pTimeInterpolator, | ||
bool | dirtyLayout | ||
) |
Reconfigure this property animation with new values. It will be ready to be restarted after this.
CYIAnimation CYISceneNode::PropertyAnimation::m_animation |
The animation driver
bool CYISceneNode::PropertyAnimation::m_dirtyLayout |
If true and the property affects layouts, the layout of the node will be dirtied.
float CYISceneNode::PropertyAnimation::m_from |
The initial value
std::shared_ptr<CYISceneNodeProxy> CYISceneNode::PropertyAnimation::m_pNodeProxy |
A proxy to the node whose property will be animated
float CYISceneNode::PropertyAnimation::m_to |
The final value
Type CYISceneNode::PropertyAnimation::m_type |
The property type to be animated