Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/time/quantiser.hpp"
Simple stand-alone Quantiser implementation based on a constant sized gird.
This is a self-contained quantiser implementation without any implicit referral to the Lumiera session. As such it is suited for simplified unit testing.
Definition at line 144 of file quantiser.hpp.
Public Member Functions | |
FixedFrameQuantiser (FrameRate const &frames_per_second, TimeValue referencePoint=TimeValue(0)) | |
Create a quantiser based on a fixed constant spaced grid, rooted at the reference point as origin of the scale. More... | |
FixedFrameQuantiser (Duration const &frame_duration, TimeValue referencePoint=TimeValue(0)) | |
TimeValue | gridLocal (TimeValue const &) const |
transform into the local time scale grid aligned. More... | |
FrameCnt | gridPoint (TimeValue const &) const |
grid quantisation (alignment). More... | |
TimeValue | timeOf (FrameCnt gridPoint) const |
calculate time value of a grid interval (frame) start point More... | |
TimeValue | timeOf (FSecs, int=0) const |
calculate time coordinates of a time spec relative to this quantised time scale More... | |
Public Member Functions inherited from Quantiser | |
TimeValue | materialise (TimeValue const &raw) const |
convenience shortcut: materialise a raw time value based on this grid or time axis, but returning a raw time value. More... | |
template<class FMT > | |
bool | supports () const |
Public Member Functions inherited from Grid | |
virtual | ~Grid () |
this is an Interface | |
Private Attributes | |
Time | origin_ |
Duration | raster_ |
Additional Inherited Members | |
Static Public Member Functions inherited from Quantiser | |
static PQuant | retrieve (Symbol gridID) |
Access an existing grid definition or quantiser, known by the given symbolic ID. More... | |
Protected Attributes inherited from Quantiser | |
format::Supported | supportedFormats_ |
FixedFrameQuantiser | ( | FrameRate const & | frames_per_second, |
TimeValue | referencePoint = TimeValue(0) |
||
) |
Create a quantiser based on a fixed constant spaced grid, rooted at the reference point as origin of the scale.
Quantisation then means to determine the grid interval containing a given raw time value. Here, the grid interval number zero starts at the origin; each interval includes its lower bound and excludes its upper bound.
Definition at line 84 of file quantiser.cpp.
grid quantisation (alignment).
Determine the next lower grid interval start point, using a simple constant spaced time grid defined by origin and framerate stored within this quantiser.
Implements Quantiser.
Definition at line 126 of file quantiser.cpp.
References lumiera_quantise_frames().
Referenced by Quantiser::materialise().
transform into the local time scale grid aligned.
The actual calculation first determines the number of the grid interval containing the given rawTime, then followed by multiplying this interval number with the grid spacing.
Implements Quantiser.
Definition at line 145 of file quantiser.cpp.
References lumiera_quantise_time().
calculate time value of a grid interval (frame) start point
Implements Quantiser.
Definition at line 157 of file quantiser.cpp.
References lumiera_time_of_gridpoint().
Referenced by Quantiser::materialise().
calculate time coordinates of a time spec relative to this quantised time scale
gridTime | seconds relative to the origin of this scale |
gridOffset | additional offset in grid intervals (frames) |
Implements Quantiser.
Definition at line 171 of file quantiser.cpp.
References LUMIERA_ERROR_DEFINE.