Inviwo  0.9.10.1
Inviwo documentation
inviwo::animation::AnimationPlaySettings Class Reference

#include <animationstate.h>

Public Member Functions

Seconds getFirstTime () const
 
void setFirstTime (const Seconds timeValue)
 
Seconds getLastTime () const
 
void setLastTime (const Seconds timeValue)
 
int getNumFrames () const
 
bool setNumFrames (const int desiredFrames)
 
double getFramesPerSecond () const
 Returns the frames per second.
 
bool setFramesPerSecond (const double desiredFPS)
 
bool operator!= (const AnimationPlaySettings &other) const
 

Public Attributes

PlaybackMode mode
 

Protected Attributes

Seconds firstTime
 
Seconds lastTime
 
int numFrames
 Number of frames to generate between firstTime and lastTime.
 
double framesPerSecond
 Frames per second.
 

Detailed Description

Keeps animation settings related to playing or rendering.

The settings allow to work either with numFrames or framesPerSecond. If one is set, the other is computed accordingly in order to stay consistent.

The parameters firstTime and lastTime do not need to coincide with the corresponding parameters of the animation. We can choose a smaller time window here, or a larger one just as well. No harm in doing the latter.

The smallest numFrames is 2, since we will visit at least firstTime and lastTime during an animation or rendering. The smallest framesPerSecond is 1e-3, as an arbitrary but positive, non-zero minimum.

Member Function Documentation

◆ getNumFrames()

int inviwo::animation::AnimationPlaySettings::getNumFrames ( ) const

Returns the number of frames to be rendered between firstTime and lastTime given the current @framesPerSecond.

◆ setFramesPerSecond()

bool inviwo::animation::AnimationPlaySettings::setFramesPerSecond ( const double  desiredFPS)

Sets the frames per second for the animation playback, and adjusts numFrames accordingly. The smallest @framesPerSecond is 1e-3, as an arbitrary but positive, non-zero minimum.

Returns
true on success.

◆ setNumFrames()

bool inviwo::animation::AnimationPlaySettings::setNumFrames ( const int  desiredFrames)

Sets the number of frames to be rendered between firstTime and lastTime, and adjusts framesPerSecond accordingly.

The smallest numFrames is 2, since we will visit at least firstTime and lastTime during an animation or rendering.

Returns
true on success.

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