You.i Engine
CYISceneNode::PropertyAnimation Class Reference

Detailed Description

Class representing a node property animation.

#include <scenetree/YiSceneNode.h>

Inheritance diagram for CYISceneNode::PropertyAnimation:

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)
 
- Public Member Functions inherited from CYIAnimation::Listener
virtual ~Listener ()
 
virtual void OnAnimationBegin (CYIAnimation *pAnimation)
 

Public Attributes

std::shared_ptr< CYISceneNodeProxym_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
 

Member Enumeration Documentation

◆ Type

This enum contains a mapping of the node's properties for use with the node property animation system.

Enumerator
PositionX 

Represents the node's x position

PositionY 

Represents the node's y position

PositionZ 

Represents the node's z position

ScaleX 

Represents the node's x-axis scaling factor

ScaleY 

Represents the node's y-axis scaling factor

ScaleZ 

Represents the node's z-axis scaling factor

RotationX 

Represents the node's x-axis rotation factor (pitch)

RotationY 

Represents the node's y-axis rotation factor (yaw)

RotationZ 

Represents the node's z-axis rotation factor (roll)

Opacity 

Represents the node's opacity

SizeX 

Represents the node's x size

SizeY 

Represents the node's y size

SizeZ 

Represents the node's z size

Constructor & Destructor Documentation

◆ PropertyAnimation()

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.

◆ ~PropertyAnimation()

virtual CYISceneNode::PropertyAnimation::~PropertyAnimation ( )
virtual

Member Function Documentation

◆ OnAnimate()

virtual void CYISceneNode::PropertyAnimation::OnAnimate ( CYIAnimation pAnim,
float  dataPosition 
)
overrideprotectedvirtual

Called each step of the animation with the updated data position.

Reimplemented from CYIAnimation::Listener.

◆ OnAnimationEnd()

virtual void CYISceneNode::PropertyAnimation::OnAnimationEnd ( CYIAnimation pAnim)
overrideprotectedvirtual

Called upon completion of the animation.

Reimplemented from CYIAnimation::Listener.

◆ Reconfigure()

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.

Member Data Documentation

◆ m_animation

CYIAnimation CYISceneNode::PropertyAnimation::m_animation

The animation driver

◆ m_dirtyLayout

bool CYISceneNode::PropertyAnimation::m_dirtyLayout

If true and the property affects layouts, the layout of the node will be dirtied.

◆ m_from

float CYISceneNode::PropertyAnimation::m_from

The initial value

◆ m_pNodeProxy

std::shared_ptr<CYISceneNodeProxy> CYISceneNode::PropertyAnimation::m_pNodeProxy

A proxy to the node whose property will be animated

◆ m_to

float CYISceneNode::PropertyAnimation::m_to

The final value

◆ m_type

Type CYISceneNode::PropertyAnimation::m_type

The property type to be animated


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