GLC_Sphere Class Reference

GLC_Sphere : OpenGL 3D Sphere. More...

#include <glc_sphere.h>

Inheritance diagram for GLC_Sphere:
GLC_Mesh GLC_Geometry

List of all members.

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

OpenGL Functions

virtual void glDraw (const GLC_RenderProperties &)
 Virtual interface for OpenGL Geometry set up.
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_Geometryclone () const
 Return a copy of the Sphere.
virtual const GLC_BoundingBoxboundingBox (void)
 Return the sphere bounding box.
static quint32 chunckID ()
 Return the class Chunk ID.

Detailed Description

GLC_Sphere : OpenGL 3D Sphere.

An GLC_Sphere is a polygonnal geometry

Definition at line 38 of file glc_sphere.h.


Constructor & Destructor Documentation

GLC_Sphere::GLC_Sphere ( double  radius  ) 

Construct a sphere with the given radius.

Definition at line 30 of file glc_sphere.cpp.

References createMesh().

Referenced by clone().

GLC_Sphere::GLC_Sphere ( const GLC_Sphere sphere  ) 

Copy constructor.

Definition at line 43 of file glc_sphere.cpp.

References createMesh().

GLC_Sphere::~GLC_Sphere (  )  [virtual]

Destructor.

Definition at line 55 of file glc_sphere.cpp.


Member Function Documentation

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]
int GLC_Sphere::discretion ( void   )  const [inline]

Get Sphere discretion.

Definition at line 68 of file glc_sphere.h.

void GLC_Sphere::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 95 of file glc_sphere.cpp.

References createMesh(), and GLC_Mesh::isEmpty().

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.


Member Data Documentation

quint32 GLC_Sphere::m_ChunkId = 0xA710 [static, private]

Class chunk id.

Reimplemented from GLC_Mesh.

Definition at line 130 of file glc_sphere.h.

int GLC_Sphere::m_Discret [private]

Sphere polygon discretisation.

Definition at line 122 of file glc_sphere.h.

Referenced by createMesh(), and setDiscretion().

double GLC_Sphere::m_PhiMax [private]

Definition at line 127 of file glc_sphere.h.

Referenced by createMesh().

double GLC_Sphere::m_PhiMin [private]

Definition at line 126 of file glc_sphere.h.

Referenced by createMesh().

double GLC_Sphere::m_Radius [private]

Sphere radius.

Definition at line 119 of file glc_sphere.h.

Referenced by createMesh(), and setRadius().

double GLC_Sphere::m_ThetaMax [private]

Definition at line 125 of file glc_sphere.h.

Referenced by createMesh().

double GLC_Sphere::m_ThetaMin [private]

Definition at line 124 of file glc_sphere.h.

Referenced by createMesh().


The documentation for this class was generated from the following files:

SourceForge.net Logo

©2005-2011 Laurent Ribon