Public Types

decCurveBezier Class Reference

Bezier Curve. More...

#include <decCurveBezier.h>

List of all members.

Public Types

enum  eInterpolationModes { eimConstant, eimLinear, eimBezier }
 

Interpolation modes.

More...

Public Member Functions

Constructors and Destructors
 decCurveBezier ()
 Creates a new bezier curve.
 ~decCurveBezier ()
 Cleans up the bezier curve.
Management
int GetPointCount () const
 Retrieves the number of points.
const decCurveBezierPointGetPointAt (int position) const
 Retrieves the point at the given position.
int FindPointPriorTo (float coordinate) const
 Retrieves the index of the point with the x coordinates matching the given x coordinate or the point which lies closest on the smaller side.
int AddPoint (const decCurveBezierPoint &point)
 Adds a point returning the index where it has been added.
void RemovePointFrom (int position)
 Removes a point from the given position.
void RemoveAllPoints ()
 Removes all points.
int GetInterpolationMode () const
 Retrieves the interpolation mode.
void SetInterpolationMode (int mode)
 Sets the interpolation mode.
Operators
decCurveBezieroperator= (const decCurveBezier &curve)
 Sets the curve from another curve.

Detailed Description

Bezier Curve.

Author:
Roland Plüss
Version:
1.0
Date:
2010

Member Enumeration Documentation

Interpolation modes.

Enumerator:
eimConstant 

Constant interpolation.

eimLinear 

Linear interpolation.

eimBezier 

Bezier interpolation.


Constructor & Destructor Documentation

decCurveBezier::decCurveBezier (  )

Creates a new bezier curve.

decCurveBezier::~decCurveBezier (  )

Cleans up the bezier curve.


Member Function Documentation

int decCurveBezier::AddPoint ( const decCurveBezierPoint point )

Adds a point returning the index where it has been added.

int decCurveBezier::FindPointPriorTo ( float  coordinate ) const

Retrieves the index of the point with the x coordinates matching the given x coordinate or the point which lies closest on the smaller side.

This method can be used to find the interval a point is located in by returning the most prior point. Retrieves -1 if there are no points satisfying this criteria.

int decCurveBezier::GetInterpolationMode (  ) const [inline]

Retrieves the interpolation mode.

const decCurveBezierPoint& decCurveBezier::GetPointAt ( int  position ) const

Retrieves the point at the given position.

int decCurveBezier::GetPointCount (  ) const [inline]

Retrieves the number of points.

decCurveBezier& decCurveBezier::operator= ( const decCurveBezier curve )

Sets the curve from another curve.

void decCurveBezier::RemoveAllPoints (  )

Removes all points.

void decCurveBezier::RemovePointFrom ( int  position )

Removes a point from the given position.

void decCurveBezier::SetInterpolationMode ( int  mode )

Sets the interpolation mode.


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