Dali 3D User Interface Engine
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
Dali::Internal::Animation Class Reference

Animation is a proxy for a SceneGraph::Animation object. More...

#include <animation-impl.h>

Inheritance diagram for Dali::Internal::Animation:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::Animation:
Collaboration graph
[legend]

Public Types

typedef Dali::Animation::EndAction EndAction
 
typedef
Dali::Animation::Interpolation 
Interpolation
 
typedef void(* FinishedCallback )(Object *object)
 

Public Member Functions

void SetDuration (float seconds)
 Set the duration of an animation. More...
 
float GetDuration () const
 Retrieve the duration of an animation. More...
 
void SetLooping (bool on)
 Set whether the animation will loop. More...
 
void SetLoopCount (int count)
 Enable looping for 'count' repeats. More...
 
int GetLoopCount ()
 Get the loop count. More...
 
int GetCurrentLoop ()
 Get the current loop count. More...
 
bool IsLooping () const
 Query whether the animation will loop. More...
 
void SetEndAction (EndAction action)
 Set the end action of the animation. More...
 
EndAction GetEndAction () const
 Returns the end action of the animation. More...
 
void SetDisconnectAction (EndAction action)
 Set the disconnect action. More...
 
EndAction GetDisconnectAction () const
 Returns the disconnect action. More...
 
void SetDefaultAlphaFunction (AlphaFunction alpha)
 Set the default alpha function for an animation. More...
 
AlphaFunction GetDefaultAlphaFunction () const
 Retrieve the default alpha function for an animation. More...
 
void Play ()
 Play the animation. More...
 
void PlayFrom (float progress)
 Play the animation from a given point. More...
 
void Pause ()
 Pause the animation. More...
 
Dali::Animation::State GetState () const
 Query the state of the animation. More...
 
void Stop ()
 Stop the animation. More...
 
void Clear ()
 Clear the animation. More...
 
bool HasFinished ()
 Query whether a Finished signal should be emitted for this animation. More...
 
Dali::Animation::AnimationSignalTypeFinishedSignal ()
 Connect to this signal to be notified when an Animation's animations have finished. More...
 
void EmitSignalFinish ()
 Emit the Finished signal. More...
 
void SetFinishedCallback (FinishedCallback callback, Object *object)
 This callback is intended for internal use only, to avoid the overhead of using a signal. More...
 
void AnimateBy (Property &target, Property::Value &relativeValue)
 Animate a property value by a relative amount. More...
 
void AnimateBy (Property &target, Property::Value &relativeValue, AlphaFunction alpha)
 Animate a property value by a relative amount. More...
 
void AnimateBy (Property &target, Property::Value &relativeValue, TimePeriod period)
 Animate a property value by a relative amount. More...
 
void AnimateBy (Property &target, Property::Value &relativeValue, AlphaFunction alpha, TimePeriod period)
 Animate a property value by a relative amount. More...
 
void AnimateTo (Property &target, Property::Value &destinationValue)
 Animate a property to a destination value. More...
 
void AnimateTo (Property &target, Property::Value &destinationValue, AlphaFunction alpha)
 Animate a property to a destination value. More...
 
void AnimateTo (Property &target, Property::Value &destinationValue, TimePeriod period)
 Animate a property to a destination value. More...
 
void AnimateTo (Property &target, Property::Value &destinationValue, AlphaFunction alpha, TimePeriod period)
 Animate a property to a destination value. More...
 
void AnimateTo (Object &targetObject, Property::Index targetPropertyIndex, int componentIndex, Property::Value &destinationValue, AlphaFunction alpha, TimePeriod period)
 Animate a property to a destination value. More...
 
void AnimateBetween (Property target, const KeyFrames &keyFrames)
 Animate a property between keyframes. More...
 
void AnimateBetween (Property target, const KeyFrames &keyFrames, Interpolation interpolation)
 Animate a property between keyframes. More...
 
void AnimateBetween (Property target, const KeyFrames &keyFrames, TimePeriod period)
 Animate a property between keyframes. More...
 
void AnimateBetween (Property target, const KeyFrames &keyFrames, TimePeriod period, Interpolation interpolation)
 Animate a property between keyframes. More...
 
void AnimateBetween (Property target, const KeyFrames &keyFrames, AlphaFunction alpha)
 Animate a property between keyframes. More...
 
void AnimateBetween (Property target, const KeyFrames &keyFrames, AlphaFunction alpha, Interpolation interpolation)
 Animate a property between keyframes. More...
 
void AnimateBetween (Property target, const KeyFrames &keyFrames, AlphaFunction alpha, TimePeriod period)
 Animate a property between keyframes. More...
 
void AnimateBetween (Property target, const KeyFrames &keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation)
 Animate a property between keyframes. More...
 
void Animate (Actor &actor, const Path &path, const Vector3 &forward)
 Animate an actor's position and orientation through a predefined path. More...
 
void Animate (Actor &actor, const Path &path, const Vector3 &forward, AlphaFunction alpha)
 Animate an actor's position and orientation through a predefined path. More...
 
void Animate (Actor &actor, const Path &path, const Vector3 &forward, TimePeriod period)
 Animate an actor's position and orientation through a predefined path. More...
 
void Animate (Actor &actor, const Path &path, const Vector3 &forward, AlphaFunction alpha, TimePeriod period)
 Animate an actor's position and orientation through a predefined path. More...
 
