glc_pointsprite.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024
00025 #include "glc_geometry.h"
00026 #include <QVector>
00027
00028 #include "../glc_config.h"
00029
00030 #ifndef GLC_POINTSPRITE_H_
00031 #define GLC_POINTSPRITE_H_
00032
00035
00038
00039
00040 class GLC_LIB_EXPORT GLC_PointSprite : public GLC_Geometry
00041 {
00042 public:
00044
00046
00047
00048
00049 GLC_PointSprite(float, GLC_Material*);
00050
00052 virtual ~GLC_PointSprite();
00054
00055
00057
00058 public:
00059
00061 inline float size() const
00062 {return m_Size;}
00063
00065 virtual const GLC_BoundingBox& boundingBox(void);
00066
00068 virtual GLC_Geometry* clone() const;
00069
00071 inline float fadeThresoldSize()
00072 {return m_FadeThresoldSize;}
00073
00075
00076 inline static float maximumPointSize()
00077 {return m_MaxSize;}
00078
00080
00082
00084
00085 public:
00086
00088 void setSize(float size);
00089
00091
00092 void setPointDistanceAttenuation(QVector<float>);
00093
00095 inline void setFadeThresoldSize(float value)
00096 {m_FadeThresoldSize= value;}
00097
00099
00101
00103
00104 private:
00106 virtual void render(const GLC_RenderProperties&);
00107
00109
00110 virtual void glDraw(const GLC_RenderProperties&);
00112
00113
00115
00116 private:
00118 float m_Size;
00119
00121 QVector<float> m_DistanceAttenuation;
00122
00124 float m_FadeThresoldSize;
00125
00127 static float m_MaxSize;
00128 };
00129
00130 #endif