#include <dustyinterpolatedtask.h>
Inheritance diagram for DustyEngine::InterpolatedTask:

Public Member Functions | |
| InterpolatedTask () | |
| Constructor sets default values. | |
| virtual | ~InterpolatedTask () |
| irr::f32 | GetInterpolationValue () |
| void | SetLooping (bool loop) |
| SetLooping() sets whether or not the interpolation should loop back to the beginning once it reaches the end. | |
| bool | GetLooping () |
| void | SetReverseLooping (bool reverse) |
| bool | GetReverseLooping () |
| void | Reverse () |
| Reverse() will cause the interpolation of the task to turn in reverse. If it is interpolating up it will begin interpolating down, if it's going down it will start going up. | |
| bool | IsInReverse () |
| void | SetInterpolationValue (irr::f32 value) |
| void | SetInterpolationTime (irr::u32 time) |
| irr::u32 | GetInterpolationTime () |
| void | OnUpdate () |
| OnUpdate() is called by the TaskTree when the time has come to execute the task's code. | |
Protected Member Functions | |
| void | UpdateTimeDelta () |
| void | UpdateLooping () |
Protected Attributes | |
| irr::u32 | timePassed |
| irr::u32 | interpolationTime |
| bool | looping |
| bool | reverseLooping |
| bool | inReverse |
InterpolatedTask allows for interpolation for any purpose. The programmer sets an amount of time that he would like the entire interpolation to take, say 1000 milliseconds, and the task will allow the computation of a value which represents how much of that 1000 milliseconds has passed.
For instance, if the programmer sets the interpolation time to be 1000 milliseconds, and 250 milliseconds has passed, then the GetInterpolationValue() function will return 0.250 because one quarter of the total amount of time has passed.
Definition at line 18 of file dustyinterpolatedtask.h.
|
|
Constructor sets default values.
|
|
|
|
|
|
GetInterpolationTime() returns the total amount of time it should take for this task to interpolate from 0 to 1.
Definition at line 81 of file dustyinterpolatedtask.h. |
|
|
Interpolation value works off of the TaskTree. This benefit of this means that if the interpolation task is paused, then the interpolation will also pause. This is keeping with DustyEngine's benefit of seamless pausing/unpausing of tasks. |
|
|
GetLooping() returns whether or not the interpolation is looping.
Definition at line 39 of file dustyinterpolatedtask.h. |
|
|
GetReverseLooping() returns whether or not the task is set to loop in reverse after it reaches 1.
Definition at line 50 of file dustyinterpolatedtask.h. |
|
|
IsInReverse() tells whether the task is current interpolating downward or not.
Definition at line 63 of file dustyinterpolatedtask.h. |
|
|
OnUpdate() is called by the TaskTree when the time has come to execute the task's code. OnUpdate is typically the most important function. OnUpdate is only called when enough time has passed or every frame, depending upon what the priority of the task is. If you want code to execute on a time-based basis, put that code here and add the task to the tree. Reimplemented from DustyEngine::DummyTask. Reimplemented in DustyEngine::ColorInterpolatedTask, DustyEngine::MoveInterpolatedTask, DustyEngine::RotateInterpolatedTask, DustyEngine::ScaleInterpolatedTask, DustyEngine::VectorInterpolatedTask, DustyEngine::WaypointMoveInterpolatedTask, DustyEngine::WaypointRotateInterpolatedTask, and DustyEngine::WaypointScaleInterpolatedTask. |
|
|
Reverse() will cause the interpolation of the task to turn in reverse. If it is interpolating up it will begin interpolating down, if it's going down it will start going up.
Definition at line 56 of file dustyinterpolatedtask.h. |
|
|
SetInterpolationTime sets the total amount of time it should take for the interpolation to move from 0 to 1.
Reimplemented in DustyEngine::WaypointMoveInterpolatedTask, DustyEngine::WaypointRotateInterpolatedTask, and DustyEngine::WaypointScaleInterpolatedTask. Definition at line 74 of file dustyinterpolatedtask.h. |
|
|
SetInterpolationValue() will update the amount of time that has passed based upon a floating pointer integer from 0 to 1.
|
|
|
SetLooping() sets whether or not the interpolation should loop back to the beginning once it reaches the end.
|
|
|
SetReverseLooping will cause the interpolation to loop backwards once the end of interpolation has been reached. The task will go from 0...1, then from 1...0, then 0...1, forever.
|
|
|
|
|
|
|
|
|
Definition at line 96 of file dustyinterpolatedtask.h. |
|
|
Definition at line 93 of file dustyinterpolatedtask.h. |
|
|
Definition at line 94 of file dustyinterpolatedtask.h. |
|
|
Definition at line 95 of file dustyinterpolatedtask.h. |
|
|
Definition at line 92 of file dustyinterpolatedtask.h. |
1.4.6-NO