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

GLC_PointCloud : OpenGL 3D cloud of points. More...

#include <glc_pointcloud.h>

+ Inheritance diagram for GLC_PointCloud:

Public Member Functions

Constructor / Destructor
 GLC_PointCloud ()
 Construct an empty cloud of points.
 
 GLC_PointCloud (const GLC_PointCloud &pointCloud)
 Copy constructor.
 
virtual ~GLC_PointCloud ()
 Destructor.
 
Get Functions
const GLC_BoundingBoxboundingBox ()
 Return the point cloud bounding box.
 
virtual GLC_Geometryclone () const
 Return a copy of the geometry.
 
bool isEmpty () const
 Return true if this point cloud is empty.
 
Set Functions
GLC_uint addPoint (const GLfloatVector &data)
 Add a point to this wire and returns its id if id are managed.
 
GLC_uint addPoint (const QList< GLC_Point3d > &pointsList)
 Add the given list of points to this cloud and returns its id if id are managed.
 
GLC_uint addPoint (const QList< GLC_Point3df > &pointsList)
 Add the given list of points to this cloud and returns its id if id are managed.
 
void addColors (const GLfloatVector &colors)
 Add Colors.
 
void addColors (const QList< QColor > &colors)
 Add Colors.
 
GLC_PointCloudoperator= (const GLC_PointCloud &pointcloud)
 Set this point cloud from the given point cloud and return a reference of this point cloud.
 
void clear ()
 Clear the content of this point cloud 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_PointCloud : OpenGL 3D cloud of points.

An GLC_PointCloud is a group of points All points of this class have the same color

Definition at line 40 of file glc_pointcloud.h.

Constructor & Destructor Documentation

GLC_PointCloud::GLC_PointCloud ( )

Construct an empty cloud of points.

Definition at line 26 of file glc_pointcloud.cpp.

Referenced by clone().

GLC_PointCloud::GLC_PointCloud ( const GLC_PointCloud pointCloud)

Copy constructor.

Definition at line 32 of file glc_pointcloud.cpp.

GLC_PointCloud::~GLC_PointCloud ( )
virtual

Destructor.

Definition at line 39 of file glc_pointcloud.cpp.

Member Function Documentation

void GLC_PointCloud::addColors ( const GLfloatVector colors)
inline

Add Colors.

Definition at line 90 of file glc_pointcloud.h.

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

void GLC_PointCloud::addColors ( const QList< QColor > &  colors)

Add Colors.

Definition at line 99 of file glc_pointcloud.cpp.

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

GLC_uint GLC_PointCloud::addPoint ( const GLfloatVector data)
inline

Add a point to this wire and returns its id if id are managed.

Definition at line 80 of file glc_pointcloud.h.

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

Referenced by GLC_Factory::createPointCloud(), GLC_PointSprite::GLC_PointSprite(), and GLC_Point::setCoordinate().

GLC_uint GLC_PointCloud::addPoint ( const QList< GLC_Point3d > &  pointsList)

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

Definition at line 69 of file glc_pointcloud.cpp.

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

GLC_uint GLC_PointCloud::addPoint ( const QList< GLC_Point3df > &  pointsList)

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

Definition at line 84 of file glc_pointcloud.cpp.

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

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

Clear the content of this point cloud Data and makes it empty.

Reimplemented from GLC_Geometry.

Definition at line 100 of file glc_pointcloud.h.

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

Referenced by GLC_Point::setCoordinate().

GLC_Geometry * GLC_PointCloud::clone ( ) const
virtual

Return a copy of the geometry.

Implements GLC_Geometry.

Reimplemented in GLC_PointSprite, and GLC_Point.

Definition at line 60 of file glc_pointcloud.cpp.

References GLC_PointCloud().

void GLC_PointCloud::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_PointSprite, and GLC_Point.

Definition at line 128 of file glc_pointcloud.cpp.

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

Referenced by GLC_Point::glDraw(), and GLC_PointSprite::glDraw().

bool GLC_PointCloud::isEmpty ( void  ) const
inline

Return true if this point cloud is empty.

Definition at line 70 of file glc_pointcloud.h.

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

Referenced by glDraw().

GLC_PointCloud & GLC_PointCloud::operator= ( const GLC_PointCloud pointcloud)

Set this point cloud from the given point cloud and return a reference of this point cloud.

Definition at line 116 of file glc_pointcloud.cpp.

References GLC_Geometry::operator=().


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

©2005-2013 Laurent Ribon