void Show (Actor &actor, float delaySeconds)
 Show an actor during the animation. More...
 
void Hide (Actor &actor, float delaySeconds)
 Hide an actor during the animation. More...
 
void SetCurrentProgress (float progress)
 
float GetCurrentProgress ()
 
void SetSpeedFactor (float factor)
 
float GetSpeedFactor () const
 
void SetPlayRange (const Vector2 &range)
 
Vector2 GetPlayRange () const
 
void AddAnimatorConnector (AnimatorConnectorBase *connector)
 Add an animator connector. More...
 
const SceneGraph::AnimationGetSceneObject ()
 Retrieve the SceneGraph::Animation object. More...
 
EventThreadServicesGetEventThreadServices ()
 Retrieve the event thread services object. More...
 
- Public Member Functions inherited from Dali::BaseObject
template<class T >
bool ConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, const T &functor)
 Connects a void() functor to a specified signal. More...
 
bool DoAction (const std::string &actionName, const Property::Map &attributes)
 Perform action on this object with the given action name and attributes. More...
 
const std::string & GetTypeName () const
 Returns the type name for the Handle. More...
 
bool GetTypeInfo (Dali::TypeInfo &info) const
 Returns the type info for the Handle. More...
 
bool DoConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, FunctorDelegate *functorDelegate)
 Not intended for application developers. More...
 
- Public Member Functions inherited from Dali::RefObject
void Reference ()
 Increment the object's reference count. More...
 
void Unreference ()
 Decrement the object's reference count. More...
 
int ReferenceCount ()
 Retrieve the object's reference count. More...
 

Static Public Member Functions

static AnimationPtr New (float durationSeconds)
 Create a new Animation object. More...
 
static bool DoConnectSignal (BaseObject *object, ConnectionTrackerInterface *tracker, const std::string &signalName, FunctorDelegate *functor)
 Connects a callback function with the object's signals. More...
 
static bool DoAction (BaseObject *object, const std::string &actionName, const Property::Map &attributes)
 Performs actions as requested using the action name. More...
 

Protected Member Functions

 Animation (EventThreadServices &eventThreadServices, AnimationPlaylist &playlist, float durationSeconds, EndAction endAction, EndAction disconnectAction, AlphaFunction defaultAlpha)
 Construct a new Animation. More...
 
void Initialize ()
 Second-phase constructor. More...
 
void CreateSceneObject ()
 Helper to create a scene-graph animation. More...
 
void DestroySceneObject ()
 Helper to create a scene-graph animation. More...
 
virtual ~Animation ()
 A reference counted object may only be deleted by calling Unreference() More...
 
- Protected Member Functions inherited from Dali::BaseObject
 BaseObject ()
 Default constructor. More...
 
virtual ~BaseObject ()
 A reference counted object may only be deleted by calling Unreference(). More...
 
void RegisterObject ()
 Registers the object as created with the Object registry. More...
 
void UnregisterObject ()
 Unregisters the object from Object registry. More...
 
- Protected Member Functions inherited from Dali::RefObject
 RefObject ()
 Default constructor. More...
 
virtual ~RefObject ()
 RefObject is intended as a base class. More...
 
 RefObject (const RefObject &rhs)
 Copy constructor. More...
 
RefObjectoperator= (const RefObject &rhs)
 Assignment operator. More...
 

Private Member Functions

void ExtendDuration (const TimePeriod &timePeriod)
 Extends the duration when an animator is added with TimePeriod that exceeds current duration. More...
 
 Animation (const Animation &)
 
Animationoperator= (const Animation &rhs)
 

Private Attributes

EventThreadServicesmEventThreadServices
 
AnimationPlaylistmPlaylist
 
const SceneGraph::AnimationmAnimation
 
int mNotificationCount
 Keep track of how many Finished signals have been emitted. More...
 
Dali::Animation::AnimationSignalType mFinishedSignal
 
FinishedCallback mFinishedCallback
 
ObjectmFinishedCallbackObject
 
AnimatorConnectorContainer mConnectors
 Owned by the Animation. More...
 
float mDurationSeconds
 
float mSpeedFactor
 
int mLoopCount
 
int mCurrentLoop
 
Vector2 mPlayRange
 
EndAction mEndAction
 
EndAction mDisconnectAction
 
AlphaFunction mDefaultAlpha
 
Dali::Animation::State mState
 

Detailed Description

Animation is a proxy for a SceneGraph::Animation object.

The UpdateManager owns the Animation object, but the lifetime of the animation is indirectly controlled by the Animation.

Definition at line 59 of file animation-impl.h.

Member Typedef Documentation

Definition at line 63 of file animation-impl.h.

typedef void(* Dali::Internal::Animation::FinishedCallback)(Object *object)

Definition at line 66 of file animation-impl.h.

Definition at line 64 of file animation-impl.h.

Constructor & Destructor Documentation

Dali::Internal::Animation::Animation ( EventThreadServices eventThreadServices,
AnimationPlaylist playlist,
float  durationSeconds,
EndAction  endAction,
EndAction  disconnectAction,
AlphaFunction  defaultAlpha 
)
protected

Construct a new Animation.

Parameters
[in]eventThreadServicesThe interface for sending messages to the scene graph
[in]playlistThe list of currently playing animations.
[in]durationSecondsThe duration of the animation in seconds.
[in]endActionThe action to perform when the animation ends.
[in]disconnectActionThe action to perform when the property owner of an animator is disconnected.
[in]defaultAlphaThe default alpha function to apply to animators.

