friz
An animation control system for JUCE
Loading...
Searching...
No Matches
friz::AsyncController Class Reference

Controller to support clocking an animation manually, or at rates that aren't tied to wall-clock time (e.g. rendering an animation faster than realtime) More...

#include <controller.h>

Inheritance diagram for friz::AsyncController:

Public Member Functions

virtual float getFrameRate () const override
 report the current frame rate, whether what was requested or the actual measured rate.
 
void start () override
 Called whenever we need to start timer callbacks flowing.
 
void stop () override
 Called whenever there are no more animations that need to be updated.
 
bool isRunning () const override
 Test to see if the timer is currently running.
 
bool gotoTime (juce::int64 timeInMs)
 Manually advance the animation to a point in time. Each call to this method must move time forward!
 
- Public Member Functions inherited from friz::Controller
 Controller (const Controller &)=delete
 
Controlleroperator= (const Controller &)=delete
 
 Controller (Controller &&)=delete
 
Controlleroperator= (Controller &&)=delete
 
void setAnimator (Animator *animator_)
 
virtual bool setFrameRate (int)
 
virtual float getFrameRate () const
 report the current frame rate, whether what was requested or the actual measured rate.
 
virtual void start ()=0
 Called whenever we need to start timer callbacks flowing.
 
virtual void stop ()=0
 Called whenever there are no more animations that need to be updated.
 
virtual bool isRunning () const =0
 Test to see if the timer is currently running.
 

Private Attributes

FrameRateCalculator frameRate
 
bool running { false }
 
juce::int64 lastTime { 0 }
 

Additional Inherited Members

- Static Public Member Functions inherited from friz::Controller
static juce::int64 getCurrentTime ()
 Calculate the current time in milliseconds since some event, probably system start. Probably not accurate enough for e.g. musical purposes but more than accurate enough for visual animations.
 
- Protected Attributes inherited from friz::Controller
Animatoranimator
 the animator object that owns us.
 

Detailed Description

Controller to support clocking an animation manually, or at rates that aren't tied to wall-clock time (e.g. rendering an animation faster than realtime)

Member Function Documentation

◆ getFrameRate()

virtual float friz::AsyncController::getFrameRate ( ) const
inlineoverridevirtual

report the current frame rate, whether what was requested or the actual measured rate.

Returns
float

Reimplemented from friz::Controller.

◆ gotoTime()

bool friz::AsyncController::gotoTime ( juce::int64  timeInMs)

Manually advance the animation to a point in time. Each call to this method must move time forward!

Parameters
timeInMs
Returns
false

◆ isRunning()

bool friz::AsyncController::isRunning ( ) const
inlineoverridevirtual

Test to see if the timer is currently running.

Implements friz::Controller.

◆ start()

void friz::AsyncController::start ( )
inlineoverridevirtual

Called whenever we need to start timer callbacks flowing.

Implements friz::Controller.

◆ stop()

void friz::AsyncController::stop ( )
inlineoverridevirtual

Called whenever there are no more animations that need to be updated.

Implements friz::Controller.


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