Dali 3D User Interface Engine
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions
Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType > Class Template Reference

An animator for a specific property type PropertyType. More...

#include <scene-graph-animator.h>

Inheritance diagram for Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >:
Collaboration graph
[legend]

Public Member Functions

virtual ~Animator ()
 Virtual destructor. More...
 
virtual void ConnectToSceneGraph ()
 Called when Animator is added to the scene-graph in update-thread. More...
 
virtual void PropertyOwnerConnected (PropertyOwner &owner)
 Called when mPropertyOwner is connected to the scene graph. More...
 
virtual void PropertyOwnerDisconnected (BufferIndex bufferIndex, PropertyOwner &owner)
 Called when mPropertyOwner is disconnected from the scene graph. More...
 
virtual void PropertyOwnerDestroyed (PropertyOwner &owner)
 Called shortly before mPropertyOwner is destroyed. More...
 
virtual void Update (BufferIndex bufferIndex, float progress, bool bake)
 From AnimatorBase. More...
 
virtual bool Orphan ()
 From AnimatorBase. More...
 
- Public Member Functions inherited from Dali::Internal::SceneGraph::AnimatorBase
 AnimatorBase ()
 Constructor. More...
 
virtual ~AnimatorBase ()
 Virtual destructor. More...
 
void SetDuration (float seconds)
 Set the duration of the animator. More...
 
float GetDuration ()
 Retrieve the duration of the animator. More...
 
void SetInitialDelay (float seconds)
 Set the delay before the animator should take effect. More...
 
float GetInitialDelay ()
 Retrieve the initial delay of the animator. More...
 
void SetAlphaFunction (const AlphaFunction &alphaFunction)
 Set the alpha function for an animator. More...
 
AlphaFunction GetAlphaFunction () const
 Retrieve the alpha function of an animator. More...
 
float ApplyAlphaFunction (float progress) const
 
void SetDisconnectAction (Dali::Animation::EndAction action)
 Whether to bake the animation if attached property owner is disconnected. More...
 
Dali::Animation::EndAction GetDisconnectAction () const
 Retrieve the disconnect action of an animator. More...
 
void SetActive (bool active)
 Whether the animator is active or not. More...
 
bool GetActive () const
 Retrieve whether the animator has been set to active or not. More...
 
bool IsEnabled () const
 

Static Public Member Functions

static AnimatorBaseNew (const PropertyOwner &propertyOwner, const PropertyBase &property, AnimatorFunctionBase *animatorFunction, AlphaFunction alphaFunction, const TimePeriod &timePeriod)
 Construct a new property animator. More...
 

Protected Attributes

PropertyOwnermPropertyOwner
 
PropertyAccessorType mPropertyAccessor
 
AnimatorFunctionBasemAnimatorFunction
 
float mCurrentProgress
 
- Protected Attributes inherited from Dali::Internal::SceneGraph::AnimatorBase
float mDurationSeconds
 
float mInitialDelaySeconds
 
AlphaFunction mAlphaFunction
 
Dali::Animation::EndAction mDisconnectAction
 EndAction to apply when target object gets disconnected from the stage. More...
 
bool mActive:1
 Animator is "active" while it's running. More...
 
bool mEnabled:1
 Animator is "enabled" while its target object is valid and on the stage. More...
 
bool mConnectedToSceneGraph:1
 True if ConnectToSceneGraph() has been called in update-thread. More...
 

Private Member Functions

 Animator (PropertyOwner *propertyOwner, PropertyBase *property, AnimatorFunctionBase *animatorFunction)
 Private constructor; see also Animator::New(). More...
 
 Animator (const Animator &)
 
Animatoroperator= (const Animator &)
 

Additional Inherited Members

- Public Types inherited from Dali::Internal::SceneGraph::AnimatorBase
typedef float(* AlphaFunc )(float progress)
 Definition of an alpha function. More...
 
