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-2014 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : David Beilloin (Sep 2008) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef _SO_VOLUME_TRANSFORM_ELEMENT_ 00026 #define _SO_VOLUME_TRANSFORM_ELEMENT_ 00027 00028 #ifdef _MSC_VER 00029 #pragma warning( push ) 00030 #pragma warning(disable:4251) 00031 #endif 00032 00033 #include <Inventor/elements/SoAccumulatedElement.h> 00034 00035 #include <VolumeViz/nodes/SoVolumeTransform.h> 00036 #include <Inventor/STL/vector> 00037 00051 SoEXTENDER_Documented class SoVolumeTransformElement : public SoAccumulatedElement 00052 { 00053 SO_ELEMENT_HEADER( SoVolumeTransformElement ); 00054 00055 public: 00059 static void set(SoState* state, SoNode *node, SoVolumeTransform *m_volumeTransformNode); 00060 00064 static void get(SoState* state, SoVolumeTransform *&m_volumeTransformNode); 00065 00069 static void get(SoState* state, std::vector<SoVolumeTransform*>&); 00070 00072 virtual void push(SoState *state) ; 00073 00074 private: 00075 00077 virtual void init(SoState* state); 00078 00079 private: 00080 // Initializes the class 00081 static void initClass(); 00082 static void exitClass(); 00083 00084 // Default values 00085 static void getDefault(SoVolumeTransform *&m_volumeTransformNode); 00086 00087 private: 00088 00089 //List of transfer function. 00090 //Each compute function is stored at cf->volumeTransformId entry in this array 00091 //If volumeTransformId are different, transfer functions are accumulated else replaced 00092 std::vector<SoVolumeTransform*> m_volumeTransformList; 00093 00094 SoVolumeTransform *m_volumeTransformNode; 00095 00096 virtual void setElt( SoVolumeTransform *m_volumeTransformNode ); 00097 00098 virtual ~SoVolumeTransformElement() ; 00099 }; 00100 00101 #ifdef _MSC_VER 00102 #pragma warning( pop ) 00103 #endif 00104 00105 #endif // _SO_VOLUME_TRANSFORM_ELEMENT_ 00106 00107 00108