Ogre Procedural  0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
Public Member Functions | Protected Attributes | List of all members
Procedural::BezierCurve3 Class Reference

Builds a path from a Bezier-Curve. More...

#include <ProceduralPathGenerators.h>

Inheritance diagram for Procedural::BezierCurve3:
Inheritance graph
[legend]

Public Member Functions

 BezierCurve3 ()
 Default constructor. More...
 
BezierCurve3setNumSeg (unsigned int numSeg)
 Sets number of segments per two control points. More...
 
BezierCurve3addPoint (const Ogre::Vector3 &pt)
 Adds a control point. More...
 
BezierCurve3addPoint (Ogre::Real x, Ogre::Real y, Ogre::Real z)
 Adds a control point. More...
 
const Ogre::Vector3safeGetPoint (unsigned int i) const
 Safely gets a control point. More...
 
const size_t getPointCount () const
 Gets the number of control points. More...
 
Path realizePath ()
 Build a path from bezier control points. More...
 
BezierCurve3close ()
 Closes the spline. More...
 

Protected Attributes

bool mClosed
 Tells if the spline is closed or not. More...
 

Detailed Description

Builds a path from a Bezier-Curve.

Constructor & Destructor Documentation

◆ BezierCurve3()

Procedural::BezierCurve3::BezierCurve3 ( )

Default constructor.

Member Function Documentation

◆ addPoint() [1/2]

BezierCurve3& Procedural::BezierCurve3::addPoint ( const Ogre::Vector3 pt)

Adds a control point.

◆ addPoint() [2/2]

BezierCurve3& Procedural::BezierCurve3::addPoint ( Ogre::Real  x,
Ogre::Real  y,
Ogre::Real  z 
)

Adds a control point.

◆ close()

Closes the spline.

◆ getPointCount()

const size_t Procedural::BezierCurve3::getPointCount ( ) const

Gets the number of control points.

◆ realizePath()

Path Procedural::BezierCurve3::realizePath ( )

Build a path from bezier control points.

Exceptions
Ogre::InvalidStateExceptionThe curve must at least contain 2 points

◆ safeGetPoint()

const Ogre::Vector3& Procedural::BezierCurve3::safeGetPoint ( unsigned int  i) const

Safely gets a control point.

References Procedural::Utils::cap(), and Procedural::Utils::modulo().

◆ setNumSeg()

BezierCurve3& Procedural::BezierCurve3::setNumSeg ( unsigned int  numSeg)

Sets number of segments per two control points.

Exceptions
Ogre::InvalidParametersExceptionMinimum of numSeg is 1

References Ogre::Exception::ERR_INVALIDPARAMS, and OGRE_EXCEPT.

Member Data Documentation

◆ mClosed

bool Procedural::BaseSpline3< BezierCurve3 >::mClosed
protectedinherited

Tells if the spline is closed or not.


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