GLC_Rectangle : OpenGL flat 3D Rectangle. More...
#include <glc_rectangle.h>
Public Member Functions | |
Constructor / Destructor | |
GLC_Rectangle () | |
Default constructor. | |
GLC_Rectangle (double l1, double l2) | |
Construct a rectangle with the given lenght. | |
GLC_Rectangle (const GLC_Rectangle &) | |
Construct a restangle with the given rectangle. | |
virtual | ~GLC_Rectangle () |
Destructor. | |
Get Functions | |
double | length1 () const |
Return length 1 of this rectangle. | |
double | length2 () const |
Return length 2 of this rectangle. | |
virtual GLC_Geometry * | clone () const |
Clone this rectangle. | |
virtual const GLC_BoundingBox & | boundingBox (void) |
Return this rectangle bounding box. | |
Set Functions | |
GLC_Rectangle & | setRectangle (double l1, double l2) |
Set this rectangle with the given lenght. | |
void | setLength1 (double l1) |
Set this rectangle length 1. | |
void | setLength2 (double l2) |
Set this rectangle length 2. | |
Private Member Functions | |
OpenGL Functions | |
virtual void | glDraw (const GLC_RenderProperties &) |
Virtual interface for OpenGL Geometry set up. | |
Private services Functions | |
void | createMeshAndWire () |
Create this rectangle mesh and wire. | |
Private Attributes | |
double | m_L1 |
The Rectangle length 1. | |
double | m_L2 |
The Rectangle length 2. |
GLC_Rectangle : OpenGL flat 3D Rectangle.
An GLC_Rectangle is just a simple 3D Rectangle
Definition at line 38 of file glc_rectangle.h.
GLC_Rectangle::GLC_Rectangle | ( | ) |
GLC_Rectangle::GLC_Rectangle | ( | double | l1, | |
double | l2 | |||
) |
Construct a rectangle with the given lenght.
Definition at line 36 of file glc_rectangle.cpp.
GLC_Rectangle::GLC_Rectangle | ( | const GLC_Rectangle & | rect | ) |
Construct a restangle with the given rectangle.
Definition at line 44 of file glc_rectangle.cpp.
GLC_Rectangle::~GLC_Rectangle | ( | ) | [virtual] |
Destructor.
Definition at line 53 of file glc_rectangle.cpp.
const GLC_BoundingBox & GLC_Rectangle::boundingBox | ( | void | ) | [virtual] |
Return this rectangle bounding box.
Reimplemented from GLC_Mesh.
Definition at line 67 of file glc_rectangle.cpp.
References createMeshAndWire(), and GLC_Mesh::isEmpty().
GLC_Geometry * GLC_Rectangle::clone | ( | ) | const [virtual] |
Clone this rectangle.
Reimplemented from GLC_Mesh.
Definition at line 61 of file glc_rectangle.cpp.
References GLC_Rectangle().
void GLC_Rectangle::createMeshAndWire | ( | ) | [private] |
Create this rectangle mesh and wire.
Definition at line 122 of file glc_rectangle.cpp.
References GLC_Mesh::addNormals(), GLC_Mesh::addTexels(), GLC_Mesh::addTrianglesStrip(), GLC_Mesh::addVertice(), GLC_Geometry::addVerticeGroup(), GLC_Mesh::finish(), GLC_Geometry::firstMaterial(), GLC_Geometry::hasMaterial(), GLC_Mesh::isEmpty(), m_L1, m_L2, and GLC_Mesh::texelVector().
Referenced by boundingBox(), and glDraw().
void GLC_Rectangle::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 108 of file glc_rectangle.cpp.
References createMeshAndWire(), and GLC_Mesh::isEmpty().
double GLC_Rectangle::length1 | ( | ) | const [inline] |
Return length 1 of this rectangle.
Definition at line 64 of file glc_rectangle.h.
double GLC_Rectangle::length2 | ( | ) | const [inline] |
Return length 2 of this rectangle.
Definition at line 68 of file glc_rectangle.h.
void GLC_Rectangle::setLength1 | ( | double | l1 | ) |
Set this rectangle length 1.
Definition at line 90 of file glc_rectangle.cpp.
References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_L1.
void GLC_Rectangle::setLength2 | ( | double | l2 | ) |
Set this rectangle length 2.
Definition at line 97 of file glc_rectangle.cpp.
References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_L2.
GLC_Rectangle & GLC_Rectangle::setRectangle | ( | double | l1, | |
double | l2 | |||
) |
Set this rectangle with the given lenght.
Definition at line 80 of file glc_rectangle.cpp.
References GLC_Mesh::clearMeshWireAndBoundingBox(), m_L1, and m_L2.
double GLC_Rectangle::m_L1 [private] |
The Rectangle length 1.
Definition at line 122 of file glc_rectangle.h.
Referenced by createMeshAndWire(), setLength1(), and setRectangle().
double GLC_Rectangle::m_L2 [private] |
The Rectangle length 2.
Definition at line 125 of file glc_rectangle.h.
Referenced by createMeshAndWire(), setLength2(), and setRectangle().