IvfExtrusion.h

00001 //
00002 // Copyright 1999-2006 by Structural Mechanics, Lund University.
00003 //
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Library General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2 of the License, or (at your option) any later version.
00008 //
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Library General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Library General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00017 // USA.
00018 //
00019 // Please report all bugs and problems to "ivf@byggmek.lth.se".
00020 //
00021 //
00022 // Written by Jonas Lindemann
00023 //
00024 
00025 #ifndef _CIvfExtrusion_h_
00026 #define _CIvfExtrusion_h_
00027 
00028 #include <GL/gle.h>
00029 
00030 #include <ivf/IvfShape.h>
00031 
00032 IVF_API void ivfSetGLEJoinStyle(int style);
00033 IVF_API int ivfGetGLEJoinStyle();
00034 
00035 IvfSmartPointer(CIvfExtrusion);
00036 
00089 class IVF_API CIvfExtrusion : public CIvfShape {
00090 public:
00092         CIvfExtrusion ();
00093 
00095         virtual ~CIvfExtrusion ();
00096 
00097         IvfClassInfo("CIvfExtrusion",CIvfShape);
00098 
00106         void setSectionSize(int size);
00107         
00109         int getSectionSize();
00110 
00120         void setSectionCoord(int pos, double x, double y);
00121 
00123         void getSectionCoord(int pos, double &x, double &y);
00124 
00134         void setSectionNormal(int pos, double x, double y);
00135 
00137         void getSectionNormal(int pos, double &x, double &y);
00138 
00149         void setSpineSize(int size);
00150 
00152         int getSpineSize();
00153 
00164         void setSpineCoord(int pos, double x, double y, double z);
00165 
00167         void getSpineCoord(int pos, double &x, double &y, double &z);
00168 
00179         void setSpineColor(int pos, float red, float green, float blue);
00180 
00182         void getSpineColor(int pos, float &red, float &green, float &blue);
00183 
00192         void setUseColor(bool flag);
00193 
00195         bool getUseColor();
00196 
00203         void setSelectScale(double scale);
00204 
00213         void setUpVector(double x, double y, double z);
00214 
00237         void setTextureMode(int mode);
00238 
00253         void setJoinStyle(int style);
00254 
00261         void setStartEnd(int startIdx, int endIdx);
00262 
00264         void setUseTwist(bool flag);
00265 
00267         bool getUseTwist();
00268 
00275         void setSpineTwist(int pos, double twist);
00276 
00283         void getSpineTwist(int pos, double &twist);
00284         
00290         void updateBoundingSphere();
00291 private:
00292         double m_selectScale;
00293         bool m_useColors;
00294         bool m_useTwist;
00295         int m_sectionSize;
00296         int m_spineSize;
00297         int m_spineStart;
00298         int m_spineEnd;
00299         int m_spineDelta;
00300         gleDouble (*m_sectionCoords)[2];        
00301         gleDouble (*m_sectionNormals)[2];
00302         gleDouble (*m_selectSectionCoords)[2];  
00303         gleDouble (*m_selectSectionNormals)[2];
00304         gleDouble m_upVector[3];
00305         gleDouble (*m_spineCoords)[3];
00306         float (*m_spineColors)[3];
00307         gleDouble (*m_twist);
00308 protected:
00309         virtual void createSelect();
00310         virtual void createGeometry();
00311 };
00312 
00318 #endif

Generated on Fri Sep 1 15:36:45 2006 for Interactive Visualisation Framework - Ivf++ by  doxygen 1.4.6-NO