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

Produces a path from Cubic Hermite control points. More...

#include <ProceduralPathGenerators.h>

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

Public Types

typedef CubicHermiteSplineControlPoint< Ogre::Vector3ControlPoint
 

Public Member Functions

CubicHermiteSpline3addPoint (const Ogre::Vector3 &p, const Ogre::Vector3 &before, const Ogre::Vector3 &after)
 Adds a control point. More...
 
CubicHermiteSpline3addPoint (const Ogre::Vector3 &p, const Ogre::Vector3 &tangent)
 Adds a control point. More...
 
CubicHermiteSpline3addPoint (const Ogre::Vector3 &p, CubicHermiteSplineAutoTangentMode autoTangentMode=AT_CATMULL)
 Adds a control point. More...
 
CubicHermiteSpline3addPoint (Ogre::Real x, Ogre::Real y, Ogre::Real z, CubicHermiteSplineAutoTangentMode autoTangentMode=AT_CATMULL)
 Adds a control point. More...
 
const ControlPointsafeGetPoint (unsigned int i) const
 Safely gets a control point. More...
 
const size_t getPointCount () const
 Gets the number of control points. More...
 
Path realizePath ()
 Builds a path from control points. More...
 
CubicHermiteSpline3setNumSeg (unsigned int numSeg)
 Sets the number of segments between 2 control points. More...
 
CubicHermiteSpline3close ()
 Closes the spline. More...
 

Protected Attributes

unsigned int mNumSeg
 The number of segments between 2 control points. More...
 
bool mClosed
 Tells if the spline is closed or not. More...
 

Detailed Description

Produces a path from Cubic Hermite control points.

Member Typedef Documentation

◆ ControlPoint

Member Function Documentation

◆ addPoint() [1/4]

CubicHermiteSpline3& Procedural::CubicHermiteSpline3::addPoint ( const Ogre::Vector3 p,
const Ogre::Vector3 before,
const Ogre::Vector3 after 
)

Adds a control point.

◆ addPoint() [2/4]

CubicHermiteSpline3& Procedural::CubicHermiteSpline3::addPoint ( const Ogre::Vector3 p,
const Ogre::Vector3 tangent 
)

Adds a control point.

◆ addPoint() [3/4]

CubicHermiteSpline3& Procedural::CubicHermiteSpline3::addPoint ( const Ogre::Vector3 p,
CubicHermiteSplineAutoTangentMode  autoTangentMode = AT_CATMULL 
)

◆ addPoint() [4/4]

CubicHermiteSpline3& Procedural::CubicHermiteSpline3::addPoint ( Ogre::Real  x,
Ogre::Real  y,
Ogre::Real  z,
CubicHermiteSplineAutoTangentMode  autoTangentMode = AT_CATMULL 
)

◆ close()

Closes the spline.

◆ getPointCount()

const size_t Procedural::CubicHermiteSpline3::getPointCount ( ) const

Gets the number of control points.

◆ realizePath()

Path Procedural::CubicHermiteSpline3::realizePath ( )

Builds a path from control points.

◆ safeGetPoint()

const ControlPoint& Procedural::CubicHermiteSpline3::safeGetPoint ( unsigned int  i) const

Safely gets a control point.

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

◆ setNumSeg()

CubicHermiteSpline3 & Procedural::BaseSpline3< CubicHermiteSpline3 >::setNumSeg ( unsigned int  numSeg)
inherited

Sets the number of segments between 2 control points.

Exceptions
Ogre::InvalidParametersExceptionMinimum of numSeg is 1

Member Data Documentation

◆ mClosed

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

Tells if the spline is closed or not.

◆ mNumSeg

unsigned int Procedural::BaseSpline3< CubicHermiteSpline3 >::mNumSeg
protectedinherited

The number of segments between 2 control points.


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