GLC_PointSprite : OpenGL 3D Point Sprite Using extension : GL_ARB_point_parameters. More...
#include <glc_pointsprite.h>
Public Member Functions | |
Constructor / Destructor | |
| GLC_PointSprite (float, GLC_Material *) | |
| Default 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. | |
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 const GLC_BoundingBox & | boundingBox (void) |
| Return the point bounding box. | |
| virtual GLC_Geometry * | clone () const |
| Return a copy of the geometry. | |
| float | fadeThresoldSize () |
| Return the fade thresold size. | |
| static float | maximumPointSize () |
| Return the maximum point size. | |
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 42 of file glc_pointsprite.h.
| 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_Material::hasTexture(), and m_DistanceAttenuation.
Referenced by clone().
| GLC_PointSprite::~GLC_PointSprite | ( | ) | [virtual] |
Default destructor.
Definition at line 52 of file glc_pointsprite.cpp.
| const GLC_BoundingBox & GLC_PointSprite::boundingBox | ( | void | ) | [virtual] |
Return the point bounding box.
Implements GLC_Geometry.
Definition at line 58 of file glc_pointsprite.cpp.
References GLC_BoundingBox::combine(), and GLC_Geometry::m_pBoundingBox.
| GLC_Geometry * GLC_PointSprite::clone | ( | ) | const [virtual] |
Return a copy of the geometry.
Implements GLC_Geometry.
Definition at line 78 of file glc_pointsprite.cpp.
References GLC_PointSprite().
| float GLC_PointSprite::fadeThresoldSize | ( | ) | [inline] |
Return the fade thresold size.
Definition at line 73 of file glc_pointsprite.h.
| void GLC_PointSprite::glDraw | ( | const GLC_RenderProperties & | ) | [private, virtual] |
Virtual interface for OpenGL Geometry set up.
This Virtual function is implemented here.
Implements GLC_Geometry.
Definition at line 177 of file glc_pointsprite.cpp.
Referenced by render().
| static float GLC_PointSprite::maximumPointSize | ( | ) | [inline, static] |
Return the maximum point size.
Return -1 if the size is unknown
Definition at line 78 of file glc_pointsprite.h.
| void GLC_PointSprite::render | ( | const GLC_RenderProperties & | renderProperties | ) | [private, virtual] |
Specific glExecute method.
Reimplemented from GLC_Geometry.
Definition at line 106 of file glc_pointsprite.cpp.
References GLC_Material::diffuseColor(), glDraw(), GLC_Material::glExecute(), glPointParameterf, glPointParameterfv, GLC_State::isInSelectionMode(), m_DistanceAttenuation, m_FadeThresoldSize, GLC_Geometry::m_MaterialHash, m_MaxSize, m_Size, and GLC_State::pointSpriteSupported().
| void GLC_PointSprite::setFadeThresoldSize | ( | float | value | ) | [inline] |
Set the fade thresold size.
Definition at line 97 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 96 of file glc_pointsprite.cpp.
References m_DistanceAttenuation.
| void GLC_PointSprite::setSize | ( | float | size | ) |
Return the point size.
Definition at line 84 of file glc_pointsprite.cpp.
References GLC_Geometry::m_GeometryIsValid, m_MaxSize, and m_Size.
| float GLC_PointSprite::size | ( | ) | const [inline] |
Return the point size.
Definition at line 63 of file glc_pointsprite.h.
QVector<float> GLC_PointSprite::m_DistanceAttenuation [private] |
The Distance attenuation values.
Definition at line 123 of file glc_pointsprite.h.
Referenced by GLC_PointSprite(), render(), and setPointDistanceAttenuation().
float GLC_PointSprite::m_FadeThresoldSize [private] |
float GLC_PointSprite::m_MaxSize = -1.0f [static, private] |
The maximum point size.
Definition at line 129 of file glc_pointsprite.h.
float GLC_PointSprite::m_Size [private] |
The point size.
Definition at line 120 of file glc_pointsprite.h.