Definition at line 116 of file animation-impl.cpp.

Referenced by New().

Here is the caller graph for this function:

Dali::Internal::Animation::~Animation ( )
protectedvirtual

A reference counted object may only be deleted by calling Unreference()

Definition at line 145 of file animation-impl.cpp.

References Dali::Internal::AnimationPlaylist::AnimationDestroyed(), DestroySceneObject(), Dali::Internal::Stage::IsInstalled(), mPlaylist, and Dali::BaseObject::UnregisterObject().

Here is the call graph for this function:

Dali::Internal::Animation::Animation ( const Animation )
private

Member Function Documentation

void Dali::Internal::Animation::AddAnimatorConnector ( AnimatorConnectorBase connector)

Add an animator connector.

Parameters
[in]connectorThe animator connector.

Definition at line 815 of file animation-impl.cpp.

References DALI_ASSERT_DEBUG, mConnectors, Dali::Vector< T, IsTrivialType >::PushBack(), and Dali::Internal::AnimatorConnectorBase::SetParent().

Referenced by Animate(), AnimateBetween(), AnimateBy(), AnimateTo(), Hide(), and Show().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Animation::Animate ( Actor actor,
const Path path,
const Vector3 forward 
)

Animate an actor's position and orientation through a predefined path.

The actor will rotate to orient the supplied forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.

.0

Parameters
[in]actorThe actor to animate
[in]pathThe path. It defines position and orientation
[in]forwardThe vector (in local space coordinate system) that will be oriented with the path's tangent direction

Definition at line 824 of file animation-impl.cpp.

References mDefaultAlpha, and mDurationSeconds.

Referenced by Animate().

Here is the caller graph for this function:

void Dali::Internal::Animation::Animate ( Actor actor,
const Path path,
const Vector3 forward,
AlphaFunction  alpha 
)

Animate an actor's position and orientation through a predefined path.

The actor will rotate to orient the supplied forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.

.0

Parameters
[in]actorThe actor to animate
[in]pathThe path. It defines position and orientation
[in]forwardThe vector (in local space coordinate system) that will be oriented with the path's tangent direction
[in]alphaThe alpha function to apply.

Definition at line 829 of file animation-impl.cpp.

References Animate(), and mDurationSeconds.

Here is the call graph for this function:

void Dali::Internal::Animation::Animate ( Actor actor,
const Path path,
const Vector3 forward,
TimePeriod  period 
)

Animate an actor's position and orientation through a predefined path.

The actor will rotate to orient the supplied forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.

.0

Parameters
[in]actorThe actor to animate
[in]pathThe path. It defines position and orientation
[in]forwardThe vector (in local space coordinate system) that will be oriented with the path's tangent direction
[in]periodThe effect will occur during this time period.

Definition at line 834 of file animation-impl.cpp.

References Animate(), and mDefaultAlpha.

Here is the call graph for this function:

void Dali::Internal::Animation::Animate ( Actor actor,
const Path path,
const Vector3 forward,
AlphaFunction  alpha,
TimePeriod  period 
)

Animate an actor's position and orientation through a predefined path.

The actor will rotate to orient the supplied forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.

.0

Parameters
[in]actorThe actor to animate
[in]pathThe path. It defines position and orientation
[in]forwardThe vector (in local space coordinate system) that will be oriented with the path's tangent direction
[in]alphaThe alpha function to apply.
[in]periodThe effect will occur during this time period.

Definition at line 839 of file animation-impl.cpp.

References AddAnimatorConnector(), Dali::Internal::Path::Clone(), ExtendDuration(), Dali::Property::INVALID_COMPONENT_INDEX, Dali::Actor::Property::ORIENTATION, Dali::Actor::Property::POSITION, and Dali::Vector3::ZERO.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateBetween ( Property  target,
const KeyFrames keyFrames 
)

Animate a property between keyframes.

.0

Parameters
[in]targetThe target object property to animate.
[in]keyFramesThe set of time/value pairs between which to animate.

Definition at line 604 of file animation-impl.cpp.

References Dali::Internal::anonymous_namespace{animation-impl.cpp}::DEFAULT_INTERPOLATION(), mDefaultAlpha, and mDurationSeconds.

Referenced by AnimateBetween().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Animation::AnimateBetween ( Property  target,
const KeyFrames keyFrames,
Interpolation  interpolation 
)

Animate a property between keyframes.

.0

Parameters
[in]targetThe target object property to animate
[in]keyFramesThe set of time/value pairs between which to animate.
[in]interpolationThe method used to interpolate between values.

Definition at line 609 of file animation-impl.cpp.

References AnimateBetween(), mDefaultAlpha, and mDurationSeconds.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateBetween ( Property  target,
const KeyFrames keyFrames,
TimePeriod  period 
)

Animate a property between keyframes.

.0

Parameters
[in]targetThe target object property to animate.
[in]keyFramesThe set of time/value pairs between which to animate.
[in]periodThe effect will occur during this time period.

Definition at line 614 of file animation-impl.cpp.

References AnimateBetween(), Dali::Internal::anonymous_namespace{animation-impl.cpp}::DEFAULT_INTERPOLATION(), and mDefaultAlpha.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateBetween ( Property  target,
const KeyFrames keyFrames,
TimePeriod  period,
Interpolation  interpolation 
)

Animate a property between keyframes.

.0

