GLC_Disc Class Reference

GLC_Disc : OpenGL 3D Disc. More...

#include <glc_disc.h>

Inheritance diagram for GLC_Disc:
GLC_Mesh GLC_Geometry

List of all members.

Public Member Functions

Constructor / Destructor

 GLC_Disc (double radius, double angle=2.0 *glc::PI)
 Construct a disc with the given radius.
 GLC_Disc (const GLC_Disc &disc)
 Copy constructor.
virtual ~GLC_Disc ()
 Destructor.
Get Functions

virtual const GLC_BoundingBoxboundingBox (void)
 Return this disc bounding box.
virtual GLC_Geometryclone () const
 Return a copy of this Disc.
double radius () const
 Return the radius of this disc.
int discretion () const
 Return the discretion of this disc.
double angle () const
 Return the angle of this disc.
Set Functions

GLC_Discoperator= (const GLC_Disc &disc)
 Set this disc from the given disc and return a reference of this disc.
void setRadius (double radius)
 Set this disc radius to the given radius.
void setDiscretion (int targetDiscret)
 Set this disc discretion to the given discretion.
void setAngle (double angle)
 Set this disc angle in radians.

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
 Disc radius.
int m_Discret
 Disc polygon discretisation.
double m_Angle
 Angle of disc in radians.
GLuint m_Step
 Disc Step.

Detailed Description

GLC_Disc : OpenGL 3D Disc.

An GLC_Disc is a polygonnal disc

Definition at line 36 of file glc_disc.h.


Constructor & Destructor Documentation

GLC_Disc::GLC_Disc ( double  radius,
double  angle = 2.0 * glc::PI 
)

Construct a disc with the given radius.

Definition at line 26 of file glc_disc.cpp.

References createMeshAndWire().

Referenced by clone().

GLC_Disc::GLC_Disc ( const GLC_Disc disc  ) 

Copy constructor.

Definition at line 36 of file glc_disc.cpp.

References createMeshAndWire().

GLC_Disc::~GLC_Disc (  )  [virtual]

Destructor.

Definition at line 46 of file glc_disc.cpp.


Member Function Documentation

double GLC_Disc::angle (  )  const [inline]

Return the angle of this disc.

Definition at line 73 of file glc_disc.h.

Referenced by createMeshAndWire().

const GLC_BoundingBox & GLC_Disc::boundingBox ( void   )  [virtual]

Return this disc bounding box.

Reimplemented from GLC_Mesh.

Definition at line 55 of file glc_disc.cpp.

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

GLC_Geometry * GLC_Disc::clone (  )  const [virtual]

Return a copy of this Disc.

Reimplemented from GLC_Mesh.

Definition at line 64 of file glc_disc.cpp.

References GLC_Disc().

void GLC_Disc::createMeshAndWire (  )  [private]
int GLC_Disc::discretion ( void   )  const [inline]

Return the discretion of this disc.

Definition at line 69 of file glc_disc.h.

void GLC_Disc::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_disc.cpp.

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

GLC_Disc & GLC_Disc::operator= ( const GLC_Disc disc  ) 

Set this disc from the given disc and return a reference of this disc.

Definition at line 72 of file glc_disc.cpp.

References m_Angle, m_Discret, m_Radius, and m_Step.

double GLC_Disc::radius ( void   )  const [inline]

Return the radius of this disc.

Definition at line 65 of file glc_disc.h.

void GLC_Disc::setAngle ( double  angle  ) 

Set this disc angle in radians.

Definition at line 107 of file glc_disc.cpp.

References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_Angle.

Referenced by GLC_CuttingPlane::create3DviewInstance().

void GLC_Disc::setDiscretion ( int  targetDiscret  ) 

Set this disc discretion to the given discretion.

Definition at line 95 of file glc_disc.cpp.

References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_Discret.

void GLC_Disc::setRadius ( double  radius  ) 

Set this disc radius to the given radius.

Definition at line 87 of file glc_disc.cpp.

References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_Radius.


Member Data Documentation

double GLC_Disc::m_Angle [private]

Angle of disc in radians.

Definition at line 130 of file glc_disc.h.

Referenced by createMeshAndWire(), operator=(), and setAngle().

int GLC_Disc::m_Discret [private]

Disc polygon discretisation.

Definition at line 127 of file glc_disc.h.

Referenced by createMeshAndWire(), operator=(), and setDiscretion().

double GLC_Disc::m_Radius [private]

Disc radius.

Definition at line 124 of file glc_disc.h.

Referenced by createMeshAndWire(), operator=(), and setRadius().

GLuint GLC_Disc::m_Step [private]

Disc Step.

Definition at line 133 of file glc_disc.h.

Referenced by createMeshAndWire(), and operator=().


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

SourceForge.net Logo

©2005-2011 Laurent Ribon