GLC_Rectangle Class Reference

GLC_Rectangle : OpenGL flat 3D Rectangle. More...

#include <glc_rectangle.h>

Inheritance diagram for GLC_Rectangle:
GLC_Mesh GLC_Geometry

List of all members.

Public Member Functions

Constructor / Destructor

 GLC_Rectangle ()
 Default constructor.
 GLC_Rectangle (double l1, double l2)
 Construct a rectangle with the given lenght.
 GLC_Rectangle (const GLC_Rectangle &)
 Construct a restangle with the given rectangle.
virtual ~GLC_Rectangle ()
 Destructor.
Get Functions

double length1 () const
 Return length 1 of this rectangle.
double length2 () const
 Return length 2 of this rectangle.
virtual GLC_Geometryclone () const
 Clone this rectangle.
virtual const GLC_BoundingBoxboundingBox (void)
 Return this rectangle bounding box.
Set Functions

GLC_RectanglesetRectangle (double l1, double l2)
 Set this rectangle with the given lenght.
void setLength1 (double l1)
 Set this rectangle length 1.
void setLength2 (double l2)
 Set this rectangle length 2.

Private Member Functions

OpenGL Functions

virtual void glDraw (const GLC_RenderProperties &)
 Virtual interface for OpenGL Geometry set up.
Private services Functions

void createMeshAndWire ()
 Create this rectangle mesh and wire.

Private Attributes

double m_L1
 The Rectangle length 1.
double m_L2
 The Rectangle length 2.

Detailed Description

GLC_Rectangle : OpenGL flat 3D Rectangle.

An GLC_Rectangle is just a simple 3D Rectangle

Definition at line 40 of file glc_rectangle.h.


Constructor & Destructor Documentation

GLC_Rectangle::GLC_Rectangle (  ) 

Default constructor.

Definition at line 30 of file glc_rectangle.cpp.

Referenced by clone().

GLC_Rectangle::GLC_Rectangle ( double  l1,
double  l2 
)

Construct a rectangle with the given lenght.

Definition at line 38 of file glc_rectangle.cpp.

GLC_Rectangle::GLC_Rectangle ( const GLC_Rectangle rect  ) 

Construct a restangle with the given rectangle.

Definition at line 46 of file glc_rectangle.cpp.

GLC_Rectangle::~GLC_Rectangle (  )  [virtual]

Destructor.

Definition at line 55 of file glc_rectangle.cpp.


Member Function Documentation

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

Return this rectangle bounding box.

Reimplemented from GLC_Mesh.

Definition at line 69 of file glc_rectangle.cpp.

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

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

Clone this rectangle.

Reimplemented from GLC_Mesh.

Definition at line 63 of file glc_rectangle.cpp.

References GLC_Rectangle().

void GLC_Rectangle::createMeshAndWire (  )  [private]
void GLC_Rectangle::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 110 of file glc_rectangle.cpp.

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

double GLC_Rectangle::length1 (  )  const [inline]

Return length 1 of this rectangle.

Definition at line 66 of file glc_rectangle.h.

double GLC_Rectangle::length2 (  )  const [inline]

Return length 2 of this rectangle.

Definition at line 70 of file glc_rectangle.h.

void GLC_Rectangle::setLength1 ( double  l1  ) 

Set this rectangle length 1.

Definition at line 92 of file glc_rectangle.cpp.

References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_L1.

void GLC_Rectangle::setLength2 ( double  l2  ) 

Set this rectangle length 2.

Definition at line 99 of file glc_rectangle.cpp.

References GLC_Mesh::clearMeshWireAndBoundingBox(), and m_L2.

GLC_Rectangle & GLC_Rectangle::setRectangle ( double  l1,
double  l2 
)

Set this rectangle with the given lenght.

Definition at line 82 of file glc_rectangle.cpp.

References GLC_Mesh::clearMeshWireAndBoundingBox(), m_L1, and m_L2.


Member Data Documentation

double GLC_Rectangle::m_L1 [private]

The Rectangle length 1.

Definition at line 124 of file glc_rectangle.h.

Referenced by createMeshAndWire(), setLength1(), and setRectangle().

double GLC_Rectangle::m_L2 [private]

The Rectangle length 2.

Definition at line 127 of file glc_rectangle.h.

Referenced by createMeshAndWire(), setLength2(), and setRectangle().


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

SourceForge.net Logo

©2005-2010 Laurent Ribon