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

GLC_PointSprite : OpenGL 3D Point Sprite Using extension : GL_ARB_point_parameters. More...

#include <glc_pointsprite.h>

+ Inheritance diagram for GLC_PointSprite:

Public Member Functions

Constructor / Destructor
 GLC_PointSprite (float, GLC_Material *)
 Default constructor.
 
 GLC_PointSprite (const GLC_PointSprite &point)
 Copy constructor.
 
virtual ~GLC_PointSprite ()
 Default destructor.
 
Set Functions
void setSize (float size)
 Return the point size.
 
void setPointDistanceAttenuation (QVector< float >)
 Set the point distance attenuation values.
 
void setFadeThresoldSize (float value)
 Set the fade thresold size.
 
- Public Member Functions inherited from GLC_PointCloud
 GLC_PointCloud ()
 Construct an empty cloud of points.
 
 GLC_PointCloud (const GLC_PointCloud &pointCloud)
 Copy constructor.
 
virtual ~GLC_PointCloud ()
 Destructor.
 
const GLC_BoundingBoxboundingBox ()
 Return the point cloud bounding box.
 
bool isEmpty () const
 Return true if this point cloud is empty.
 
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.
 

Private Member Functions

OpenGL Functions
virtual void render (const GLC_RenderProperties &)
 Specific glExecute method.
 
virtual void glDraw (const GLC_RenderProperties &)
 Virtual interface for OpenGL Geometry set up.
 

Private Attributes

float m_Size
 The point size.
 
QVector< float > m_DistanceAttenuation
 The Distance attenuation values.
 
float m_FadeThresoldSize
 The Fade Thresold Size.
 

Static Private Attributes

static float m_MaxSize = -1.0f
 The maximum point size.
 

Get Functions

float size () const
 Return the point size.
 
virtual GLC_Geometryclone () const
 Return a copy of the geometry.
 
float fadeThresoldSize ()
 Return the fade thresold size.
 
static float maximumPointSize ()
 Return the maximum point size.
 

Additional Inherited Members

OpenGL Functions
- 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_PointSprite : OpenGL 3D Point Sprite Using extension : GL_ARB_point_parameters.

An GLC_PointSprite is just a simple 3D Sprite Point

Definition at line 40 of file glc_pointsprite.h.

Constructor & Destructor Documentation

GLC_PointSprite::GLC_PointSprite ( float  size,
GLC_Material pMaterial 
)

Default constructor.

The material must exist and had texture

Definition at line 36 of file glc_pointsprite.cpp.

References GLC_Geometry::addMaterial(), GLC_PointCloud::addPoint(), GLC_Material::hasTexture(), and m_DistanceAttenuation.

Referenced by clone().

GLC_PointSprite::GLC_PointSprite ( const GLC_PointSprite point)

Copy constructor.

Definition at line 56 of file glc_pointsprite.cpp.

GLC_PointSprite::~GLC_PointSprite ( )
virtual

Default destructor.

Definition at line 65 of file glc_pointsprite.cpp.

Member Function Documentation

GLC_Geometry * GLC_PointSprite::clone ( ) const
virtual

Return a copy of the geometry.

Reimplemented from GLC_PointCloud.

Definition at line 71 of file glc_pointsprite.cpp.

References GLC_PointSprite().

float GLC_PointSprite::fadeThresoldSize ( )
inline

Return the fade thresold size.

Definition at line 71 of file glc_pointsprite.h.

void GLC_PointSprite::glDraw ( const GLC_RenderProperties renderProperties)
privatevirtual

Virtual interface for OpenGL Geometry set up.

This Virtual function is implemented here.

Reimplemented from GLC_PointCloud.

Definition at line 181 of file glc_pointsprite.cpp.

References GLC_PointCloud::glDraw().

Referenced by render().

static float GLC_PointSprite::maximumPointSize ( )
inlinestatic

Return the maximum point size.

Return -1 if the size is unknown

Definition at line 76 of file glc_pointsprite.h.

void GLC_PointSprite::render ( const GLC_RenderProperties renderProperties)
privatevirtual
void GLC_PointSprite::setFadeThresoldSize ( float  value)
inline

Set the fade thresold size.

Definition at line 95 of file glc_pointsprite.h.

void GLC_PointSprite::setPointDistanceAttenuation ( QVector< float >  parameters)

Set the point distance attenuation values.

Vector size must be equal to 3

Definition at line 89 of file glc_pointsprite.cpp.

References m_DistanceAttenuation.

void GLC_PointSprite::setSize ( float  size)

Return the point size.

Definition at line 77 of file glc_pointsprite.cpp.

References GLC_Geometry::m_GeometryIsValid, m_MaxSize, m_Size, and size().

float GLC_PointSprite::size ( ) const
inline

Return the point size.

Definition at line 64 of file glc_pointsprite.h.

Referenced by setSize().

Member Data Documentation

QVector<float> GLC_PointSprite::m_DistanceAttenuation
private

The Distance attenuation values.

Definition at line 121 of file glc_pointsprite.h.

Referenced by GLC_PointSprite(), render(), and setPointDistanceAttenuation().

float GLC_PointSprite::m_FadeThresoldSize
private

The Fade Thresold Size.

Definition at line 124 of file glc_pointsprite.h.

Referenced by render().

float GLC_PointSprite::m_MaxSize = -1.0f
staticprivate

The maximum point size.

Definition at line 127 of file glc_pointsprite.h.

Referenced by render(), and setSize().

float GLC_PointSprite::m_Size
private

The point size.

Definition at line 118 of file glc_pointsprite.h.

Referenced by render(), and setSize().


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

©2005-2013 Laurent Ribon