glc_line.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  *****************************************************************************/
00022 
00023 #ifndef GLC_LINE_H_
00024 #define GLC_LINE_H_
00025 
00026 #include "glc_polylines.h"
00027 
00028 #include "../glc_config.h"
00029 
00032 
00035 
00036 
00037 class GLC_LIB_EXPORT GLC_Line : public GLC_Polylines
00038 {
00040 
00042 
00043 public:
00045         GLC_Line(const GLC_Point3d &, const GLC_Point3d &);
00046 
00048         GLC_Line(const GLC_Line&);
00049 
00051         virtual ~GLC_Line();
00052 
00054 
00056 
00058 
00059 public:
00060 
00062         inline GLC_Point3d point1(void) const
00063         {return m_Point1;}
00064 
00066         inline GLC_Point3d point2(void) const
00067         {return m_Point2;}
00068 
00070         virtual const GLC_BoundingBox& boundingBox(void);
00071 
00073         virtual GLC_Geometry* clone() const;
00074 
00076 
00078 
00080 
00081 public:
00083         void setCoordinate(const GLC_Point3d &point1, const GLC_Point3d &point2);
00084 
00086         inline void clear()
00087         {GLC_Polylines::clear();}
00088 
00090         GLC_Line& operator=(const GLC_Line& line);
00091 
00093 
00095 
00097 
00098 
00099 private:
00101 
00102         virtual void glDraw(const GLC_RenderProperties&);
00103 
00105 
00107 
00109 
00110 private:
00112         void createWire();
00113 
00115 
00117 // Private Member
00119 
00120 private:
00122         GLC_Point3d m_Point1;
00123 
00125         GLC_Point3d m_Point2;
00126 
00127 };
00128 
00129 #endif /* GLC_LINE_H_ */

SourceForge.net Logo

©2005-2011 Laurent Ribon