Function step

Synopsis

#include <Source/Falcor/Utils/Timing/Clock.h>

Clock & step(int64_t frames=1)

Description

Step forward or backward. Ignored if the Clock is running or not in FPS simulation mode

Parameters

[ in ] frames - The number of frames to step. Can be negative The function will not step backward beyond frame zero

Mentioned in

  • Usage / Scripting / Clock

Source

Lines 206-215 in Source/Falcor/Utils/Timing/Clock.cpp. Line 158 in Source/Falcor/Utils/Timing/Clock.h.

Clock& Clock::step(int64_t frames)
{
    if (frames < 0 && uint64_t(-frames) > mFrames) mFrames = 0;
    else mFrames += frames;
    updateTimer();
    double t = isSimulatingFps() ? timeFromFrame(mFrames, mTicksPerFrame) : ((mTimer.delta() * mScale) + mTime.now);
    mTime.update(t);
    return *this;
}





Add Discussion as Guest

Log in