GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Private Attributes | List of all members
GLC_Circle Class Reference

GLC_Circle : OpenGL 3D Circle. More...

#include <glc_circle.h>

+ Inheritance diagram for GLC_Circle:

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.
 
- Public Member Functions inherited from GLC_Geometry
 GLC_Geometry (const QString &name, const bool type)
 Default constructor.
 
 GLC_Geometry (const GLC_Geometry &sourceGeom)
 Copy constructor.
 
GLC_Geometryoperator= (const GLC_Geometry &sourceGeom)
 Overload "=" operator.
 
virtual ~GLC_Geometry ()
 Destructor.
 
GLC_uint id () const
 Get Object ID.
 
QString name () const
 Get Object Name.
 
bool isValid (void) const
 Return true if the geometry is valid.
 
bool hasMaterial () const
 Return true if the geometry has material.
 
GLC_MaterialfirstMaterial (void) const
 Return first material of geometry.
 
int materialCount () const
 Return the number of materials.
 
GLC_Materialmaterial (const GLC_uint key) const
 Return the specified mesh sub material.
 
QSet< GLC_Material * > materialSet () const
 Get materials Set.
 
QList< GLC_uintmaterialIds () const
 Get materials ID List.
 
bool containsMaterial (const GLC_uint key) const
 Return true if Material key is in the mesh.
 
bool boundingBoxIsValid () const
 Return true if the bounding box is valid.
 
bool isTransparent () const
 Get the geometry transparency.
 
bool hasTransparentMaterials () const
 Return true if the geometry contains transparent materials.
 
bool usedColorPerVertex () const
 Return true if color per vertex is used.
 
bool typeIsWire () const
 Return true if the geometry type is wireframe.
 
virtual unsigned int faceCount (int lod=0) const
 Get the number of faces.
 
virtual unsigned int VertexCount () const
 Get the number of vertex.
 
GLfloat lineWidth () const
 Return the line width.
 
QColor wireColor () const
 Return this geometry wire color.
 
bool wireDataIsEmpty () const
 Return true if wire data is empty.
 
GLfloatVector wirePositionVector () const
 Return the wire position vector.
 
int wirePolylineCount () const
 Return the number of wire polylines.
 
GLuint wirePolylineOffset (int index) const
 Return the polyline offset from the given index.
 
GLsizei wirePolylineSize (int index) const
 Return the polyline size from the given index.
 
virtual double volume ()
 Return the volume of this geometry.
 
bool vboIsUsed () const
 Return true if this geometry will try to use VBO.
 
virtual void clear ()
 Clear the content of the geometry and makes it empty.
 
virtual void replaceMasterMaterial (GLC_Material *)
 Replace the Master material.
 
void addMaterial (GLC_Material *)
 Add material to the geometry.
 
void colorPerVertex (const bool colorPerVertex)
 Set the color per vertex usage.
 
void updateTransparentMaterialNumber ()
 Update the transparent material number.
 
virtual void reverseNormals ()
 Reverse normal.
 
virtual void setCurrentLod (const int)
 Set the lod Index.
 
void setId (const GLC_uint id)
 Set Geometry Id.
 
void setName (const QString name)
 Set geometry name.
 
GLC_uint addVerticeGroup (const GLfloatVector &vector)
 Add a vertice group to the geometry and returns its id.
 
void setLineWidth (GLfloat lineWidth)
 Set Line width.
 
void setWireColor (const QColor &color)
 Set this geometry wire color.
 
virtual void copyVboToClientSide ()
 Copy VBO to the Client Side.
 
virtual void releaseVboClientSide (bool update=false)
 Release client VBO.
 
virtual void setVboUsage (bool usage)
 Set VBO usage.
 
virtual void glLoadTexture (void)
 Load each textures of materials.
 
virtual void render (const GLC_RenderProperties &)
 Virtual interface for OpenGL execution.
 

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.
 

Additional Inherited Members

- Protected Member Functions inherited from GLC_Geometry
void removeMaterial (GLC_uint)
 Remove the specified material from the geometry.
 
void clearWireAndBoundingBox ()
 Clear the wire data and the bounding box of this geometry.
 
virtual void glPropGeom (const GLC_RenderProperties &)
 Virtual interface for OpenGL Geometry properties.
 
- Protected Attributes inherited from GLC_Geometry
bool m_GeometryIsValid
 Geometry validity.
 
GLC_BoundingBoxm_pBoundingBox
 Bounding box.
 
MaterialHash m_MaterialHash
 Material Hash table.
 
bool m_UseColorPerVertex
 Color per vertex usage.
 
bool m_IsSelected
 Selection state.
 
GLC_WireData m_WireData
 Wire Data.
 
QColor m_WireColor
 The wire color.
 
GLfloat m_LineWidth
 The line width.
 

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)
privatevirtual

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:

©2005-2013 Laurent Ribon