OGLplus (0.30.0) a C++ wrapper for OpenGL

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

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

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

List of all members.

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

Detailed Description

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

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.

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


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

Copyright © 2010-2013 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Tue May 7 2013 by Doxygen (version 1.7.6.1).