00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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