A sequence of Bezier curves, connected at end points. More...
#include </home/chochlik/devel/oglplus/include/oglplus/curve.hpp>
Public Member Functions | |
| BezierCurves (::std::vector< Type > &&points) | |
Creates the bezier curves from the control points. | |
| BezierCurves (const ::std::vector< Type > &points) | |
Creates the bezier curves from the control points. | |
| unsigned | SegmentCount (void) const |
| Returns the count of individual curves in the sequence. | |
| const ::std::vector< Type > & | ControlPoints (void) const |
| Returns the contol points of the curve. | |
| Type | Position01 (Parameter t) const |
| Gets the point on the curve at position t (must be between 0.0, 1.0) | |
| Type | Position (Parameter t) const |
| Gets the point on the curve at position t wrapped to [0.0, 1.0]. | |
| void | Approximate (std::vector< Type > &dest, unsigned n) const |
| Makes a sequence of points on the curve (n points per segment) | |
| ::std::vector< Type > | Approximate (unsigned n) const |
| Returns a sequence of points on the curve (n points per segment) | |
Static Public Member Functions | |
| static bool | PointsOk (const ::std::vector< Type > &points) |
| Checks if the sequence of control points is OK for this curve type. | |
| static Parameter | Wrap (Parameter t) |
| Wraps the parameter value to [0.0, 1.0]. | |
A sequence of Bezier curves, connected at end points.
This class stores the data for a sequence of connected Bezier curves of a given Order. The begin of the i-th curve (segment) is connected with the end of the (i-1)-th curve and the end of the i-th curve is connected with the begin of the (i+1)-th curve. Between the begin and end (control) points there is a fixed number (Order - 1) of curve control points. The curves pass through the begin and end and are influenced by the other control points.
| oglplus::BezierCurves< Type, Parameter, Order >::BezierCurves | ( | ::std::vector< Type > && | points | ) |
Creates the bezier curves from the control points.
The number of points must be (C * Order + 1) where C is the number of curves (segments) in the sequence.
| oglplus::BezierCurves< Type, Parameter, Order >::BezierCurves | ( | const ::std::vector< Type > & | points | ) |
Creates the bezier curves from the control points.
The number of points must be (C * Order + 1) where C is the number of curves (segments) in the sequence.