Ogre Procedural
0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
|
Builds a triangele shape. More...
#include <ProceduralShapeGenerators.h>
Public Member Functions | |
TriangleShape () | |
Default constructor. More... | |
TriangleShape & | setLength (Ogre::Real length) |
Creates an equilateral triangle. More... | |
TriangleShape & | setLengthA (Ogre::Real length) |
Sets length of edge A. More... | |
TriangleShape & | setLengthB (Ogre::Real length) |
Sets length of edge B. More... | |
TriangleShape & | setLengthC (Ogre::Real length) |
Sets length of edge C. More... | |
Shape | realizeShape () |
Builds the shape. More... | |
Builds a triangele shape.
Procedural::TriangleShape::TriangleShape | ( | ) |
Default constructor.
Shape Procedural::TriangleShape::realizeShape | ( | ) |
Builds the shape.
References Ogre::Math::ACos(), Procedural::Shape::addPoint(), Procedural::Shape::close(), Ogre::Math::Cos(), Ogre::Math::Sin(), and Procedural::Shape::translate().
TriangleShape& Procedural::TriangleShape::setLength | ( | Ogre::Real | length | ) |
Creates an equilateral triangle.
Ogre::InvalidStateException | Length of triangle edges must be longer than 0! |
References Ogre::Exception::ERR_INVALID_STATE, and OGRE_EXCEPT.
TriangleShape& Procedural::TriangleShape::setLengthA | ( | Ogre::Real | length | ) |
Sets length of edge A.
Ogre::InvalidStateException | Length of triangle edge must be longer than 0! |
Ogre::InvalidStateException | Length of triangle edge A must be shorter or equal than B+C! |
References Ogre::Exception::ERR_INVALID_STATE, and OGRE_EXCEPT.
TriangleShape& Procedural::TriangleShape::setLengthB | ( | Ogre::Real | length | ) |
Sets length of edge B.
Ogre::InvalidStateException | Length of triangle edge must be longer than 0! |
Ogre::InvalidStateException | Length of triangle edge A must be shorter or equal than B+C! |
References Ogre::Exception::ERR_INVALID_STATE, and OGRE_EXCEPT.
TriangleShape& Procedural::TriangleShape::setLengthC | ( | Ogre::Real | length | ) |
Sets length of edge C.
Ogre::InvalidStateException | Length of triangle edge must be longer than 0! |
Ogre::InvalidStateException | Length of triangle edge A must be shorter or equal than B+C! |
References Ogre::Exception::ERR_INVALID_STATE, and OGRE_EXCEPT.