Parameters
[in]targetThe target object property to animate
[in]keyFramesThe set of time/value pairs between which to animate.
[in]periodThe effect will occur duing this time period.
[in]interpolationThe method used to interpolate between values.

Definition at line 619 of file animation-impl.cpp.

References AnimateBetween(), and mDefaultAlpha.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateBetween ( Property  target,
const KeyFrames keyFrames,
AlphaFunction  alpha 
)

Animate a property between keyframes.

.0

Parameters
[in]targetThe target object property to animate.
[in]keyFramesThe set of time/value pairs between which to animate.
[in]alphaThe alpha function to apply.

Definition at line 624 of file animation-impl.cpp.

References AnimateBetween(), Dali::Internal::anonymous_namespace{animation-impl.cpp}::DEFAULT_INTERPOLATION(), and mDurationSeconds.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateBetween ( Property  target,
const KeyFrames keyFrames,
AlphaFunction  alpha,
Interpolation  interpolation 
)

Animate a property between keyframes.

.0

Parameters
[in]targetThe target object property to animate
[in]keyFramesThe set of time/value pairs between which to animate.
[in]alphaThe alpha function to apply.
[in]interpolationThe method used to interpolate between values.

Definition at line 629 of file animation-impl.cpp.

References AnimateBetween(), and mDurationSeconds.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateBetween ( Property  target,
const KeyFrames keyFrames,
AlphaFunction  alpha,
TimePeriod  period 
)

Animate a property between keyframes.

.0

Parameters
[in]targetThe target object property to animate.
[in]keyFramesThe set of time/value pairs between which to animate.
[in]alphaThe alpha function to apply.
[in]periodThe effect will occur during this time period.

Definition at line 634 of file animation-impl.cpp.

References AnimateBetween(), and Dali::Internal::anonymous_namespace{animation-impl.cpp}::DEFAULT_INTERPOLATION().

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateBetween ( Property  target,
const KeyFrames keyFrames,
AlphaFunction  alpha,
TimePeriod  period,
Interpolation  interpolation 
)

Animate a property between keyframes.

.0

Parameters
[in]targetThe target object property to animate
[in]keyFramesThe set of time/value pairs between which to animate.
[in]alphaThe alpha function to apply to the overall progress.
[in]periodThe effect will occur duing this time period.
[in]interpolationThe method used to interpolate between values.

Definition at line 639 of file animation-impl.cpp.

References AddAnimatorConnector(), Dali::Property::BOOLEAN, Dali::Internal::KeyFrameBaseSpec< V >::Clone(), Dali::Property::componentIndex, ExtendDuration(), Dali::Property::FLOAT, Dali::GetImplementation(), Dali::Internal::GetSpecialization(), Dali::Internal::KeyFrames::GetType(), Dali::Property::INTEGER, Dali::Property::object, Dali::Property::propertyIndex, Dali::Property::ROTATION, Dali::Property::VECTOR2, Dali::Property::VECTOR3, and Dali::Property::VECTOR4.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateBy ( Property target,
Property::Value relativeValue 
)

Animate a property value by a relative amount.

The default alpha function will be used. The effect will start & end when the animation begins & ends. .0

Parameters
[in]targetThe target object/property to animate.
[in]relativeValueThe property value will change by this amount.

Definition at line 327 of file animation-impl.cpp.

References mDefaultAlpha, and mDurationSeconds.

Referenced by AnimateBy().

Here is the caller graph for this function:

void Dali::Internal::Animation::AnimateBy ( Property target,
Property::Value relativeValue,
AlphaFunction  alpha 
)

Animate a property value by a relative amount.

The effect will start & end when the animation begins & ends. .0

Parameters
[in]targetThe target object/property to animate.
[in]relativeValueThe property value will change by this amount.
[in]alphaThe alpha function to apply.

Definition at line 332 of file animation-impl.cpp.

References AnimateBy(), and mDurationSeconds.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateBy ( Property target,
Property::Value relativeValue,
TimePeriod  period 
)

Animate a property value by a relative amount.

The default alpha function will be used. .0

Parameters
[in]targetThe target object/property to animate.
[in]relativeValueThe property value will increase/decrease by this amount.
[in]periodThe effect will occur during this time period.

Definition at line 337 of file animation-impl.cpp.

References AnimateBy(), and mDefaultAlpha.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateBy ( Property target,
Property::Value relativeValue,
AlphaFunction  alpha,
TimePeriod  period 
)

Animate a property value by a relative amount.

.0

Parameters
[in]targetThe target object/property to animate.
[in]relativeValueThe property value will increase/decrease by this amount.
[in]alphaThe alpha function to apply.
[in]periodThe effect will occur during this time period.

Definition at line 342 of file animation-impl.cpp.

References AddAnimatorConnector(), Dali::AngleAxis::angle, Dali::AngleAxis::axis, Dali::Property::BOOLEAN, Dali::Property::componentIndex, DALI_ASSERT_ALWAYS, ExtendDuration(), Dali::Property::FLOAT, Dali::GetImplementation(), Dali::Property::INTEGER, Dali::Property::object, Dali::Property::propertyIndex, Dali::Property::ROTATION, Dali::Property::VECTOR2, Dali::Property::VECTOR3, and Dali::Property::VECTOR4.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateTo ( Property target,
Property::Value destinationValue 
)

Animate a property to a destination value.

The default alpha function will be used. The effect will start & end when the animation begins & ends. .0

