|
AGX Dynamics
2.37.3.2
|
#include <GraphicsThrottler.h>
Public Member Functions | |
| GraphicsThrottler (double fps=0.0f) | |
| Construct a new Graphics Throttler object. More... | |
| double | getTargetFPS () |
| Get the target fps, if <= 0 no throttling is done. More... | |
| void | rendered (double wall_clock) |
| Reset timer to wall_clock. More... | |
| void | reset () |
| Reset the last rendered time and start from scratch. More... | |
| void | setTargetFPS (double fps) |
| Set the target fps to a new value. More... | |
| bool | shouldRenderGraphics (double wall_clock, double timestep, bool auto_reset=true) |
| Returns whether rendering should be done or not. More... | |
Definition at line 19 of file GraphicsThrottler.h.
| GraphicsThrottler::GraphicsThrottler | ( | double | fps = 0.0f | ) |
Construct a new Graphics Throttler object.
| fps | Target frames per second, if <= 0 no throttling will be done |
| double GraphicsThrottler::getTargetFPS | ( | ) |
Get the target fps, if <= 0 no throttling is done.
| void GraphicsThrottler::rendered | ( | double | wall_clock | ) |
Reset timer to wall_clock.
Next render will happen 1/fps s from wall_clock
| wall_clock | wallclock time in seconds |
| void GraphicsThrottler::reset | ( | ) |
Reset the last rendered time and start from scratch.
Next frame will be rendered.
| void GraphicsThrottler::setTargetFPS | ( | double | fps | ) |
Set the target fps to a new value.
Next render will happen 1/fpx s from wall_clock
| fps | target frames per second, if <= 0 no throttling will be done |
| bool GraphicsThrottler::shouldRenderGraphics | ( | double | wall_clock, |
| double | timestep, | ||
| bool | auto_reset = true |
||
| ) |
Returns whether rendering should be done or not.
| wall_clock | wallclock time in seconds |
| auto_reset | whether to perform rendered() call automatically or not. |
| timestep | the simulation timestep |