00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : Aymeric Chataigner (Sept 2012) 00022 **=======================================================================*/ 00023 #ifndef __VOLUME_BUFFERED_SHAPE 00024 #define __VOLUME_BUFFERED_SHAPE 00025 00026 #include <Inventor/nodes/SoBufferedShape.h> 00027 00028 #include <VolumeViz/nodes/SoVolumeGeometry.h> 00029 #include <Inventor/fields/SoSFBool.h> 00030 #include <Inventor/fields/SoSFFloat.h> 00031 #include <Inventor/SbBox.h> 00032 00033 class SoVolumeGeometryVbo; 00034 00258 class SoVolumeBufferedShape : public SoBufferedShape, public SoVolumeGeometry 00259 { 00260 SO_NODE_HEADER( SoVolumeBufferedShape ); 00261 00262 public : 00263 00268 SoSFBool clipGeometry; 00269 00281 SoSFFloat offset; 00282 00286 SoSFEnum interpolation; 00287 00289 SoVolumeBufferedShape(); 00290 00291 private: 00293 static void initClass(); 00294 00296 static void exitClass(); 00297 00299 virtual void GLRender( SoGLRenderAction* action ); 00300 00302 virtual void computeBBox( SoAction* action, SbBox3f& box, SbVec3f& center ); 00303 00305 virtual void computeBBox( SoAction* action, SbXfBox3d& box, SbVec3d& center ); 00306 00307 private: 00308 00310 virtual void notify( SoNotList* list ); 00311 00313 virtual SoVolumeShape::Interpolation getInteractiveInterpolationValue(SoState* state) const; 00314 00315 private: 00317 virtual void shapeRender( SoGLRenderAction* action ); 00318 00320 virtual void shapeGeneratePrimitives( SoAction* action ); 00321 00323 virtual void GLRenderBoundingBox( SoGLRenderAction* action ); 00324 00326 virtual void getBBox( SoAction* action, SbBox3f& box, SbVec3f& center ); 00327 00329 virtual void getBBox( SoAction* action, SbXfBox3d& box, SbVec3d& center ); 00330 00332 virtual int getNumVertices(SoState* /*state*/) { return 0; } 00333 00335 virtual int getIndexCoord(int /*index*/) const { return 0; } 00336 00338 virtual ~SoVolumeBufferedShape(); 00339 00340 }; 00341 00342 #endif //__VOLUME_BUFFERED_SHAPE 00343 00344 00345