Parameters
[in]targetThe target object/property to animate.
[in]destinationValueThe destination value.

Definition at line 435 of file animation-impl.cpp.

References mDefaultAlpha, and mDurationSeconds.

Referenced by AnimateTo().

Here is the caller graph for this function:

void Dali::Internal::Animation::AnimateTo ( Property target,
Property::Value destinationValue,
AlphaFunction  alpha 
)

Animate a property to a destination value.

The effect will start & end when the animation begins & ends. .0

Parameters
[in]targetThe target object/property to animate.
[in]destinationValueThe destination value.
[in]alphaThe alpha function to apply.

Definition at line 440 of file animation-impl.cpp.

References AnimateTo(), and mDurationSeconds.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateTo ( Property target,
Property::Value destinationValue,
TimePeriod  period 
)

Animate a property to a destination value.

The default alpha function will be used. .0

Parameters
[in]targetThe target object/property to animate.
[in]destinationValueThe destination value.
[in]periodThe effect will occur during this time period.

Definition at line 445 of file animation-impl.cpp.

References AnimateTo(), and mDefaultAlpha.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateTo ( Property target,
Property::Value destinationValue,
AlphaFunction  alpha,
TimePeriod  period 
)

Animate a property to a destination value.

.0

Parameters
[in]targetThe target object/property to animate.
[in]destinationValueThe destination value.
[in]alphaThe alpha function to apply.
[in]periodThe effect will occur during this time period.

Definition at line 450 of file animation-impl.cpp.

References AnimateTo(), Dali::Property::componentIndex, Dali::GetImplementation(), Dali::Property::object, and Dali::Property::propertyIndex.

Here is the call graph for this function:

void Dali::Internal::Animation::AnimateTo ( Object targetObject,
Property::Index  targetPropertyIndex,
int  componentIndex,
Property::Value destinationValue,
AlphaFunction  alpha,
TimePeriod  period 
)

Animate a property to a destination value.

Parameters
[in]targetObjectThe target object to animate.
[in]targetPropertyIndexThe index of the target property.
[in]componentIndexIndex to a sub component of a property, for use with Vector2, Vector3 and Vector4
[in]destinationValueThe destination value.
[in]alphaThe alpha function to apply.
[in]periodThe effect will occur during this time period.

Definition at line 457 of file animation-impl.cpp.

References AddAnimatorConnector(), Dali::Property::BOOLEAN, DALI_ASSERT_ALWAYS, ExtendDuration(), Dali::Property::FLOAT, Dali::Internal::Object::GetPropertyType(), Dali::Property::INTEGER, Dali::Property::INVALID_COMPONENT_INDEX, Dali::Internal::Actor::NotifyPositionAnimation(), Dali::Internal::Actor::NotifySizeAnimation(), Dali::Actor::Property::POSITION, Dali::Actor::Property::POSITION_X, Dali::Actor::Property::POSITION_Y, Dali::Actor::Property::POSITION_Z, Dali::Property::ROTATION, Dali::Actor::Property::SIZE, Dali::Actor::Property::SIZE_DEPTH, Dali::Actor::Property::SIZE_HEIGHT, Dali::Actor::Property::SIZE_WIDTH, Dali::Property::VECTOR2, Dali::Property::VECTOR3, and Dali::Property::VECTOR4.

Here is the call graph for this function:

void Dali::Internal::Animation::Clear ( )

Clear the animation.

This disconnects any objects that were being animated, effectively stopping the animation. .0

Definition at line 309 of file animation-impl.cpp.

References Dali::OwnerContainer< T >::Clear(), CreateSceneObject(), DALI_ASSERT_DEBUG, DestroySceneObject(), mAnimation, mConnectors, mNotificationCount, mPlaylist, and Dali::Internal::AnimationPlaylist::OnClear().

Here is the call graph for this function:

void Dali::Internal::Animation::CreateSceneObject ( )
protected

Helper to create a scene-graph animation.

Definition at line 159 of file animation-impl.cpp.

References Dali::Internal::SceneGraph::AddAnimationMessage(), DALI_ASSERT_DEBUG, Dali::Internal::EventThreadServices::GetUpdateManager(), mAnimation, mDisconnectAction, mDurationSeconds, mEndAction, mEventThreadServices, mLoopCount, mPlayRange, mSpeedFactor, and Dali::Internal::SceneGraph::Animation::New().

Referenced by Clear(), and Initialize().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Animation::DestroySceneObject ( )
protected

Helper to create a scene-graph animation.

Definition at line 173 of file animation-impl.cpp.

References Dali::Internal::EventThreadServices::GetUpdateManager(), mAnimation, mEventThreadServices, and Dali::Internal::SceneGraph::RemoveAnimationMessage().

Referenced by Clear(), and ~Animation().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::Animation::DoAction ( BaseObject object,
const std::string &  actionName,
const Property::Map attributes 
)
static

Performs actions as requested using the action name.

Parameters
[in]objectThe object on which to perform the action.
[in]actionNameThe action to perform.
[in]attributesThe attributes with which to perfrom this action.
Returns
true if action was done

Definition at line 890 of file animation-impl.cpp.

References Dali::Property::FLOAT, Pause(), Play(), SetDuration(), Stop(), and Dali::Property::Value().

Here is the call graph for this function:

bool Dali::Internal::Animation::DoConnectSignal ( BaseObject object,
ConnectionTrackerInterface tracker,
const std::string &  signalName,
FunctorDelegate functor 
)
static

