00001 #ifndef OSGDVRCLIPPER_H 00002 #define OSGDVRCLIPPER_H 00003 00004 #include <OSGGLU.h> 00005 #include <OSGDVRSlice.h> 00006 #include <OSGDVRRenderSlice.h> 00007 00008 OSG_BEGIN_NAMESPACE 00009 00010 // forward decl. 00011 class DVRVolume; 00012 00013 class DVRClipper 00014 { 00015 public: 00016 00017 DVRClipper(void); 00018 00019 ~DVRClipper(void); 00020 00022 void clipSlice( DVRVolume *volume, 00023 DVRSlice &slice, 00024 const Vec3f &slicingNormal, 00025 Real32 dist2RefPlane, 00026 DVRRenderSlice &clippedSlice ); 00027 00029 void initialize(DVRVolume *volume); 00030 00032 void reset (DVRVolume *volume); 00033 00035 void setReferencePlane(const Plane &refPlane); 00036 00038 const Plane &getReferencePlane() const; 00039 00041 00047 bool setNumAddPerVertexAttr(DVRVolume *volume, 00048 UInt32 additionalPerVertexAttributes); 00049 00050 private: 00051 00053 bool hasTesselatorSupport; 00054 00055 #ifdef GLU_VERSION_1_2 00056 00057 GLUtesselator *myTess; 00058 #endif 00059 00060 // temporary storage used while tesselating a slice 00061 // basically position and tex coord for the slice boundary 00062 GLdouble *sliceVertexData; 00063 00064 // reference plane 00065 Plane refPlane; 00066 00067 // number of additional per vertex attributes 00068 UInt32 numAddPerVertexAttr; 00069 }; 00070 00071 OSG_END_NAMESPACE 00072 00073 #endif
1.4.3