#include <glc_box.h>
Public Member Functions | |
Constructor | |
| GLC_Box (double, double, double) | |
| Construct an GLC_Box. | |
| GLC_Box (const GLC_Box &) | |
| Copy constructor. | |
| virtual | ~GLC_Box () |
| Destructor. | |
Get Functions | |
| double | getLgX (void) const |
| Get X length. | |
| double | getLgY (void) const |
| Get Y length. | |
| double | getLgZ (void) const |
| Get Z length. | |
| virtual const GLC_BoundingBox & | boundingBox (void) |
| return the box bounding box | |
| virtual GLC_Geometry * | clone () const |
| Return a copy of the geometry. | |
Set Functions | |
| void | setLgX (double LgX) |
| Set X length. | |
| void | setLgY (double LgY) |
| Set Y length. | |
| void | setLgZ (double LgZ) |
| Set Z length. | |
Private Member Functions | |
OpenGL Functions | |
| virtual void | glDraw (const GLC_RenderProperties &) |
| Virtual interface for OpenGL Geometry set up. | |
Private services Functions | |
| void | createMeshAndWire () |
| Create the box mesh. | |
| void | createWire () |
| Create the wire of the mesh. | |
Private Attributes | |
| double | m_dLgX |
| X Length. | |
| double | m_dLgY |
| Y Length. | |
| double | m_dLgZ |
| Z Length. | |
GLC_Box : OpenGL Box.
An GLC_Box is a polygonal geometry
It's a rectangular parallelepiped box centred at (0, 0, 0)
Definition at line 43 of file glc_box.h.
| GLC_Box::GLC_Box | ( | double | dLx, | |
| double | dLy, | |||
| double | dlz | |||
| ) |
Construct an GLC_Box.
By default, discretion is set to GLC_POLYDISCRET
Definition at line 33 of file glc_box.cpp.
Referenced by clone().
| GLC_Box::GLC_Box | ( | const GLC_Box & | box | ) |
Copy constructor.
Definition at line 42 of file glc_box.cpp.
| GLC_Box::~GLC_Box | ( | ) | [virtual] |
Destructor.
Definition at line 50 of file glc_box.cpp.
| const GLC_BoundingBox & GLC_Box::boundingBox | ( | void | ) | [virtual] |
return the box bounding box
Reimplemented from GLC_Mesh.
Definition at line 60 of file glc_box.cpp.
References createMeshAndWire(), and GLC_Mesh::isEmpty().
| GLC_Geometry * GLC_Box::clone | ( | ) | const [virtual] |
Return a copy of the geometry.
Reimplemented from GLC_Mesh.
Definition at line 70 of file glc_box.cpp.
References GLC_Box().
| void GLC_Box::createMeshAndWire | ( | ) | [private] |
Create the box mesh.
Definition at line 122 of file glc_box.cpp.
References GLC_Mesh::addNormals(), GLC_Mesh::addTexels(), GLC_Mesh::addTrianglesStrip(), GLC_Mesh::addVertice(), createWire(), GLC_Mesh::finish(), GLC_Geometry::firstMaterial(), GLC_Geometry::hasMaterial(), GLC_Mesh::isEmpty(), m_dLgX, m_dLgY, m_dLgZ, and GLC_Mesh::texelVector().
Referenced by boundingBox(), and glDraw().
| void GLC_Box::createWire | ( | ) | [private] |
Create the wire of the mesh.
Definition at line 283 of file glc_box.cpp.
References GLC_Geometry::addVerticeGroup(), GLC_WireData::isEmpty(), m_dLgX, m_dLgY, m_dLgZ, and GLC_Geometry::m_WireData.
Referenced by createMeshAndWire().
| double GLC_Box::getLgX | ( | void | ) | const [inline] |
| double GLC_Box::getLgY | ( | void | ) | const [inline] |
| double GLC_Box::getLgZ | ( | void | ) | const [inline] |
| void GLC_Box::glDraw | ( | const GLC_RenderProperties & | renderProperties | ) | [private, virtual] |
Virtual interface for OpenGL Geometry set up.
This Virtual function is implemented here.
Throw GLC_OpenGlException
Reimplemented from GLC_Mesh.
Definition at line 112 of file glc_box.cpp.
References createMeshAndWire(), and GLC_Mesh::isEmpty().
| void GLC_Box::setLgX | ( | double | LgX | ) |
Set X length.
This Function invalid OpenGL display list LgX must be > 0
Definition at line 81 of file glc_box.cpp.
References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_dLgX.
| void GLC_Box::setLgY | ( | double | LgY | ) |
Set Y length.
This Function invalid OpenGL display list LgY must be > 0
Definition at line 90 of file glc_box.cpp.
References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_dLgY.
| void GLC_Box::setLgZ | ( | double | LgZ | ) |
Set Z length.
This Function invalid OpenGL display list LgZ must be > 0
Definition at line 99 of file glc_box.cpp.
References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_dLgZ.
double GLC_Box::m_dLgX [private] |
X Length.
Definition at line 139 of file glc_box.h.
Referenced by createMeshAndWire(), createWire(), and setLgX().
double GLC_Box::m_dLgY [private] |
Y Length.
Definition at line 142 of file glc_box.h.
Referenced by createMeshAndWire(), createWire(), and setLgY().
double GLC_Box::m_dLgZ [private] |
Z Length.
Definition at line 145 of file glc_box.h.
Referenced by createMeshAndWire(), createWire(), and setLgZ().