The class represents a polygon in 3D space. More...
#include <OgrePolygon.h>
Public Types | |
typedef vector< Vector3 >::type | VertexList |
typedef multimap< Vector3, Vector3 >::type | EdgeMap |
typedef std::pair< Vector3, Vector3 > | Edge |
Public Member Functions | |
Polygon () | |
~Polygon () | |
Polygon (const Polygon &cpy) | |
void | insertVertex (const Vector3 &vdata, size_t vertexIndex) |
Inserts a vertex at a specific position. | |
void | insertVertex (const Vector3 &vdata) |
Inserts a vertex at the end of the polygon. | |
const Vector3 & | getVertex (size_t vertex) const |
Returns a vertex. | |
void | setVertex (const Vector3 &vdata, size_t vertexIndex) |
Sets a specific vertex of a polygon. | |
void | removeDuplicates (void) |
Removes duplicate vertices from a polygon. | |
size_t | getVertexCount (void) const |
Vertex count. | |
const Vector3 & | getNormal (void) const |
Returns the polygon normal. | |
void | deleteVertex (size_t vertex) |
Deletes a specific vertex. | |
bool | isPointInside (const Vector3 &point) const |
Determines if a point is inside the polygon. | |
void | storeEdges (EdgeMap *edgeMap) const |
Stores the edges of the polygon in ccw order. | |
void | reset (void) |
Resets the object. | |
bool | operator== (const Polygon &rhs) const |
Determines if the current object is equal to the compared one. | |
bool | operator!= (const Polygon &rhs) const |
Determines if the current object is not equal to the compared one. | |
Protected Member Functions | |
void | updateNormal (void) const |
Updates the normal. | |
Protected Attributes | |
VertexList | mVertexList |
Vector3 | mNormal |
bool | mIsNormalSet |
Friends | |
_OgreExport friend std::ostream & | operator<< (std::ostream &strm, const Polygon &poly) |
Prints out the polygon data. |
The class represents a polygon in 3D space.
Definition at line 51 of file OgrePolygon.h.
typedef std::pair< Vector3, Vector3> Ogre::Polygon::Edge |
Definition at line 58 of file OgrePolygon.h.
typedef multimap<Vector3, Vector3>::type Ogre::Polygon::EdgeMap |
Definition at line 57 of file OgrePolygon.h.
typedef vector<Vector3>::type Ogre::Polygon::VertexList |
Definition at line 55 of file OgrePolygon.h.
Ogre::Polygon::Polygon | ( | ) |
Ogre::Polygon::~Polygon | ( | ) |
Ogre::Polygon::Polygon | ( | const Polygon & | cpy | ) |
void Ogre::Polygon::deleteVertex | ( | size_t | vertex | ) |
Deletes a specific vertex.
const Vector3& Ogre::Polygon::getNormal | ( | void | ) | const |
Returns the polygon normal.
const Vector3& Ogre::Polygon::getVertex | ( | size_t | vertex | ) | const |
Returns a vertex.
size_t Ogre::Polygon::getVertexCount | ( | void | ) | const |
Vertex count.
void Ogre::Polygon::insertVertex | ( | const Vector3 & | vdata | ) |
Inserts a vertex at the end of the polygon.
void Ogre::Polygon::insertVertex | ( | const Vector3 & | vdata, | |
size_t | vertexIndex | |||
) |
Inserts a vertex at a specific position.
bool Ogre::Polygon::isPointInside | ( | const Vector3 & | point | ) | const |
Determines if a point is inside the polygon.
bool Ogre::Polygon::operator!= | ( | const Polygon & | rhs | ) | const |
Determines if the current object is not equal to the compared one.
Definition at line 132 of file OgrePolygon.h.
bool Ogre::Polygon::operator== | ( | const Polygon & | rhs | ) | const |
Determines if the current object is equal to the compared one.
void Ogre::Polygon::removeDuplicates | ( | void | ) |
Removes duplicate vertices from a polygon.
void Ogre::Polygon::reset | ( | void | ) |
Resets the object.
void Ogre::Polygon::setVertex | ( | const Vector3 & | vdata, | |
size_t | vertexIndex | |||
) |
Sets a specific vertex of a polygon.
void Ogre::Polygon::storeEdges | ( | EdgeMap * | edgeMap | ) | const |
Stores the edges of the polygon in ccw order.
The vertices are copied so the user has to take the deletion into account.
void Ogre::Polygon::updateNormal | ( | void | ) | const [protected] |
Updates the normal.
_OgreExport friend std::ostream& operator<< | ( | std::ostream & | strm, | |
const Polygon & | poly | |||
) | [friend] |
Prints out the polygon data.
bool Ogre::Polygon::mIsNormalSet [mutable, protected] |
Definition at line 63 of file OgrePolygon.h.
Vector3 Ogre::Polygon::mNormal [mutable, protected] |
Definition at line 62 of file OgrePolygon.h.
VertexList Ogre::Polygon::mVertexList [protected] |
Definition at line 61 of file OgrePolygon.h.
Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Fri May 25 23:38:57 2012