NWengine 0.9
|
The BezierInterpolator class represents a Bezier curve interpolator. More...
#include <Interpolation.h>
Public Member Functions | |
BezierInterpolator (float source, float target, float duration) | |
Constructs a BezierInterpolator object with the given source, target, and duration. | |
BezierInterpolator () | |
Default constructor for the BezierInterpolator class. | |
void | Linearize () |
Linearizes the Bezier curve by subdividing it into linear segments. | |
float | Evaluate (float clock) override |
Evaluates the interpolation at the given clock value using the Bezier curve. | |
int | Serialize (std::fstream *data, int offset) override |
Serialize the object and write it to the file. | |
int | Deserialize (std::fstream *data, int offset) override |
Deserialize the object from the file. | |
Public Member Functions inherited from Interpolator | |
Interpolator (float source, float target, float duration) | |
Constructs an Interpolator object with the given source, target, and duration. | |
Interpolator ()=default | |
Default constructor for the Interpolator class. | |
int | Serialize (std::fstream *data, int offset) override |
Serializes the Interpolator object to a file stream. | |
int | Deserialize (std::fstream *data, int offset) override |
Deserializes the Interpolator object from a file stream. | |
Public Member Functions inherited from Serialized | |
Serialized () | |
Default constructor for Serialized class. | |
Public Attributes | ||
fVec2 | controlPoints [2] | |
Public Attributes inherited from Interpolator | ||
struct { | ||
float source | ||
float target | ||
float currentValue | ||
}; | ||
float | duration = 0.0f | |
The BezierInterpolator class represents a Bezier curve interpolator.
Constructs a BezierInterpolator object with the given source, target, and duration.
source | The source value of the interpolation. |
target | The target value of the interpolation. |
duration | The duration of the interpolation in seconds. |
Deserialize the object from the file.
data | The file stream to read the serialized data from. |
offset | The offset in the file to start reading the serialized data. |
Reimplemented from Serialized.
Evaluates the interpolation at the given clock value using the Bezier curve.
clock | The clock value between 0 and 1. |
Reimplemented from Interpolator.
Serialize the object and write it to the file.
data | The file stream to write the serialized data to. |
offset | The offset in the file to start writing the serialized data. |
Reimplemented from Serialized.
fVec2 BezierInterpolator::controlPoints[2] |
The control points of the Bezier curve.