Ogre Procedural
0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
|
Builds a shape from a Kochanek Bartels spline. More...
#include <ProceduralShapeGenerators.h>
Public Types | |
typedef KochanekBartelsSplineControlPoint< Ogre::Vector2 > | ControlPoint |
Public Member Functions | |
KochanekBartelsSpline2 & | addPoint (Ogre::Real x, Ogre::Real y) |
Adds a control point. More... | |
KochanekBartelsSpline2 & | addPoint (Ogre::Vector2 p) |
Adds a control point. More... | |
const ControlPoint & | safeGetPoint (unsigned int i) const |
Safely gets a control point. More... | |
KochanekBartelsSpline2 & | addPoint (Ogre::Vector2 p, Ogre::Real t, Ogre::Real b, Ogre::Real c) |
Adds a control point to the spline. More... | |
const size_t | getPointCount () const |
Gets the number of control points. More... | |
Shape | realizeShape () |
Builds a shape from control points. More... | |
KochanekBartelsSpline2 & | setOutSide (Side outSide) |
Sets the out side of the shape. More... | |
Side | getOutSide () const |
Gets the out side of the shape. More... | |
KochanekBartelsSpline2 & | setNumSeg (unsigned int numSeg) |
Sets the number of segments between 2 control points. More... | |
KochanekBartelsSpline2 & | 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... | |
Builds a shape from a Kochanek Bartels spline.
More details here : http://en.wikipedia.org/wiki/Kochanek%E2%80%93Bartels_spline
typedef KochanekBartelsSplineControlPoint<Ogre::Vector2> Procedural::KochanekBartelsSpline2::ControlPoint |
KochanekBartelsSpline2& Procedural::KochanekBartelsSpline2::addPoint | ( | Ogre::Real | x, |
Ogre::Real | y | ||
) |
Adds a control point.
KochanekBartelsSpline2& Procedural::KochanekBartelsSpline2::addPoint | ( | Ogre::Vector2 | p | ) |
Adds a control point.
KochanekBartelsSpline2& Procedural::KochanekBartelsSpline2::addPoint | ( | Ogre::Vector2 | p, |
Ogre::Real | t, | ||
Ogre::Real | b, | ||
Ogre::Real | c | ||
) |
Adds a control point to the spline.
p | Point position |
t | Tension +1 = Tight -1 = Round |
b | Bias +1 = Post-shoot -1 = Pre-shoot |
c | Continuity +1 = Inverted Corners -1 = Box Corners |
|
inherited |
Closes the spline.
|
inherited |
Gets the out side of the shape.
const size_t Procedural::KochanekBartelsSpline2::getPointCount | ( | ) | const |
Gets the number of control points.
Shape Procedural::KochanekBartelsSpline2::realizeShape | ( | ) |
Builds a shape from control points.
const ControlPoint& Procedural::KochanekBartelsSpline2::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.