public

Inheritance Graph

graph BT
	AnimationHandler
	click AnimationHandler "classGUI_1_1AnimationHandler"

Description

An AnimationHandler is responsible for one animation of a component. To start an animation, an appropriate AnimationHandler has to be created and registered at the GUI_Manager via addAnimationHandler. The GUI_Manager deletes the AnimationHandler Object when the animation has finished.

Public Functions

   
   
  AnimationHandler( Component * c, float _duration)
   
  ~AnimationHandler()
   
void updateLastTime(float t)
   
float getLastTime() const
   
void setDuration(float t)
   
float getDuration() const
   
void setStartTime(float t)
   
float getStartTime() const
   
float getEndTime() const
   
Component * getComponent() const
   
bool animate(float currentTime)
   
void finish()

Documentation

function
GUI::AnimationHandler::AnimationHandler

public inline
     
     
AnimationHandler( Component * c,
  float _duration
)    

Default constructor

Defined in GUI/Base/AnimationHandler.h:28


function
GUI::AnimationHandler::~AnimationHandler

public inline virtual
   
   
~AnimationHandler( )

Default destructor

Defined in GUI/Base/AnimationHandler.h:33


function
GUI::AnimationHandler::updateLastTime

public inline
     
     
void updateLastTime( float t )

Defined in GUI/Base/AnimationHandler.h:35


function
GUI::AnimationHandler::getLastTime

public const inline
   
   
float getLastTime( ) const

Defined in GUI/Base/AnimationHandler.h:36


function
GUI::AnimationHandler::setDuration

public inline
     
     
void setDuration( float t )

Defined in GUI/Base/AnimationHandler.h:38


function
GUI::AnimationHandler::getDuration

public const inline
   
   
float getDuration( ) const

Defined in GUI/Base/AnimationHandler.h:39


function
GUI::AnimationHandler::setStartTime

public inline
     
     
void setStartTime( float t )

Defined in GUI/Base/AnimationHandler.h:41


function
GUI::AnimationHandler::getStartTime

public const inline
   
   
float getStartTime( ) const

Defined in GUI/Base/AnimationHandler.h:42


function
GUI::AnimationHandler::getEndTime

public const inline
   
   
float getEndTime( ) const

Defined in GUI/Base/AnimationHandler.h:44


function
GUI::AnimationHandler::getComponent

public const inline
   
   
Component * getComponent( ) const

Defined in GUI/Base/AnimationHandler.h:48


function
GUI::AnimationHandler::animate

public inline virtual
     
     
bool animate( float currentTime )

Called by the GUI_Manager in every frame with the current time in seconds. If the animation has finished, finish() should be called and false should be returned (true otherwise). Then this object is removed by the GUI_Manager .

Defined in GUI/Base/AnimationHandler.h:56


function
GUI::AnimationHandler::finish

public inline virtual
   
   
void finish( )

Sets the component to its final stage of the animation. Called when the animation finished by animate, or by the GUI_Manager if the animation should be finished prematurely.

Defined in GUI/Base/AnimationHandler.h:68