Bezier Curve. More...
#include <decCurveBezier.h>
Public Types | |
| enum | eInterpolationModes { eimConstant, eimLinear, eimBezier } |
Interpolation modes. More... | |
Public Member Functions | |
Constructors and Destructors | |
| decCurveBezier () | |
| Creates a new bezier curve. | |
| ~decCurveBezier () | |
| Cleans up the bezier curve. | |
Management | |
| int | GetPointCount () const |
| Retrieves the number of points. | |
| const decCurveBezierPoint & | GetPointAt (int position) const |
| Retrieves the point at the given position. | |
| int | FindPointPriorTo (float coordinate) const |
| Retrieves the index of the point with the x coordinates matching the given x coordinate or the point which lies closest on the smaller side. | |
| int | AddPoint (const decCurveBezierPoint &point) |
| Adds a point returning the index where it has been added. | |
| void | RemovePointFrom (int position) |
| Removes a point from the given position. | |
| void | RemoveAllPoints () |
| Removes all points. | |
| int | GetInterpolationMode () const |
| Retrieves the interpolation mode. | |
| void | SetInterpolationMode (int mode) |
| Sets the interpolation mode. | |
Operators | |
| decCurveBezier & | operator= (const decCurveBezier &curve) |
| Sets the curve from another curve. | |
Bezier Curve.
| decCurveBezier::decCurveBezier | ( | ) |
Creates a new bezier curve.
| decCurveBezier::~decCurveBezier | ( | ) |
Cleans up the bezier curve.
| int decCurveBezier::AddPoint | ( | const decCurveBezierPoint & | point ) |
Adds a point returning the index where it has been added.
| int decCurveBezier::FindPointPriorTo | ( | float | coordinate ) | const |
Retrieves the index of the point with the x coordinates matching the given x coordinate or the point which lies closest on the smaller side.
This method can be used to find the interval a point is located in by returning the most prior point. Retrieves -1 if there are no points satisfying this criteria.
| int decCurveBezier::GetInterpolationMode | ( | ) | const [inline] |
Retrieves the interpolation mode.
| const decCurveBezierPoint& decCurveBezier::GetPointAt | ( | int | position ) | const |
Retrieves the point at the given position.
| int decCurveBezier::GetPointCount | ( | ) | const [inline] |
Retrieves the number of points.
| decCurveBezier& decCurveBezier::operator= | ( | const decCurveBezier & | curve ) |
Sets the curve from another curve.
| void decCurveBezier::RemoveAllPoints | ( | ) |
Removes all points.
| void decCurveBezier::RemovePointFrom | ( | int | position ) |
Removes a point from the given position.
| void decCurveBezier::SetInterpolationMode | ( | int | mode ) |
Sets the interpolation mode.
1.7.2