glc_repmover.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 
00024 
00025 #ifndef GLC_REPMOVER_H_
00026 #define GLC_REPMOVER_H_
00027 
00028 #include <QColor>
00029 #include "../maths/glc_vector3d.h"
00030 #include "../maths/glc_matrix4x4.h"
00031 #include "../shading/glc_renderproperties.h"
00032 #include "../glc_config.h"
00033 
00034 class GLC_Viewport;
00035 
00038 
00039 
00040 class GLC_LIB_EXPORT GLC_RepMover
00041 {
00042 public:
00043         struct RepMoverInfo
00044         {
00045                 QVector<GLC_Matrix4x4> m_MatrixInfo;
00046                 QVector<GLC_Vector3d> m_VectorInfo;
00047                 QVector<double> m_DoubleInfo;
00048                 QVector<int> m_IntInfo;
00049                 QVector<QString> m_StringInfo;
00050         };
00051 
00052 public:
00054         GLC_RepMover(GLC_Viewport*);
00055 
00057         GLC_RepMover(const GLC_RepMover&);
00058 
00060         virtual ~GLC_RepMover();
00061 
00062 
00064 
00066 
00067 public:
00069         inline QColor mainColor()
00070         {return m_MainColor;}
00071 
00073         virtual GLC_RepMover* clone() const= 0;
00075 
00077 
00079 
00080 
00081         virtual void setMainColor(const QColor& color);
00082 
00084         virtual void setThickness(double thickness);
00085 
00087         virtual void init(){}
00088 
00090         virtual void update(){}
00091 
00093         void setRepMoverInfo(RepMoverInfo* pRepMoverInfo);
00094 
00096 
00098 
00100 
00101 public:
00103         void render();
00104 
00105 protected:
00107         virtual void glDraw()= 0;
00108 
00110 
00112 // Protected Members
00114 protected:
00116         GLC_Viewport* m_pViewport;
00117 
00119         QColor m_MainColor;
00120 
00122         double m_Thickness;
00123 
00125         GLC_RenderProperties m_RenderProperties;
00126 
00128         RepMoverInfo* m_pRepMoverInfo;
00129 };
00130 
00131 #endif /* GLC_REPMOVER_H_ */

SourceForge.net Logo

©2005-2011 Laurent Ribon