GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
List of all members
GLC_Polylines Class Reference

GLC_Polylines : OpenGL 3D Polylines. More...

#include <glc_polylines.h>

+ Inheritance diagram for GLC_Polylines:

Public Member Functions

Constructor / Destructor
 GLC_Polylines ()
 Construct an empty polylines.
 
 GLC_Polylines (const GLC_Polylines &polyline)
 Copy constructor.
 
virtual ~GLC_Polylines ()
 Destructor.
 
Get Functions
const GLC_BoundingBoxboundingBox ()
 Return the polylines bounding box.
 
virtual GLC_Geometryclone () const
 Return a copy of the geometry.
 
bool isEmpty () const
 Return true if this polylines is empty.
 
Set Functions
GLC_uint addPolyline (const GLfloatVector &data)
 Add a Polyline to this polylines and returns its id if id are managed.
 
GLC_uint addPolyline (const QList< GLC_Point3d > &pointsList)
 Add polyline with the given list of points to this polylines and returns its id if id are managed.
 
GLC_uint addPolyline (const QList< GLC_Point3df > &pointsList)
 Add polyline with the given list of points to this polylines and returns its id if id are managed.
 
GLC_Polylinesoperator= (const GLC_Polylines &polyline)
 Set this polylines from the given polylines and return a reference of this polylines.
 
void clear ()
 Clear the content of this polylines Data and makes it empty.
 
- 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 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.
 

Protected Member Functions

OpenGL Functions
virtual void glDraw (const GLC_RenderProperties &)
 Virtual interface for OpenGL Geometry set up.
 
- 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.
 

Additional Inherited Members

- 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_Polylines : OpenGL 3D Polylines.

An GLC_Polylines is a group of wire polyline All polylines of this class have the same color

Definition at line 38 of file glc_polylines.h.

Constructor & Destructor Documentation

GLC_Polylines::GLC_Polylines ( )

Construct an empty polylines.

Definition at line 26 of file glc_polylines.cpp.

Referenced by clone().

GLC_Polylines::GLC_Polylines ( const GLC_Polylines polyline)

Copy constructor.

Definition at line 32 of file glc_polylines.cpp.

GLC_Polylines::~GLC_Polylines ( )
virtual

Destructor.

Definition at line 38 of file glc_polylines.cpp.

Member Function Documentation

GLC_uint GLC_Polylines::addPolyline ( const GLfloatVector data)
inline

Add a Polyline to this polylines and returns its id if id are managed.

Definition at line 78 of file glc_polylines.h.

References GLC_WireData::addVerticeGroup(), and GLC_Geometry::m_WireData.

Referenced by GLC_RepCrossMover::createCrossInstance(), GLC_RepFlyMover::createRepresentation(), and GLC_Line::createWire().

GLC_uint GLC_Polylines::addPolyline ( const QList< GLC_Point3d > &  pointsList)

Add polyline with the given list of points to this polylines and returns its id if id are managed.

Definition at line 69 of file glc_polylines.cpp.

References GLC_WireData::addVerticeGroup(), and GLC_Geometry::m_WireData.

GLC_uint GLC_Polylines::addPolyline ( const QList< GLC_Point3df > &  pointsList)

Add polyline with the given list of points to this polylines and returns its id if id are managed.

Definition at line 84 of file glc_polylines.cpp.

References GLC_WireData::addVerticeGroup(), GLC_Geometry::m_WireData, and GLC_Vector3df::x().

const GLC_BoundingBox & GLC_Polylines::boundingBox ( void  )
virtual
void GLC_Polylines::clear ( )
inlinevirtual

Clear the content of this polylines Data and makes it empty.

Reimplemented from GLC_Geometry.

Definition at line 91 of file glc_polylines.h.

References GLC_WireData::clear(), and GLC_Geometry::m_WireData.

Referenced by GLC_Line::clear().

GLC_Geometry * GLC_Polylines::clone ( ) const
virtual

Return a copy of the geometry.

Implements GLC_Geometry.

Reimplemented in GLC_Line.

Definition at line 59 of file glc_polylines.cpp.

References GLC_Polylines().

void GLC_Polylines::glDraw ( const GLC_RenderProperties renderProperties)
protectedvirtual

Virtual interface for OpenGL Geometry set up.

This Virtual function is implemented here.
Throw GLC_OpenGlException

Implements GLC_Geometry.

Reimplemented in GLC_Line.

Definition at line 111 of file glc_polylines.cpp.

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

Referenced by GLC_Line::glDraw().

bool GLC_Polylines::isEmpty ( void  ) const
inline

Return true if this polylines is empty.

Definition at line 67 of file glc_polylines.h.

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

Referenced by glDraw().

GLC_Polylines & GLC_Polylines::operator= ( const GLC_Polylines polyline)

Set this polylines from the given polylines and return a reference of this polylines.

Definition at line 99 of file glc_polylines.cpp.

References GLC_Geometry::operator=().

Referenced by GLC_Line::operator=().


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

©2005-2013 Laurent Ribon