glc_pointsprite.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 
00003  This file is part of the GLC-lib library.
00004  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
00005  Copyright (C) 2009 Laurent Bauer
00006  Version 2.0.0, packaged on July 2010.
00007 
00008  http://glc-lib.sourceforge.net
00009 
00010  GLC-lib is free software; you can redistribute it and/or modify
00011  it under the terms of the GNU Lesser General Public License as published by
00012  the Free Software Foundation; either version 3 of the License, or
00013  (at your option) any later version.
00014 
00015  GLC-lib is distributed in the hope that it will be useful,
00016  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  GNU Lesser General Public License for more details.
00019 
00020  You should have received a copy of the GNU Lesser General Public License
00021  along with GLC-lib; if not, write to the Free Software
00022  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00023 
00024  *****************************************************************************/
00026 
00027 #include "glc_geometry.h"
00028 #include <QVector>
00029 
00030 #include "../glc_config.h"
00031 
00032 #ifndef GLC_POINTSPRITE_H_
00033 #define GLC_POINTSPRITE_H_
00034 
00037 
00040 
00041 
00042 class GLC_LIB_EXPORT GLC_PointSprite : public GLC_Geometry
00043 {
00044 public:
00046 
00048 
00049 
00050 
00051         GLC_PointSprite(float, GLC_Material*);
00052 
00054         virtual ~GLC_PointSprite();
00056 
00057 
00059 
00060 public:
00061 
00063         inline float size() const
00064         {return m_Size;}
00065 
00067         virtual const GLC_BoundingBox& boundingBox(void);
00068 
00070         virtual GLC_Geometry* clone() const;
00071 
00073         inline float fadeThresoldSize()
00074         {return m_FadeThresoldSize;}
00075 
00077 
00078         inline static float maximumPointSize()
00079         {return m_MaxSize;}
00080 
00082 
00084 
00086 
00087 public:
00088 
00090         void setSize(float size);
00091 
00093 
00094         void setPointDistanceAttenuation(QVector<float>);
00095 
00097         inline void setFadeThresoldSize(float value)
00098         {m_FadeThresoldSize= value;}
00099 
00101 
00103 
00105 
00106 private:
00108         virtual void render(const GLC_RenderProperties&);
00109 
00111 
00112         virtual void glDraw(const GLC_RenderProperties&);
00114 
00115 // Private Member
00117 
00118 private:
00120         float m_Size;
00121 
00123         QVector<float> m_DistanceAttenuation;
00124 
00126         float m_FadeThresoldSize;
00127 
00129         static float m_MaxSize;
00130 };
00131 
00132 #endif /* GLC_POINTSPRITE_H_ */

SourceForge.net Logo

©2005-2010 Laurent Ribon