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

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

#include <ProceduralShapeGenerators.h>

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

Public Member Functions

 RoundedCornerSpline2 ()
 
RoundedCornerSpline2setRadius (Ogre::Real radius)
 Sets the radius of the corners. More...
 
RoundedCornerSpline2addPoint (const Ogre::Vector2 &p)
 Adds a control point. More...
 
RoundedCornerSpline2addPoint (Ogre::Real x, Ogre::Real y)
 Adds a control point. More...
 
const Ogre::Vector2safeGetPoint (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...
 
RoundedCornerSpline2setOutSide (Side outSide)
 Sets the out side of the shape. More...
 
Side getOutSide () const
 Gets the out side of the shape. More...
 
RoundedCornerSpline2setNumSeg (unsigned int numSeg)
 Sets the number of segments between 2 control points. More...
 
RoundedCornerSpline2close ()
 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...
 

Detailed Description

Produces a shape from Cubic Hermite control points.

Constructor & Destructor Documentation

◆ RoundedCornerSpline2()

Procedural::RoundedCornerSpline2::RoundedCornerSpline2 ( )

Member Function Documentation

◆ addPoint() [1/2]

RoundedCornerSpline2& Procedural::RoundedCornerSpline2::addPoint ( const Ogre::Vector2 p)

Adds a control point.

◆ addPoint() [2/2]

RoundedCornerSpline2& Procedural::RoundedCornerSpline2::addPoint ( Ogre::Real  x,
Ogre::Real  y 
)

Adds a control point.

◆ close()

Closes the spline.

◆ getOutSide()

Gets the out side of the shape.

◆ getPointCount()

const size_t Procedural::RoundedCornerSpline2::getPointCount ( ) const

Gets the number of control points.

◆ realizeShape()

Shape Procedural::RoundedCornerSpline2::realizeShape ( )

Builds a shape from control points.

Exceptions
Ogre::InvalidStateExceptionThe path contains no points

◆ safeGetPoint()

const Ogre::Vector2& Procedural::RoundedCornerSpline2::safeGetPoint ( unsigned int  i) const

Safely gets a control point.

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

◆ setNumSeg()

RoundedCornerSpline2 & Procedural::BaseSpline2< RoundedCornerSpline2 >::setNumSeg ( unsigned int  numSeg)
inherited

Sets the number of segments between 2 control points.

Exceptions
Ogre::InvalidParametersExceptionMinimum of numSeg is 1

◆ setOutSide()

RoundedCornerSpline2 & Procedural::BaseSpline2< RoundedCornerSpline2 >::setOutSide ( Side  outSide)
inherited

Sets the out side of the shape.

◆ setRadius()

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

Sets the radius of the corners.

Member Data Documentation

◆ mClosed

bool Procedural::BaseSpline2< RoundedCornerSpline2 >::mClosed
protectedinherited

Whether the shape will be closed or not.

◆ mNumSeg

unsigned int Procedural::BaseSpline2< RoundedCornerSpline2 >::mNumSeg
protectedinherited

The number of segments between 2 control points.

◆ mOutSide

Side Procedural::BaseSpline2< RoundedCornerSpline2 >::mOutSide
protectedinherited

The "out" side of the shape.


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