Ogre Procedural
0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
|
Produces a shape from Cubic Hermite control points. More...
#include <ProceduralShapeGenerators.h>
Public Types | |
typedef CubicHermiteSplineControlPoint< Ogre::Vector2 > | ControlPoint |
Public Member Functions | |
CubicHermiteSpline2 & | addPoint (const Ogre::Vector2 &p, const Ogre::Vector2 &before, const Ogre::Vector2 &after) |
Adds a control point. More... | |
CubicHermiteSpline2 & | addPoint (const Ogre::Vector2 &p, const Ogre::Vector2 &tangent) |
Adds a control point. More... | |
CubicHermiteSpline2 & | addPoint (const Ogre::Vector2 &p, CubicHermiteSplineAutoTangentMode autoTangentMode=AT_CATMULL) |
Adds a control point. More... | |
CubicHermiteSpline2 & | addPoint (Ogre::Real x, Ogre::Real y, CubicHermiteSplineAutoTangentMode autoTangentMode=AT_CATMULL) |
Adds a control point. More... | |
const ControlPoint & | safeGetPoint (unsigned int i) const |
Safely gets a control point. More... | |
const size_t | getPointCount () const |
Gets the number of control points. More... | |
Shape | realizeShape () |
Builds a shape from control points. More... | |
CubicHermiteSpline2 & | setOutSide (Side outSide) |
Sets the out side of the shape. More... | |
Side | getOutSide () const |
Gets the out side of the shape. More... | |
CubicHermiteSpline2 & | setNumSeg (unsigned int numSeg) |
Sets the number of segments between 2 control points. More... | |
CubicHermiteSpline2 & | close () |
Closes the spline. More... | |
Protected Attributes | |
unsigned int | mNumSeg |
The number of segments between 2 control points. More... | |
bool | mClosed |
Whether the shape will be closed or not. More... | |
Side | mOutSide |
The "out" side of the shape. More... | |
Produces a shape from Cubic Hermite control points.
CubicHermiteSpline2& Procedural::CubicHermiteSpline2::addPoint | ( | const Ogre::Vector2 & | p, |
const Ogre::Vector2 & | before, | ||
const Ogre::Vector2 & | after | ||
) |
Adds a control point.
CubicHermiteSpline2& Procedural::CubicHermiteSpline2::addPoint | ( | const Ogre::Vector2 & | p, |
const Ogre::Vector2 & | tangent | ||
) |
Adds a control point.
CubicHermiteSpline2& Procedural::CubicHermiteSpline2::addPoint | ( | const Ogre::Vector2 & | p, |
CubicHermiteSplineAutoTangentMode | autoTangentMode = AT_CATMULL |
||
) |
CubicHermiteSpline2& Procedural::CubicHermiteSpline2::addPoint | ( | Ogre::Real | x, |
Ogre::Real | y, | ||
CubicHermiteSplineAutoTangentMode | autoTangentMode = AT_CATMULL |
||
) |
|
inherited |
Closes the spline.
|
inherited |
Gets the out side of the shape.
const size_t Procedural::CubicHermiteSpline2::getPointCount | ( | ) | const |
Gets the number of control points.
Shape Procedural::CubicHermiteSpline2::realizeShape | ( | ) |
Builds a shape from control points.
const ControlPoint& Procedural::CubicHermiteSpline2::safeGetPoint | ( | unsigned int | i | ) | const |
Safely gets a control point.
References Procedural::Utils::cap(), and Procedural::Utils::modulo().
|
inherited |
Sets the number of segments between 2 control points.
Ogre::InvalidParametersException | Minimum of numSeg is 1 |
|
inherited |
Sets the out side of the shape.
|
protectedinherited |
Whether the shape will be closed or not.
|
protectedinherited |
The number of segments between 2 control points.
|
protectedinherited |
The "out" side of the shape.