Connects a callback function with the object's signals.

Parameters
[in]objectThe object providing the signal.
[in]trackerUsed to disconnect the signal.
[in]signalNameThe signal to connect to.
[in]functorA newly allocated FunctorDelegate.
Returns
True if the signal was connected.
Postcondition
If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.

Definition at line 791 of file animation-impl.cpp.

References FinishedSignal().

Here is the call graph for this function:

void Dali::Internal::Animation::EmitSignalFinish ( )

Emit the Finished signal.

Definition at line 776 of file animation-impl.cpp.

References mFinishedCallback, mFinishedCallbackObject, and mFinishedSignal.

void Dali::Internal::Animation::ExtendDuration ( const TimePeriod timePeriod)
private

Extends the duration when an animator is added with TimePeriod that exceeds current duration.

Parameters
[in]timePeriodThe time period for an animator.

Definition at line 941 of file animation-impl.cpp.

References Dali::TimePeriod::delaySeconds, Dali::TimePeriod::durationSeconds, mDurationSeconds, and SetDuration().

Referenced by Animate(), AnimateBetween(), AnimateBy(), AnimateTo(), Hide(), and Show().

Here is the call graph for this function:

Here is the caller graph for this function:

Dali::Animation::AnimationSignalType & Dali::Internal::Animation::FinishedSignal ( )

Connect to this signal to be notified when an Animation's animations have finished.

.0

Returns
A signal object to connect with.

Definition at line 771 of file animation-impl.cpp.

References mFinishedSignal.

Referenced by DoConnectSignal().

Here is the caller graph for this function:

int Dali::Internal::Animation::GetCurrentLoop ( )

Get the current loop count.

A value 0 to GetLoopCount() indicating the current loop count when looping.

.20

Returns
The current number of loops that have occured.

Definition at line 223 of file animation-impl.cpp.

References mCurrentLoop.

float Dali::Internal::Animation::GetCurrentProgress ( )

Definition at line 931 of file animation-impl.cpp.

References Dali::Internal::SceneGraph::Animation::GetCurrentProgress(), and mAnimation.

Here is the call graph for this function:

AlphaFunction Dali::Internal::Animation::GetDefaultAlphaFunction ( ) const
inline

Retrieve the default alpha function for an animation.

.0

Returns
The default alpha function.

Definition at line 141 of file animation-impl.h.

References mDefaultAlpha.

Dali::Animation::EndAction Dali::Internal::Animation::GetDisconnectAction ( ) const

Returns the disconnect action.

.0

Returns
The disconnect action.

Definition at line 257 of file animation-impl.cpp.

References mDisconnectAction.

float Dali::Internal::Animation::GetDuration ( ) const

Retrieve the duration of an animation.

.0

Returns
The duration in seconds.

Definition at line 198 of file animation-impl.cpp.

References mDurationSeconds.

Dali::Animation::EndAction Dali::Internal::Animation::GetEndAction ( ) const

Returns the end action of the animation.

.0

Returns
The end action.

Definition at line 242 of file animation-impl.cpp.

References mEndAction.

EventThreadServices& Dali::Internal::Animation::GetEventThreadServices ( )
inline

Retrieve the event thread services object.

Returns
The interface for sending messages to the scene graph

Definition at line 394 of file animation-impl.h.

References mEventThreadServices.

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

Here is the caller graph for this function:

int Dali::Internal::Animation::GetLoopCount ( )

Get the loop count.

A zero is the same as SetLooping(true) ie repeat forever. The loop count is initially 1 for play once.

.20

Returns
The number of times to loop.

Definition at line 218 of file animation-impl.cpp.

References mLoopCount.

Vector2 Dali::Internal::Animation::GetPlayRange ( ) const

Definition at line 985 of file animation-impl.cpp.

References mPlayRange.

const SceneGraph::Animation* Dali::Internal::Animation::GetSceneObject ( )
inline

Retrieve the SceneGraph::Animation object.

Returns
The animation.

Definition at line 385 of file animation-impl.h.

References mAnimation.

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

Here is the caller graph for this function:

float Dali::Internal::Animation::GetSpeedFactor ( ) const

Definition at line 960 of file animation-impl.cpp.

References mSpeedFactor.

Dali::Animation::State Dali::Internal::Animation::GetState ( ) const

Query the state of the animation.

.21

Returns
The Animation::State

Definition at line 296 of file animation-impl.cpp.

References mState.

bool Dali::Internal::Animation::HasFinished ( )

Query whether a Finished signal should be emitted for this animation.

This should only be called by NotificationManager, before signals are emitted.

Postcondition
HasFinished() will return false on subsequent calls, until the animation is replayed to completion.

Definition at line 750 of file animation-impl.cpp.

References Dali::Internal::SceneGraph::Animation::GetCurrentLoop(), Dali::Internal::SceneGraph::Animation::GetPlayedCount(), mAnimation, mCurrentLoop, mNotificationCount, mState, and Dali::Animation::STOPPED.

Referenced by Dali::Internal::AnimationPlaylist::NotifyCompleted().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Animation::Hide ( Actor actor,
float  delaySeconds 
)

Hide an actor during the animation.

.0

Parameters
[in]actorThe actor to animate.
[in]delaySecondsThe initial delay from the start of the animation.

Definition at line 878 of file animation-impl.cpp.

