MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
Public Member Functions | List of all members
math::BezierCurve< T > Class Template Reference

A class for defining and evaluating Bezier curves in all dimensions. More...

#include <bezier_curve.h>

Public Member Functions

 BezierCurve (void)
 
virtual ~BezierCurve (void)
 
void append_point (T const &p)
 Appends a new end point or control point to the curve.
 
void clear (void)
 Removes all control points, resetting the curve.
 
evaluate (float t) const
 Evaluates the Bezier curve at position t in [0, 1].
 
T const & operator[] (std::size_t index) const
 Returns the control point at the given index.
 
std::size_t size (void) const
 Returns the amount of control points in the vector.
 

Detailed Description

template<class T>
class math::BezierCurve< T >

A class for defining and evaluating Bezier curves in all dimensions.

Definition at line 24 of file bezier_curve.h.

Constructor & Destructor Documentation

◆ BezierCurve()

template<class T >
math::BezierCurve< T >::BezierCurve ( void  )
inline

Definition at line 59 of file bezier_curve.h.

◆ ~BezierCurve()

template<class T >
math::BezierCurve< T >::~BezierCurve ( void  )
inlinevirtual

Definition at line 65 of file bezier_curve.h.

Member Function Documentation

◆ append_point()

template<class T >
void math::BezierCurve< T >::append_point ( T const &  p)
inline

Appends a new end point or control point to the curve.

The first and the last point are end points, the points in between are control points. The degree of the polynomial is then the total amount of points minus one.

Definition at line 71 of file bezier_curve.h.

◆ clear()

template<class T >
void math::BezierCurve< T >::clear ( void  )
inline

Removes all control points, resetting the curve.

Definition at line 106 of file bezier_curve.h.

◆ evaluate()

template<class T >
T math::BezierCurve< T >::evaluate ( float  t) const
inline

Evaluates the Bezier curve at position t in [0, 1].

Definition at line 78 of file bezier_curve.h.

◆ operator[]()

template<class T >
T const & math::BezierCurve< T >::operator[] ( std::size_t  index) const
inline

Returns the control point at the given index.

Definition at line 121 of file bezier_curve.h.

◆ size()

template<class T >
std::size_t math::BezierCurve< T >::size ( void  ) const
inline

Returns the amount of control points in the vector.

Definition at line 114 of file bezier_curve.h.


The documentation for this class was generated from the following file: