scg3  0.6
scg::Animation Class Referenceabstract

Base class for all animations (abstract), providing general functionality. More...

#include "Animation.h"

Inheritance diagram for scg::Animation:
[legend]

Public Member Functions

 Animation ()
 
virtual ~Animation ()
 
bool isStarted () const
 
bool isRunning () const
 
virtual void start (double currTime)
 
virtual void stop ()
 
virtual void reset ()
 
virtual void update (double currTime)=0
 

Protected Attributes

bool isStarted_
 
bool isRunning_
 
double lastTime_
 
double diffTime_
 
double totalTime_
 

Detailed Description

Base class for all animations (abstract), providing general functionality.

Definition at line 34 of file Animation.h.

Constructor & Destructor Documentation

◆ Animation()

scg::Animation::Animation ( )

Constructor.

◆ ~Animation()

virtual scg::Animation::~Animation ( )
virtual

Destructor.

Member Function Documentation

◆ isRunning()

bool scg::Animation::isRunning ( ) const

Check if animation is running.

◆ isStarted()

bool scg::Animation::isStarted ( ) const

Check if animation has been started at least once.

◆ reset()

virtual void scg::Animation::reset ( )
virtual

Reset animation, i.e., set all variables to their initial states.

Note: This method must also be called by derived methods.

◆ start()

virtual void scg::Animation::start ( double  currTime)
virtual

Start or restart animation with given time.

Note: This method must also be called by derived methods.

Parameters
currTimecurrent time (seconds)

Reimplemented in scg::TransformAnimation.

◆ stop()

virtual void scg::Animation::stop ( )
virtual

Stop or pause animation.

Note: This method must also be called by derived methods.

◆ update()

virtual void scg::Animation::update ( double  currTime)
pure virtual

Update animation with given time.

Note: This method must also be called by derived methods.

Parameters
currTimecurrent time (seconds)

Implemented in scg::TransformAnimation.

Member Data Documentation

◆ diffTime_

double scg::Animation::diffTime_
protected

time since last update (seconds)

Definition at line 95 of file Animation.h.

◆ isRunning_

bool scg::Animation::isRunning_
protected

true if animation is running

Definition at line 93 of file Animation.h.

◆ isStarted_

bool scg::Animation::isStarted_
protected

true if animation has been started (may be stopped temporarily)

Definition at line 92 of file Animation.h.

◆ lastTime_

double scg::Animation::lastTime_
protected

time of last update (seconds)

Definition at line 94 of file Animation.h.

◆ totalTime_

double scg::Animation::totalTime_
protected

time since last reset (seconds)

Definition at line 96 of file Animation.h.


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