References AddAnimatorConnector(), ExtendDuration(), Dali::Internal::HIDE_VALUE, Dali::Property::INVALID_COMPONENT_INDEX, mDefaultAlpha, and Dali::Actor::Property::VISIBLE.

Here is the call graph for this function:

void Dali::Internal::Animation::Initialize ( void  )
protected

Second-phase constructor.

Definition at line 135 of file animation-impl.cpp.

References Dali::Internal::AnimationPlaylist::AnimationCreated(), CreateSceneObject(), mPlaylist, and Dali::BaseObject::RegisterObject().

Here is the call graph for this function:

bool Dali::Internal::Animation::IsLooping ( ) const

Query whether the animation will loop.

.0

Returns
True if the animation will loop.

Definition at line 228 of file animation-impl.cpp.

References mLoopCount.

AnimationPtr Dali::Internal::Animation::New ( float  durationSeconds)
static

Create a new Animation object.

Parameters
[in]durationSecondsThe duration of the animation.
Returns
A smart-pointer to the newly allocated Animation.

Definition at line 89 of file animation-impl.cpp.

References Animation(), DALI_LOG_WARNING, Dali::Internal::anonymous_namespace{animation-impl.cpp}::DEFAULT_ALPHA_FUNCTION, Dali::Internal::anonymous_namespace{animation-impl.cpp}::DEFAULT_DISCONNECT_ACTION(), Dali::Internal::anonymous_namespace{animation-impl.cpp}::DEFAULT_END_ACTION(), Dali::Internal::Stage::GetAnimationPlaylist(), and Dali::Internal::Stage::GetCurrent().

Referenced by Dali::Animation::New().

Here is the call graph for this function:

Here is the caller graph for this function:

Animation& Dali::Internal::Animation::operator= ( const Animation rhs)
private
void Dali::Internal::Animation::Pause ( )

Pause the animation.

.0

Definition at line 288 of file animation-impl.cpp.

References mAnimation, mEventThreadServices, mState, Dali::Internal::SceneGraph::PauseAnimationMessage(), and Dali::Animation::PAUSED.

Referenced by DoAction().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Animation::Play ( )

Play the animation.

.0

Definition at line 263 of file animation-impl.cpp.

References mAnimation, mEventThreadServices, mPlaylist, mState, Dali::Internal::AnimationPlaylist::OnPlay(), Dali::Internal::SceneGraph::PlayAnimationMessage(), and Dali::Animation::PLAYING.

Referenced by DoAction().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Animation::PlayFrom ( float  progress)

Play the animation from a given point.

The progress must be in the 0-1 interval or in the play range interval if defined ( See Animation::SetPlayRange ), otherwise, it will be ignored.

.0

Parameters
[in]progressA value between [0,1], or between the play range if specified, form where the animation should start playing

Definition at line 274 of file animation-impl.cpp.

References mAnimation, mEventThreadServices, mPlaylist, mPlayRange, mState, Dali::Internal::AnimationPlaylist::OnPlay(), Dali::Internal::SceneGraph::PlayAnimationFromMessage(), Dali::Animation::PLAYING, Dali::Vector2::x, and Dali::Vector2::y.

Here is the call graph for this function:

void Dali::Internal::Animation::SetCurrentProgress ( float  progress)

Definition at line 922 of file animation-impl.cpp.

References mAnimation, mEventThreadServices, mPlayRange, Dali::Internal::SceneGraph::SetCurrentProgressMessage(), Dali::Vector2::x, and Dali::Vector2::y.

Here is the call graph for this function:

void Dali::Internal::Animation::SetDefaultAlphaFunction ( AlphaFunction  alpha)
inline

Set the default alpha function for an animation.

This is applied to individual property animations, if no further alpha functions are supplied. .0

Parameters
[in]alphaThe default alpha function.

Definition at line 133 of file animation-impl.h.

References mDefaultAlpha.

void Dali::Internal::Animation::SetDisconnectAction ( EndAction  action)

Set the disconnect action.

If any of the animated property owners are disconnected from the stage while the animation is being played, then this action is performed. Default action is to BakeFinal. .0

Parameters
[in]disconnectActionThe disconnect action.

Definition at line 248 of file animation-impl.cpp.

References mAnimation, mDisconnectAction, mEventThreadServices, and Dali::Internal::SceneGraph::SetDisconnectActionMessage().

Here is the call graph for this function:

void Dali::Internal::Animation::SetDuration ( float  seconds)

Set the duration of an animation.

.0

Parameters
[in]secondsThe duration in seconds.
Precondition
DurationSeconds must be greater than zero.

Definition at line 183 of file animation-impl.cpp.

References DALI_LOG_WARNING, mAnimation, mDurationSeconds, mEventThreadServices, and Dali::Internal::SceneGraph::SetDurationMessage().

Referenced by DoAction(), and ExtendDuration().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Animation::SetEndAction ( EndAction  action)

Set the end action of the animation.

This action is performed when the animation ends or if it is stopped. Default end action is bake .0

Parameters
[in]actionThe end action.

Definition at line 233 of file animation-impl.cpp.

References mAnimation, mEndAction, mEventThreadServices, and Dali::Internal::SceneGraph::SetEndActionMessage().

Here is the call graph for this function:

void Dali::Internal::Animation::SetFinishedCallback ( FinishedCallback  callback,
Object object 
)

This callback is intended for internal use only, to avoid the overhead of using a signal.

