GLC_Box Class Reference

GLC_Box : OpenGL Box. More...

#include <glc_box.h>

Inheritance diagram for GLC_Box:
GLC_Mesh GLC_Geometry

List of all members.

Public Member Functions

Constructor

 GLC_Box (double, double, double)
 Construct an GLC_Box.
 GLC_Box (const GLC_Box &)
 Copy constructor.
virtual ~GLC_Box ()
 Destructor.
Get Functions

double getLgX (void) const
 Get X length.
double getLgY (void) const
 Get Y length.
double getLgZ (void) const
 Get Z length.
virtual const GLC_BoundingBoxboundingBox (void)
 return the box bounding box
virtual GLC_Geometryclone () const
 Return a copy of the geometry.
Set Functions

void setLgX (double LgX)
 Set X length.
void setLgY (double LgY)
 Set Y length.
void setLgZ (double LgZ)
 Set Z length.

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 box mesh.
void createWire ()
 Create the wire of the mesh.

Private Attributes

double m_dLgX
 X Length.
double m_dLgY
 Y Length.
double m_dLgZ
 Z Length.

Detailed Description

GLC_Box : OpenGL Box.

An GLC_Box is a polygonal geometry
It's a rectangular parallelepiped box centred at (0, 0, 0)

Definition at line 43 of file glc_box.h.


Constructor & Destructor Documentation

GLC_Box::GLC_Box ( double  dLx,
double  dLy,
double  dlz 
)

Construct an GLC_Box.

By default, discretion is set to GLC_POLYDISCRET

Definition at line 33 of file glc_box.cpp.

Referenced by clone().

GLC_Box::GLC_Box ( const GLC_Box box  ) 

Copy constructor.

Definition at line 42 of file glc_box.cpp.

GLC_Box::~GLC_Box (  )  [virtual]

Destructor.

Definition at line 50 of file glc_box.cpp.


Member Function Documentation

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

return the box bounding box

Reimplemented from GLC_Mesh.

Definition at line 60 of file glc_box.cpp.

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

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

Return a copy of the geometry.

Reimplemented from GLC_Mesh.

Definition at line 70 of file glc_box.cpp.

References GLC_Box().

void GLC_Box::createMeshAndWire (  )  [private]
void GLC_Box::createWire (  )  [private]

Create the wire of the mesh.

Definition at line 283 of file glc_box.cpp.

References GLC_Geometry::addVerticeGroup(), GLC_WireData::isEmpty(), m_dLgX, m_dLgY, m_dLgZ, and GLC_Geometry::m_WireData.

Referenced by createMeshAndWire().

double GLC_Box::getLgX ( void   )  const [inline]

Get X length.

Definition at line 68 of file glc_box.h.

double GLC_Box::getLgY ( void   )  const [inline]

Get Y length.

Definition at line 72 of file glc_box.h.

double GLC_Box::getLgZ ( void   )  const [inline]

Get Z length.

Definition at line 76 of file glc_box.h.

void GLC_Box::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 112 of file glc_box.cpp.

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

void GLC_Box::setLgX ( double  LgX  ) 

Set X length.

This Function invalid OpenGL display list LgX must be > 0

Definition at line 81 of file glc_box.cpp.

References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_dLgX.

void GLC_Box::setLgY ( double  LgY  ) 

Set Y length.

This Function invalid OpenGL display list LgY must be > 0

Definition at line 90 of file glc_box.cpp.

References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_dLgY.

void GLC_Box::setLgZ ( double  LgZ  ) 

Set Z length.

This Function invalid OpenGL display list LgZ must be > 0

Definition at line 99 of file glc_box.cpp.

References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_dLgZ.


Member Data Documentation

double GLC_Box::m_dLgX [private]

X Length.

Definition at line 139 of file glc_box.h.

Referenced by createMeshAndWire(), createWire(), and setLgX().

double GLC_Box::m_dLgY [private]

Y Length.

Definition at line 142 of file glc_box.h.

Referenced by createMeshAndWire(), createWire(), and setLgY().

double GLC_Box::m_dLgZ [private]

Z Length.

Definition at line 145 of file glc_box.h.

Referenced by createMeshAndWire(), createWire(), and setLgZ().


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

SourceForge.net Logo

©2005-2011 Laurent Ribon