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  Version 2.0.0 Beta 1, packaged on April 2010.
00006 
00007  http://glc-lib.sourceforge.net
00008 
00009  GLC-lib is free software; you can redistribute it and/or modify
00010  it under the terms of the GNU General Public License as published by
00011  the Free Software Foundation; either version 2 of the License, or
00012  (at your option) any later version.
00013 
00014  GLC-lib is distributed in the hope that it will be useful,
00015  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  GNU General Public License for more details.
00018 
00019  You should have received a copy of the GNU General Public License
00020  along with GLC-lib; if not, write to the Free Software
00021  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00022 
00023  *****************************************************************************/
00024 
00026 
00027 #ifndef GLC_REPMOVER_H_
00028 #define GLC_REPMOVER_H_
00029 
00030 #include <QColor>
00031 #include "../maths/glc_vector3d.h"
00032 #include "../maths/glc_matrix4x4.h"
00033 #include "../shading/glc_renderproperties.h"
00034 #include "../glc_config.h"
00035 
00036 class GLC_Viewport;
00037 
00040 
00041 
00042 class GLC_LIB_EXPORT GLC_RepMover
00043 {
00044 public:
00045         struct RepMoverInfo
00046         {
00047                 QVector<GLC_Matrix4x4> m_MatrixInfo;
00048                 QVector<GLC_Vector3d> m_VectorInfo;
00049                 QVector<double> m_DoubleInfo;
00050                 QVector<int> m_IntInfo;
00051                 QVector<QString> m_StringInfo;
00052         };
00053 
00054 public:
00056         GLC_RepMover(GLC_Viewport*);
00057 
00059         GLC_RepMover(const GLC_RepMover&);
00060 
00062         virtual ~GLC_RepMover();
00063 
00064 
00066 
00068 
00069 public:
00071         inline QColor mainColor()
00072         {return m_MainColor;}
00073 
00075         virtual GLC_RepMover* clone() const= 0;
00077 
00079 
00081 
00082 
00083         virtual void setMainColor(const QColor& color);
00084 
00086         virtual void setThickness(double thickness);
00087 
00089         virtual void init(){}
00090 
00092         virtual void update(){}
00093 
00095         void setRepMoverInfo(RepMoverInfo* pRepMoverInfo);
00096 
00098 
00100 
00102 
00103 public:
00105         void glExecute();
00106 
00108         virtual void glDraw()= 0;
00109 
00111 
00113 // Protected Members
00115 protected:
00117         GLC_Viewport* m_pViewport;
00118 
00120         QColor m_MainColor;
00121 
00123         double m_Thickness;
00124 
00126         GLC_RenderProperties m_RenderProperties;
00127 
00129         RepMoverInfo* m_pRepMoverInfo;
00130 };
00131 
00132 #endif /* GLC_REPMOVER_H_ */

SourceForge.net Logo

©2005 Laurent Ribon