Parameters
[in]callbackThe callback function to connect.
[in]objectThe internal object requesting the callback, or NULL.

Definition at line 809 of file animation-impl.cpp.

References mFinishedCallback, and mFinishedCallbackObject.

void Dali::Internal::Animation::SetLoopCount ( int  count)

Enable looping for 'count' repeats.

A zero is the same as SetLooping(true) ie repeat forever. If Play() Stop() or 'count' loops is reached, the loop counter will reset. Setting this parameter does not cause the animation to Play()

.20

Parameters
[in]countThe number of times to loop.

Definition at line 209 of file animation-impl.cpp.

References mAnimation, mEventThreadServices, mLoopCount, and Dali::Internal::SceneGraph::SetLoopingMessage().

Referenced by SetLooping().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Animation::SetLooping ( bool  on)

Set whether the animation will loop.

This function resets the loop count and should not be used with SetLoopCount(int). Setting this parameter does not cause the animation to Play()

.0

Parameters
[in]loopingTrue if the animation will loop.

Definition at line 204 of file animation-impl.cpp.

References SetLoopCount().

Here is the call graph for this function:

void Dali::Internal::Animation::SetPlayRange ( const Vector2 range)

Definition at line 965 of file animation-impl.cpp.

References mAnimation, mEventThreadServices, mPlayRange, Dali::Internal::SceneGraph::SetPlayRangeMessage(), Dali::Vector2::x, and Dali::Vector2::y.

Here is the call graph for this function:

void Dali::Internal::Animation::SetSpeedFactor ( float  factor)

Definition at line 951 of file animation-impl.cpp.

References mAnimation, mEventThreadServices, mSpeedFactor, and Dali::Internal::SceneGraph::SetSpeedFactorMessage().

Here is the call graph for this function:

void Dali::Internal::Animation::Show ( Actor actor,
float  delaySeconds 
)

Show an actor during the animation.

.0

Parameters
[in]actorThe actor to animate.
[in]delaySecondsThe initial delay from the start of the animation.

Definition at line 866 of file animation-impl.cpp.

References AddAnimatorConnector(), ExtendDuration(), Dali::Property::INVALID_COMPONENT_INDEX, mDefaultAlpha, Dali::Internal::SHOW_VALUE, and Dali::Actor::Property::VISIBLE.

Here is the call graph for this function:

void Dali::Internal::Animation::Stop ( )

Stop the animation.

.0

Definition at line 301 of file animation-impl.cpp.

References Dali::Internal::EventThreadServices::GetUpdateManager(), mAnimation, mEventThreadServices, mState, Dali::Internal::SceneGraph::StopAnimationMessage(), and Dali::Animation::STOPPED.

Referenced by DoAction().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

const SceneGraph::Animation* Dali::Internal::Animation::mAnimation
private
AnimatorConnectorContainer Dali::Internal::Animation::mConnectors
private

Owned by the Animation.

Definition at line 464 of file animation-impl.h.

Referenced by AddAnimatorConnector(), and Clear().

int Dali::Internal::Animation::mCurrentLoop
private

Definition at line 470 of file animation-impl.h.

Referenced by GetCurrentLoop(), and HasFinished().

AlphaFunction Dali::Internal::Animation::mDefaultAlpha
private
EndAction Dali::Internal::Animation::mDisconnectAction
private

Definition at line 473 of file animation-impl.h.

Referenced by CreateSceneObject(), GetDisconnectAction(), and SetDisconnectAction().

float Dali::Internal::Animation::mDurationSeconds
private
EndAction Dali::Internal::Animation::mEndAction
private

Definition at line 472 of file animation-impl.h.

Referenced by CreateSceneObject(), GetEndAction(), and SetEndAction().

EventThreadServices& Dali::Internal::Animation::mEventThreadServices
private
FinishedCallback Dali::Internal::Animation::mFinishedCallback
private

Definition at line 461 of file animation-impl.h.

Referenced by EmitSignalFinish(), and SetFinishedCallback().

Object* Dali::Internal::Animation::mFinishedCallbackObject
private

Definition at line 462 of file animation-impl.h.

Referenced by EmitSignalFinish(), and SetFinishedCallback().

Dali::Animation::AnimationSignalType Dali::Internal::Animation::mFinishedSignal
private

Definition at line 459 of file animation-impl.h.

Referenced by EmitSignalFinish(), and FinishedSignal().

int Dali::Internal::Animation::mLoopCount
private

Definition at line 469 of file animation-impl.h.

Referenced by CreateSceneObject(), GetLoopCount(), IsLooping(), and SetLoopCount().

int Dali::Internal::Animation::mNotificationCount
private

Keep track of how many Finished signals have been emitted.

Definition at line 457 of file animation-impl.h.

Referenced by Clear(), and HasFinished().

AnimationPlaylist& Dali::Internal::Animation::mPlaylist
private

Definition at line 453 of file animation-impl.h.

Referenced by Clear(), Initialize(), Play(), PlayFrom(), and ~Animation().

Vector2 Dali::Internal::Animation::mPlayRange
private
float Dali::Internal::Animation::mSpeedFactor
private

Definition at line 468 of file animation-impl.h.

Referenced by CreateSceneObject(), GetSpeedFactor(), and SetSpeedFactor().

Dali::Animation::State Dali::Internal::Animation::mState
private

Definition at line 475 of file animation-impl.h.

Referenced by GetState(), HasFinished(), Pause(), Play(), PlayFrom(), and Stop().


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