GLC_Cone Class Reference

GLC_Cone : OpenGL 3D Cone. More...

#include <glc_cone.h>

Inheritance diagram for GLC_Cone:
GLC_Mesh GLC_Geometry

List of all members.

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_Geometryclone () const
 Return a copy of the Cone.
virtual const GLC_BoundingBoxboundingBox (void)
 Return the cone bounding box.
static quint32 chunckID ()
 Return the class Chunk ID.

Detailed Description

GLC_Cone : OpenGL 3D Cone.

An GLC_Cone is a polygonnal geometry

Definition at line 36 of file glc_cone.h.


Constructor & Destructor Documentation

GLC_Cone::GLC_Cone ( double  dRadius,
double  dLength 
)

Construct an GLC_Cone.

By default, discretion is set to GLC_POLYDISCRET
By default, Axis of Cylinder is Z Axis dRadius must be > 0 dLength must be > 0

Definition at line 29 of file glc_cone.cpp.

References m_Length, and m_Radius.

Referenced by clone().

GLC_Cone::GLC_Cone ( const GLC_Cone sourceCone  ) 

Copy contructor.

Definition at line 38 of file glc_cone.cpp.

GLC_Cone::~GLC_Cone (  )  [virtual]

Destructor.

Definition at line 47 of file glc_cone.cpp.


Member Function Documentation

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

Return the cone bounding box.

Reimplemented from GLC_Mesh.

Definition at line 68 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 56 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 62 of file glc_cone.cpp.

References GLC_Cone().

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

Get Cone discretion.

Definition at line 75 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 115 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 67 of file glc_cone.h.

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

Get Radius of cone.

Definition at line 71 of file glc_cone.h.

void GLC_Cone::setDiscretion ( int  TargetDiscret  ) 

Set Discretion.

Discretion must be > 0

Definition at line 99 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 81 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 90 of file glc_cone.cpp.

References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_Radius.


Member Data Documentation

quint32 GLC_Cone::m_ChunkId = 0xA709 [static, private]

Class chunk id.

Reimplemented from GLC_Mesh.

Definition at line 141 of file glc_cone.h.

Referenced by chunckID().

int GLC_Cone::m_Discret [private]

Cone polygon discretisation.

Definition at line 138 of file glc_cone.h.

Referenced by createMeshAndWire(), and setDiscretion().

double GLC_Cone::m_Length [private]

Cone length (Z Axis direction).

Definition at line 135 of file glc_cone.h.

Referenced by createMeshAndWire(), GLC_Cone(), and setLength().

double GLC_Cone::m_Radius [private]

Cone's radius.

Definition at line 132 of file glc_cone.h.

Referenced by createMeshAndWire(), GLC_Cone(), and setRadius().


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

SourceForge.net Logo

©2005-2011 Laurent Ribon