- Protected Member Functions inherited from Dali::Internal::SceneGraph::AnimatorBase
float EvaluateCubicBezier (float p0, float p1, float t) const
 Helper function to evaluate a cubic bezier curve assuming first point is at 0.0 and last point is at 1.0. More...
 

Detailed Description

template<typename PropertyType, typename PropertyAccessorType>
class Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >

An animator for a specific property type PropertyType.

Definition at line 372 of file scene-graph-animator.h.

Constructor & Destructor Documentation

template<typename PropertyType, typename PropertyAccessorType>
virtual Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::~Animator ( )
inlinevirtual
template<typename PropertyType, typename PropertyAccessorType>
Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::Animator ( PropertyOwner propertyOwner,
PropertyBase property,
AnimatorFunctionBase animatorFunction 
)
inlineprivate

Private constructor; see also Animator::New().

Definition at line 498 of file scene-graph-animator.h.

template<typename PropertyType, typename PropertyAccessorType>
Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::Animator ( const Animator< PropertyType, PropertyAccessorType > &  )
private

Member Function Documentation

template<typename PropertyType, typename PropertyAccessorType>
virtual void Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::ConnectToSceneGraph ( )
inlinevirtual
template<typename PropertyType, typename PropertyAccessorType>
static AnimatorBase* Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::New ( const PropertyOwner propertyOwner,
const PropertyBase property,
AnimatorFunctionBase animatorFunction,
AlphaFunction  alphaFunction,
const TimePeriod timePeriod 
)
inlinestatic

Construct a new property animator.

Parameters
[in]propertyThe animatable property; only valid while the Animator is attached.
[in]animatorFunctionThe function used to animate the property.
[in]alphaFunctionThe alpha function to apply.
[in]timePeriodThe time period of this animation.
Returns
A newly allocated animator.

Definition at line 384 of file scene-graph-animator.h.

References Dali::TimePeriod::delaySeconds, and Dali::TimePeriod::durationSeconds.

Referenced by Dali::Internal::AnimatorConnector< PropertyType >::CreateAnimator().

Here is the caller graph for this function:

template<typename PropertyType, typename PropertyAccessorType>
Animator& Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::operator= ( const Animator< PropertyType, PropertyAccessorType > &  )
private
template<typename PropertyType, typename PropertyAccessorType>
virtual bool Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::Orphan ( )
inlinevirtual
template<typename PropertyType, typename PropertyAccessorType>
virtual void Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::PropertyOwnerConnected ( PropertyOwner owner)
inlinevirtual

Called when mPropertyOwner is connected to the scene graph.

Implements Dali::Internal::SceneGraph::PropertyOwner::Observer.

Definition at line 432 of file scene-graph-animator.h.

References Dali::Internal::SceneGraph::AnimatorBase::mEnabled.

template<typename PropertyType, typename PropertyAccessorType>
virtual void Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::PropertyOwnerDestroyed ( PropertyOwner owner)
inlinevirtual
template<typename PropertyType, typename PropertyAccessorType>
virtual void Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::PropertyOwnerDisconnected ( BufferIndex  bufferIndex,
PropertyOwner owner 
)
inlinevirtual
template<typename PropertyType, typename PropertyAccessorType>
virtual void Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::Update ( BufferIndex  bufferIndex,
float  progress,
bool  bake 
)
inlinevirtual

Member Data Documentation

template<typename PropertyType, typename PropertyAccessorType>
AnimatorFunctionBase* Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::mAnimatorFunction
protected
template<typename PropertyType, typename PropertyAccessorType>
float Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::mCurrentProgress
protected
template<typename PropertyType, typename PropertyAccessorType>
PropertyAccessorType Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::mPropertyAccessor
protected
template<typename PropertyType, typename PropertyAccessorType>
PropertyOwner* Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::mPropertyOwner
protected

The documentation for this class was generated from the following file:
Dali Docs Home
Read more about Dali