BezierCurve< N > Class Template Reference

Represents an nth degree bezier curve. More...

#include <Graphics/Curve.h>

List of all members.

Public Member Functions

 BezierCurve ()
 Constructs an nth degree Bezier Curve.
 ~BezierCurve ()
 Deconstructor.
void SetControlPoint (uint i, const Point2f &p)
 Sets the ith control point of the curve.
Point2f GetControlPoint (uint i) const
 Gets the ith control point of the curve.
void SetDetail (uint detail)
 Sets the detail level that will be used to draw the curve.
void Draw (const Color4f &color=Color::White, float width=2.0f)
 Draws the curve.
void DrawControlPoints () const
 Draws the control points with connecting lines.

Detailed Description

template<uint N = 3>
class BezierCurve< N >

Represents an nth degree bezier curve.

Template Parameters:
n the degree of the bezier curve.

Member Function Documentation

template<uint N>
void BezierCurve< N >::Draw ( const Color4f color = Color::White,
float  width = 2.0f 
) [inline]

Draws the curve.

Parameters:
[in] color the color to draw the curve. Defaults to white.
[in] width the width of the curve. Defaults to 2.
template<uint N>
Point2f BezierCurve< N >::GetControlPoint ( uint  i  )  const [inline]

Gets the ith control point of the curve.

Parameters:
[in] i the index, must be in the range [0, N]
Returns:
the ith control point.
template<uint N>
void BezierCurve< N >::SetControlPoint ( uint  i,
const Point2f p 
) [inline]

Sets the ith control point of the curve.

Parameters:
[in] i the index, must be in the range [0, N]
[in] p the control point.
template<uint N>
void BezierCurve< N >::SetDetail ( uint  detail  )  [inline]

Sets the detail level that will be used to draw the curve.

Parameters:
[in] detail higher values produce smoother curves but are slower to compute.

The documentation for this class was generated from the following file:
Generated on Mon Apr 5 19:08:05 2010 for BrickOut |ReDuX| by  doxygen 1.6.3