OGLplus (0.52.0) a C++ wrapper for OpenGL

oglplus::BezierCurves< Type, Parameter, Order > Class Template Reference

A sequence of Bezier curves, possibly connected at end points. More...

#include </home/chochlik/devel/oglplus/include/oglplus/math/curve.hpp>

Public Member Functions

bool Connected (void) const
 Returns true if the individual curves are connected.
 
bool Separated (void) const
 Returns true if the individual curves are connected.
 
 BezierCurves (::std::vector< Type > &&points)
 Creates the bezier curves from the control points. More...
 
 BezierCurves (::std::vector< Type > &&points, bool connected)
 Creates the bezier curves from the control points. More...
 
 BezierCurves (const ::std::vector< Type > &points)
 Creates the bezier curves from the control points. More...
 
 BezierCurves (const ::std::vector< Type > &points, bool connected)
 Creates the bezier curves from the control points. More...
 
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)
 
BezierCurves< Type, Parameter,
Order-1 > 
Derivative (void) const
 Returns a derivative of this curve.
 

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].
 

Detailed Description

template<typename Type, typename Parameter, unsigned Order>
class oglplus::BezierCurves< Type, Parameter, Order >

A sequence of Bezier curves, possibly 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 equal to the end of the (i-1)-th curve and the end of the i-th curve is equal to 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.

See Also
CubicBezierLoop

Constructor & Destructor Documentation

template<typename Type, typename Parameter, unsigned Order>
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) or (C * (Order + 1)) where C is the number of curves (segments) in the sequence. If both of the above are true then the curves are considered to be connected.

template<typename Type, typename Parameter, unsigned Order>
oglplus::BezierCurves< Type, Parameter, Order >::BezierCurves ( ::std::vector< Type > &&  points,
bool  connected 
)

Creates the bezier curves from the control points.

The number of points must be ((C * Order) + 1) and connected or (C * (Order + 1)) and not(connected), where C is the number of curves (segments) in the sequence.

template<typename Type, typename Parameter, unsigned Order>
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. If both of the above are true then the curves are considered to be connected.

template<typename Type, typename Parameter, unsigned Order>
oglplus::BezierCurves< Type, Parameter, Order >::BezierCurves ( const ::std::vector< Type > &  points,
bool  connected 
)

Creates the bezier curves from the control points.

The number of points must be ((C * Order) + 1) and connected or (C * (Order + 1)) and not(connected), where C is the number of curves (segments) in the sequence.


The documentation for this class was generated from the following file:
  • /home/chochlik/devel/oglplus/include/oglplus/math/curve.hpp

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).