glc_cone.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  http://glc-lib.sourceforge.net
00006 
00007  GLC-lib is free software; you can redistribute it and/or modify
00008  it under the terms of the GNU Lesser General Public License as published by
00009  the Free Software Foundation; either version 3 of the License, or
00010  (at your option) any later version.
00011 
00012  GLC-lib is distributed in the hope that it will be useful,
00013  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  GNU Lesser General Public License for more details.
00016 
00017  You should have received a copy of the GNU Lesser General Public License
00018  along with GLC-lib; if not, write to the Free Software
00019  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020 
00021  *****************************************************************************/
00023 
00024 #ifndef GLC_CONE_H_
00025 #define GLC_CONE_H_
00026 
00027 #include "glc_mesh.h"
00028 #include "../glc_config.h"
00029 
00032 
00035 
00036 class GLC_LIB_EXPORT GLC_Cone : public GLC_Mesh
00037 {
00039 
00041 
00042 public:
00044 
00048         GLC_Cone(double dRadius, double dLength);
00049 
00051         GLC_Cone(const GLC_Cone& sourceCone);
00052 
00054         virtual ~GLC_Cone();
00056 
00057 
00059 
00061 
00062 public:
00064         static quint32 chunckID();
00065 
00067         inline double length(void) const
00068         {return m_Length;}
00069 
00071         inline double radius(void) const
00072         {return m_Radius;}
00073 
00075         inline int discretion(void) const
00076         {return m_Discret;}
00077 
00079         virtual GLC_Geometry* clone() const;
00080 
00082         virtual const GLC_BoundingBox& boundingBox(void);
00083 
00085 
00087 
00089 
00090 public:
00092 
00093         void setLength(double Length);
00094 
00096 
00097         void setRadius(double Radius);
00098 
00100 
00101         void setDiscretion(int TargetDiscret);
00102 
00104 
00106 
00108 
00109 private:
00111 
00113         virtual void glDraw(const GLC_RenderProperties&);
00115 
00117 
00119 
00120 private:
00122         void createMeshAndWire();
00123 
00125 
00127 // Private members
00129 private:
00130 
00132         double m_Radius;
00133 
00135         double m_Length;
00136 
00138         int m_Discret;
00139 
00141         static quint32 m_ChunkId;
00142 
00143 };
00144 
00145 #endif /* GLC_CONE_H_ */

SourceForge.net Logo

©2005-2011 Laurent Ribon