GLC_Sphere : OpenGL 3D Sphere. More...
#include <glc_sphere.h>
Public Member Functions | |
Constructor / Destructor | |
| GLC_Sphere (double radius) | |
| Construct a sphere with the given radius. | |
| GLC_Sphere (const GLC_Sphere &sphere) | |
| Copy constructor. | |
| virtual | ~GLC_Sphere () |
| Destructor. | |
Set Functions | |
| void | setRadius (double Radius) |
| Set Sphere radius. | |
| void | setDiscretion (int TargetDiscret) |
| Set Discretion. | |
Private Member Functions | |
Private services Functions | |
| void | createMesh () |
| Create the sphere mesh. | |
Private Attributes | |
| double | m_Radius |
| Sphere radius. | |
| int | m_Discret |
| Sphere polygon discretisation. | |
| double | m_ThetaMin |
| double | m_ThetaMax |
| double | m_PhiMin |
| double | m_PhiMax |
Static Private Attributes | |
| static quint32 | m_ChunkId = 0xA710 |
| Class chunk id. | |
Get Functions | |
|
| |
| double | radius (void) const |
| Return the Radius of this sphere. | |
| int | discretion (void) const |
| Get Sphere discretion. | |
| virtual GLC_Geometry * | clone () const |
| Return a copy of the Sphere. | |
| virtual const GLC_BoundingBox & | boundingBox (void) |
| Return the sphere bounding box. | |
| static quint32 | chunckID () |
| Return the class Chunk ID. | |
GLC_Sphere : OpenGL 3D Sphere.
An GLC_Sphere is a polygonnal geometry
Definition at line 38 of file glc_sphere.h.
| GLC_Sphere::GLC_Sphere | ( | double | radius | ) |
Construct a sphere with the given radius.
Definition at line 30 of file glc_sphere.cpp.
Referenced by clone().
| GLC_Sphere::GLC_Sphere | ( | const GLC_Sphere & | sphere | ) |
Copy constructor.
Definition at line 43 of file glc_sphere.cpp.
| GLC_Sphere::~GLC_Sphere | ( | ) | [virtual] |
Destructor.
Definition at line 55 of file glc_sphere.cpp.
| const GLC_BoundingBox & GLC_Sphere::boundingBox | ( | void | ) | [virtual] |
Return the sphere bounding box.
Reimplemented from GLC_Mesh.
Definition at line 65 of file glc_sphere.cpp.
References createMesh(), and GLC_Mesh::isEmpty().
| static quint32 GLC_Sphere::chunckID | ( | ) | [static] |
Return the class Chunk ID.
Reimplemented from GLC_Mesh.
| GLC_Geometry * GLC_Sphere::clone | ( | ) | const [virtual] |
Return a copy of the Sphere.
Reimplemented from GLC_Mesh.
Definition at line 60 of file glc_sphere.cpp.
References GLC_Sphere().
| void GLC_Sphere::createMesh | ( | ) | [private] |
Create the sphere mesh.
Definition at line 95 of file glc_sphere.cpp.
References GLC_Mesh::addNormals(), GLC_Mesh::addTexels(), GLC_Mesh::addTrianglesStrip(), GLC_Mesh::addVertice(), GLC_Mesh::finish(), GLC_Geometry::firstMaterial(), GLC_Geometry::hasMaterial(), GLC_Mesh::isEmpty(), m_Discret, m_PhiMax, m_PhiMin, m_Radius, m_ThetaMax, m_ThetaMin, glc::PI, and GLC_Mesh::texelVector().
Referenced by boundingBox().
| int GLC_Sphere::discretion | ( | void | ) | const [inline] |
Get Sphere discretion.
Definition at line 68 of file glc_sphere.h.
| double GLC_Sphere::radius | ( | void | ) | const [inline] |
Return the Radius of this sphere.
Definition at line 64 of file glc_sphere.h.
| void GLC_Sphere::setDiscretion | ( | int | TargetDiscret | ) |
Set Discretion.
Discretion must be > 0
Definition at line 83 of file glc_sphere.cpp.
References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_Discret.
| void GLC_Sphere::setRadius | ( | double | Radius | ) |
Set Sphere radius.
Radius must be > 0
Definition at line 74 of file glc_sphere.cpp.
References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_Radius.
quint32 GLC_Sphere::m_ChunkId = 0xA710 [static, private] |
int GLC_Sphere::m_Discret [private] |
Sphere polygon discretisation.
Definition at line 111 of file glc_sphere.h.
Referenced by createMesh(), and setDiscretion().
double GLC_Sphere::m_PhiMax [private] |
Definition at line 116 of file glc_sphere.h.
Referenced by createMesh().
double GLC_Sphere::m_PhiMin [private] |
Definition at line 115 of file glc_sphere.h.
Referenced by createMesh().
double GLC_Sphere::m_Radius [private] |
Sphere radius.
Definition at line 108 of file glc_sphere.h.
Referenced by createMesh(), and setRadius().
double GLC_Sphere::m_ThetaMax [private] |
Definition at line 114 of file glc_sphere.h.
Referenced by createMesh().
double GLC_Sphere::m_ThetaMin [private] |
Definition at line 113 of file glc_sphere.h.
Referenced by createMesh().