A template class for interpolating components between simulation frames for various purposes.
More...
|
T | operator() (const T &previousState, const T &nextState, float simulationProgress=1.f) const |
| Returns an interpolated value for a component between two given states.
|
|
CameraProperties | operator() (const CameraProperties &previousState, const CameraProperties &nextState, float simulationProgress) const |
| Interpolation override for the camera properties struct, mainly using linear interpolation for each member.
|
|
LightEmissionData | operator() (const LightEmissionData &previousState, const LightEmissionData &nextState, float simulationProgress) const |
| Interpolates light emission properties between previous and next simulation states using linear interpolation.
|
|
Placement | operator() (const Placement &previousState, const Placement &nextState, float simulationProgress) const |
| Override of the Placement component's Interpolator.
|
|
Transform | operator() (const Transform &previousState, const Transform &nextState, float simulationProgress) const |
| Override of the Transform component's Interpolator.
|
|
SceneHierarchyData | operator() (const SceneHierarchyData &previousState, const SceneHierarchyData &nextState, float simulationProgress) const |
| Override of the SceneHierarchyData Interpolator.
|
|
SimCore | operator() (const SimCore &, const SimCore &next, float) const |
|
template<typename T>
class ToyMaker::Interpolator< T >
A template class for interpolating components between simulation frames for various purposes.
Each simulation tick, two versions of a component are stored by each component array. The first version is the state of the component at T-0, and the next is the state of the component at T-<simulation step>.
Some systems tick at a different rate from the simulation system, eg., the rendering system, and as such may require a value between these two states to function as expected.
By default, the interpolator uses step interpolation which works with most types. A specialization of this class can override this behaviour for a component, and implement a better suited variant (such as linear or spherical interpolation) if needed.
- Template Parameters
-
T | The type of component being interpolated |