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  http://glc-lib.sourceforge.net
00007 
00008  GLC-lib is free software; you can redistribute it and/or modify
00009  it under the terms of the GNU Lesser General Public License as published by
00010  the Free Software Foundation; either version 3 of the License, or
00011  (at your option) any later version.
00012 
00013  GLC-lib is distributed in the hope that it will be useful,
00014  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  GNU Lesser General Public License for more details.
00017 
00018  You should have received a copy of the GNU Lesser General Public License
00019  along with GLC-lib; if not, write to the Free Software
00020  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00021 
00022  *****************************************************************************/
00024 
00025 #include "glc_pointcloud.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_PointCloud
00041 {
00042 public:
00044 
00046 
00047 
00048 
00049         GLC_PointSprite(float, GLC_Material*);
00050 
00052         GLC_PointSprite(const GLC_PointSprite& point);
00053 
00055         virtual ~GLC_PointSprite();
00057 
00058 
00060 
00061 public:
00062 
00064         inline float size() const
00065         {return m_Size;}
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 // Private Member
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 /* GLC_POINTSPRITE_H_ */

SourceForge.net Logo

©2005-2011 Laurent Ribon