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-2022 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 00276 class SoVolumeBufferedShape : public SoBufferedShape, public SoVolumeGeometry 00277 { 00278 SO_NODE_HEADER( SoVolumeBufferedShape ); 00279 00280 public : 00281 00286 SoSFBool clipGeometry; 00287 00299 SoSFFloat offset; 00300 00304 SoSFEnum interpolation; 00305 00307 SoVolumeBufferedShape(); 00308 00309 private: 00311 static void initClass(); 00312 00314 static void exitClass(); 00315 00317 virtual void GLRender( SoGLRenderAction* action ); 00318 00320 virtual void computeBBox( SoAction* action, SbBox3f& box, SbVec3f& center ); 00321 00323 virtual void computeBBox( SoAction* action, SbXfBox3d& box, SbVec3d& center ); 00324 00325 private: 00326 00328 virtual void notify( SoNotList* list ); 00329 00331 virtual SoVolumeShape::Interpolation getInteractiveInterpolationValue(SoState* state) const; 00332 00333 private: 00335 virtual void shapeRender( SoGLRenderAction* action ); 00336 00338 virtual void shapeGeneratePrimitives( SoAction* action ); 00339 00341 virtual void GLRenderBoundingBox( SoGLRenderAction* action ); 00342 00344 virtual void getBBox( SoAction* action, SbBox3f& box, SbVec3f& center ); 00345 00347 virtual void getBBox( SoAction* action, SbXfBox3d& box, SbVec3d& center ); 00348 00350 virtual int getNumVertices(SoState* /*state*/) { return 0; } 00351 00353 virtual int getIndexCoord(int /*index*/) const { return 0; } 00354 00356 virtual ~SoVolumeBufferedShape(); 00357 00358 }; 00359 00360 #endif //__VOLUME_BUFFERED_SHAPE 00361 00362 00363