GLC_Cone : OpenGL 3D Cone. More...
#include <glc_cone.h>
Public Member Functions | |
Constructor / Destructor | |
| GLC_Cone (double dRadius, double dLength) | |
| Construct an GLC_Cone. | |
| GLC_Cone (const GLC_Cone &sourceCone) | |
| Copy contructor. | |
| virtual | ~GLC_Cone () |
| Destructor. | |
Set Functions | |
| void | setLength (double Length) |
| Set Cone length. | |
| void | setRadius (double Radius) |
| Set Cone radius. | |
| void | setDiscretion (int TargetDiscret) |
| Set Discretion. | |
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 cylinder mesh and wire. | |
Private Attributes | |
| double | m_Radius |
| Cone's radius. | |
| double | m_Length |
| Cone length (Z Axis direction). | |
| int | m_Discret |
| Cone polygon discretisation. | |
Static Private Attributes | |
| static quint32 | m_ChunkId = 0xA709 |
| Class chunk id. | |
Get Functions | |
|
| |
| double | length (void) const |
| Get Lenght of the Cone. | |
| double | radius (void) const |
| Get Radius of cone. | |
| int | discretion (void) const |
| Get Cone discretion. | |
| virtual GLC_Geometry * | clone () const |
| Return a copy of the Cone. | |
| virtual const GLC_BoundingBox & | boundingBox (void) |
| Return the cone bounding box. | |
| static quint32 | chunckID () |
| Return the class Chunk ID. | |
GLC_Cone : OpenGL 3D Cone.
An GLC_Cone is a polygonnal geometry
Definition at line 38 of file glc_cone.h.
| GLC_Cone::GLC_Cone | ( | double | dRadius, | |
| double | dLength | |||
| ) |
| GLC_Cone::GLC_Cone | ( | const GLC_Cone & | sourceCone | ) |
Copy contructor.
Definition at line 40 of file glc_cone.cpp.
| GLC_Cone::~GLC_Cone | ( | ) | [virtual] |
Destructor.
Definition at line 49 of file glc_cone.cpp.
| const GLC_BoundingBox & GLC_Cone::boundingBox | ( | void | ) | [virtual] |
Return the cone bounding box.
Reimplemented from GLC_Mesh.
Definition at line 70 of file glc_cone.cpp.
References createMeshAndWire(), and GLC_Mesh::isEmpty().
| quint32 GLC_Cone::chunckID | ( | ) | [static] |
Return the class Chunk ID.
Reimplemented from GLC_Mesh.
Definition at line 58 of file glc_cone.cpp.
References m_ChunkId.
| GLC_Geometry * GLC_Cone::clone | ( | ) | const [virtual] |
Return a copy of the Cone.
Reimplemented from GLC_Mesh.
Definition at line 64 of file glc_cone.cpp.
References GLC_Cone().
| void GLC_Cone::createMeshAndWire | ( | ) | [private] |
Create the cylinder mesh and wire.
Definition at line 129 of file glc_cone.cpp.
References GLC_Mesh::addNormals(), GLC_Geometry::addPolyline(), GLC_Mesh::addTexels(), GLC_Mesh::addTrianglesStrip(), GLC_Mesh::addVertice(), GLC_Mesh::finish(), GLC_Geometry::firstMaterial(), GLC_Geometry::hasMaterial(), GLC_WireData::isEmpty(), GLC_Mesh::isEmpty(), m_Discret, m_Length, m_Radius, GLC_Geometry::m_WireData, GLC_Mesh::normalVector(), glc::PI, GLC_Mesh::texelVector(), GLC_Vector3d::x(), and glc::Y_AXIS().
Referenced by boundingBox(), and glDraw().
| int GLC_Cone::discretion | ( | void | ) | const [inline] |
Get Cone discretion.
Definition at line 77 of file glc_cone.h.
| void GLC_Cone::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 117 of file glc_cone.cpp.
References createMeshAndWire(), and GLC_Mesh::isEmpty().
| double GLC_Cone::length | ( | void | ) | const [inline] |
Get Lenght of the Cone.
Definition at line 69 of file glc_cone.h.
| double GLC_Cone::radius | ( | void | ) | const [inline] |
Get Radius of cone.
Definition at line 73 of file glc_cone.h.
| void GLC_Cone::setDiscretion | ( | int | TargetDiscret | ) |
Set Discretion.
Discretion must be > 0
Definition at line 101 of file glc_cone.cpp.
References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_Discret.
| void GLC_Cone::setLength | ( | double | Length | ) |
Set Cone length.
Length must be > 0
Definition at line 83 of file glc_cone.cpp.
References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_Length.
| void GLC_Cone::setRadius | ( | double | Radius | ) |
Set Cone radius.
Radius must be > 0
Definition at line 92 of file glc_cone.cpp.
References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_Radius.
quint32 GLC_Cone::m_ChunkId = 0xA709 [static, private] |
Class chunk id.
Reimplemented from GLC_Mesh.
Definition at line 143 of file glc_cone.h.
Referenced by chunckID().
int GLC_Cone::m_Discret [private] |
Cone polygon discretisation.
Definition at line 140 of file glc_cone.h.
Referenced by createMeshAndWire(), and setDiscretion().
double GLC_Cone::m_Length [private] |
Cone length (Z Axis direction).
Definition at line 137 of file glc_cone.h.
Referenced by createMeshAndWire(), GLC_Cone(), and setLength().
double GLC_Cone::m_Radius [private] |
Cone's radius.
Definition at line 134 of file glc_cone.h.
Referenced by createMeshAndWire(), GLC_Cone(), and setRadius().