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

Produces a path by rounding corners of a straight-lines path. More...

#include <ProceduralPathGenerators.h>

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

Public Member Functions

 RoundedCornerSpline3 ()
 Default constructor. More...
 
RoundedCornerSpline3setRadius (Ogre::Real radius)
 Sets the radius of the corners (default = 0.1) More...
 
RoundedCornerSpline3addPoint (const Ogre::Vector3 &p)
 Adds a control point. More...
 
RoundedCornerSpline3addPoint (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 ()
 Builds a shape from control points. More...
 
RoundedCornerSpline3setNumSeg (unsigned int numSeg)
 Sets the number of segments between 2 control points. More...
 
RoundedCornerSpline3close ()
 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 by rounding corners of a straight-lines path.

Constructor & Destructor Documentation

◆ RoundedCornerSpline3()

Procedural::RoundedCornerSpline3::RoundedCornerSpline3 ( )

Default constructor.

Member Function Documentation

◆ addPoint() [1/2]

RoundedCornerSpline3& Procedural::RoundedCornerSpline3::addPoint ( const Ogre::Vector3 p)

Adds a control point.

◆ addPoint() [2/2]

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

Adds a control point.

◆ close()

Closes the spline.

◆ getPointCount()

const size_t Procedural::RoundedCornerSpline3::getPointCount ( ) const

Gets the number of control points.

◆ realizePath()

Path Procedural::RoundedCornerSpline3::realizePath ( )

Builds a shape from control points.

Exceptions
Ogre::InvalidStateExceptionThe path contains no points

◆ safeGetPoint()

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

Safely gets a control point.

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

◆ setNumSeg()

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

Sets the number of segments between 2 control points.

Exceptions
Ogre::InvalidParametersExceptionMinimum of numSeg is 1

◆ setRadius()

RoundedCornerSpline3& Procedural::RoundedCornerSpline3::setRadius ( Ogre::Real  radius)

Sets the radius of the corners (default = 0.1)

Member Data Documentation

◆ mClosed

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

Tells if the spline is closed or not.

◆ mNumSeg

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

The number of segments between 2 control points.


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