GLC_Circle Class Reference

GLC_Circle : OpenGL 3D Circle. More...

#include <glc_circle.h>

Inheritance diagram for GLC_Circle:
GLC_Geometry

List of all members.

Public Member Functions

Constructor / Destructor

 GLC_Circle (const double &dRadius, double Angle=2.0 *glc::PI)
 Construct an GLC_Circle.
 GLC_Circle (const GLC_Circle &sourceCircle)
 Copy constructor.
virtual ~GLC_Circle ()
 Destructor.
Get Functions

int discretion () const
 Return Circle Discretion.
double radius () const
 Return Circle radius.
double diameter () const
 return Circle diameter
virtual const GLC_BoundingBoxboundingBox ()
 return the circle bounding box
virtual GLC_Geometryclone () const
 Return a copy of the geometry.
Set Functions

void setDiameter (double D)
 Set Circle diameter.
void setRadius (double R)
 Set Circle Radius.
void setDiscretion (int TargetDiscret)
 Set Circle discret.
void setAngle (double AngleRadians)
 Set Circle Angle.

Private Member Functions

OpenGL Functions

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

void createWire ()
 Create the wire.

Private Attributes

double m_Radius
 Circle Radius.
int m_Discret
 Circle Discretion.
double m_Angle
 Angle of circle in radians.
GLuint m_Step
 Circle Step.

Detailed Description

GLC_Circle : OpenGL 3D Circle.

An GLC_Circle is a wire geometry composed of 3d lines
It can be an entire circle or an arc.

Definition at line 40 of file glc_circle.h.


Constructor & Destructor Documentation

GLC_Circle::GLC_Circle ( const double &  dRadius,
double  Angle = 2.0 * glc::PI 
)

Construct an GLC_Circle.

By default, discretion is set to GLC_DISCRET

Definition at line 34 of file glc_circle.cpp.

Referenced by clone().

GLC_Circle::GLC_Circle ( const GLC_Circle sourceCircle  ) 

Copy constructor.

Definition at line 44 of file glc_circle.cpp.

GLC_Circle::~GLC_Circle (  )  [virtual]

Destructor.

Definition at line 53 of file glc_circle.cpp.


Member Function Documentation

const GLC_BoundingBox & GLC_Circle::boundingBox ( void   )  [virtual]
GLC_Geometry * GLC_Circle::clone (  )  const [virtual]

Return a copy of the geometry.

Implements GLC_Geometry.

Definition at line 76 of file glc_circle.cpp.

References GLC_Circle().

void GLC_Circle::createWire (  )  [private]
double GLC_Circle::diameter (  )  const [inline]

return Circle diameter

Definition at line 75 of file glc_circle.h.

int GLC_Circle::discretion (  )  const [inline]

Return Circle Discretion.

Definition at line 67 of file glc_circle.h.

void GLC_Circle::glDraw ( const GLC_RenderProperties renderProperties  )  [private, virtual]

Virtual interface for OpenGL Geometry set up.

This Virtual function is implemented here.
Throw GLC_OpenGlException

Implements GLC_Geometry.

Definition at line 134 of file glc_circle.cpp.

References createWire(), GLC_WireData::glDraw(), GLC_WireData::isEmpty(), and GLC_Geometry::m_WireData.

double GLC_Circle::radius (  )  const [inline]

Return Circle radius.

Definition at line 71 of file glc_circle.h.

void GLC_Circle::setAngle ( double  AngleRadians  ) 

Set Circle Angle.

AngleRadians must be > EPSILON and < 2 PI

Definition at line 118 of file glc_circle.cpp.

References GLC_Geometry::clearWireAndBoundingBox(), m_Angle, and glc::PI.

void GLC_Circle::setDiameter ( double  D  ) 

Set Circle diameter.

Diameter must be > 2 * EPSILON

Definition at line 86 of file glc_circle.cpp.

References setRadius().

void GLC_Circle::setDiscretion ( int  TargetDiscret  ) 

Set Circle discret.

TargetDiscret must be > 0 if TargetDiscret < 6 discretion is set to 6

Definition at line 105 of file glc_circle.cpp.

References GLC_Geometry::clearWireAndBoundingBox(), and m_Discret.

void GLC_Circle::setRadius ( double  R  ) 

Set Circle Radius.

Radius must be > EPSILON

Definition at line 93 of file glc_circle.cpp.

References GLC_Geometry::clearWireAndBoundingBox(), and m_Radius.

Referenced by GLC_RepTrackBallMover::computeRadius(), and setDiameter().


Member Data Documentation

double GLC_Circle::m_Angle [private]

Angle of circle in radians.

Definition at line 142 of file glc_circle.h.

Referenced by createWire(), and setAngle().

int GLC_Circle::m_Discret [private]

Circle Discretion.

Definition at line 139 of file glc_circle.h.

Referenced by createWire(), and setDiscretion().

double GLC_Circle::m_Radius [private]

Circle Radius.

Definition at line 136 of file glc_circle.h.

Referenced by createWire(), and setRadius().

GLuint GLC_Circle::m_Step [private]

Circle Step.

Definition at line 145 of file glc_circle.h.

Referenced by createWire().


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

SourceForge.net Logo

©2005-2011 Laurent Ribon