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-2017 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : T. DUFOUR (Nov 2002) 00022 **=======================================================================*/ 00023 00024 #ifndef _SO_VOLUME_GROUP_ELEMENT_ 00025 #define _SO_VOLUME_GROUP_ELEMENT_ 00026 00027 #include <Inventor/elements/SoReplacedElement.h> 00028 #include <Inventor/SbVec.h> 00029 #include <Inventor/nodes/SoFaceSet.h> 00030 00031 class SoVolumeGroup; 00032 class SoGLObjectCache; 00033 class SoLDMVirtualTexture; 00034 00035 class SoVolumeGroupElement : public SoReplacedElement { 00036 SO_ELEMENT_HEADER( SoVolumeGroupElement ); 00037 00038 public: 00039 00040 // Sets/Gets the current volume data attributes in the state 00041 static void set(SoState* state, SoNode *node, SoVolumeGroup *volumeGroupNode); 00042 static void get(SoState* state, SoVolumeGroup *&volumeGroupNode); 00043 00044 // Default values 00045 static void getDefault(SoVolumeGroup *&VolumeGroupNode); 00046 00047 private: 00048 00050 virtual void init(SoState* state); 00051 00053 virtual SoElement* copyMatchInfo() const; 00054 00056 virtual SbBool matches(const SoElement* elt) const; 00057 00058 private: 00059 // Initializes the SoVolumeGroupElement class 00060 static void initClass(); 00061 static void exitClass(); 00062 // Set current number of volumeGroup 00063 static void setNumberOfVolume(SoState* state, SoNode *node, int numberOfVolume); 00064 // Return current number of volumeGroup 00065 static int getNumberOfVolume(SoState* state); 00066 00067 static void setVertices( SoState* state, SoNode *node, SoRef<SoFaceSet> faceSet, SoLDMVirtualTexture* vt, float sliceDensity ); 00068 00069 static float getSliceDensity( SoState* state ); 00070 static SoLDMVirtualTexture* getVirtualTexture( SoState* state ); 00071 static SoRef<SoFaceSet> getGeometry( SoState* state ); 00072 00073 private: 00074 virtual void setElt( SoVolumeGroup *VolumeGroupNode ); 00075 00076 virtual ~SoVolumeGroupElement(); 00077 00078 private: 00079 SoVolumeGroup* m_volumeGroupNode; 00080 int m_numberOfVolume; 00081 SoLDMVirtualTexture* m_vt; 00082 SoRef<SoFaceSet> m_faceSet; 00083 float m_sliceDensity; 00084 }; 00085 00086 #endif // _SO_VOLUME_GROUP_ELEMENT_ 00087 00088 00089