Ogre Procedural
0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
|
Produces a path by rounding corners of a straight-lines path. More...
#include <ProceduralPathGenerators.h>
Public Member Functions | |
RoundedCornerSpline3 () | |
Default constructor. More... | |
RoundedCornerSpline3 & | setRadius (Ogre::Real radius) |
Sets the radius of the corners (default = 0.1) More... | |
RoundedCornerSpline3 & | addPoint (const Ogre::Vector3 &p) |
Adds a control point. More... | |
RoundedCornerSpline3 & | addPoint (Ogre::Real x, Ogre::Real y, Ogre::Real z) |
Adds a control point. More... | |
const Ogre::Vector3 & | safeGetPoint (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 shape from control points. More... | |
RoundedCornerSpline3 & | setNumSeg (unsigned int numSeg) |
Sets the number of segments between 2 control points. More... | |
RoundedCornerSpline3 & | close () |
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... | |
Produces a path by rounding corners of a straight-lines path.
Procedural::RoundedCornerSpline3::RoundedCornerSpline3 | ( | ) |
Default constructor.
RoundedCornerSpline3& Procedural::RoundedCornerSpline3::addPoint | ( | const Ogre::Vector3 & | p | ) |
Adds a control point.
RoundedCornerSpline3& Procedural::RoundedCornerSpline3::addPoint | ( | Ogre::Real | x, |
Ogre::Real | y, | ||
Ogre::Real | z | ||
) |
Adds a control point.
|
inherited |
Closes the spline.
const size_t Procedural::RoundedCornerSpline3::getPointCount | ( | ) | const |
Gets the number of control points.
Path Procedural::RoundedCornerSpline3::realizePath | ( | ) |
Builds a shape from control points.
Ogre::InvalidStateException | The path contains no points |
const Ogre::Vector3& Procedural::RoundedCornerSpline3::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 |
RoundedCornerSpline3& Procedural::RoundedCornerSpline3::setRadius | ( | Ogre::Real | radius | ) |
Sets the radius of the corners (default = 0.1)
|
protectedinherited |
Tells if the spline is closed or not.
|
protectedinherited |
The number of segments between 2 control points.