MeVisLabToolboxReference
MeVisLab/Standard/Sources/Inventor/SoUtils/SoClipBox.h
Go to the documentation of this file.
00001 #ifndef __SoClipBox_H
00002 #define __SoClipBox_H
00003 //----------------------------------------------------------------------------------
00004 // **InsertLicense** code
00005 //----------------------------------------------------------------------------------
00008 
00013 //----------------------------------------------------------------------------------
00014 
00015 #ifndef __SoUtilsSystem_H
00016 #include "SoUtilsSystem.h"
00017 #endif
00018 
00019 #include <Inventor/fields/SoSFBool.h>
00020 #include <Inventor/fields/SoSFTrigger.h>
00021 #include <Inventor/nodes/SoSeparator.h>
00022 #include <Inventor/nodes/SoSubNode.h>
00023 #include <Inventor/nodes/SoTransformSeparator.h>
00024 #include <Inventor/nodes/SoSwitch.h>
00025 #include <Inventor/nodes/SoFont.h>
00026 #include <Inventor/nodes/SoClipPlane.h>
00027 #include <Inventor/nodes/SoSurroundScale.h>
00028 #include <Inventor/sensors/SoNodeSensor.h>
00029 
00030 #ifndef __SoPlaneDragger_H
00031 #include "SoPlaneDragger.h"
00032 #endif
00033 
00036 
00041 class SoClipBox : public SoTransformSeparator {
00042 
00043   SO_NODE_HEADER(SoClipBox);
00044 
00045 public:
00046 
00048 
00050   SoSFBool on;
00051 
00053   SoSFBool left,right,top,bottom,front,rear;
00054 
00056   SoSFBool hideGeometry;
00057 
00059   SoSFTrigger  resetGeometry;
00060 
00062   SoSFTrigger  resetSurround;
00063 
00065   SoSFBool isActive;
00066 
00068   SoSFRotation  rotation0;
00070   SoSFVec3f     translation0;
00072   SoSFRotation  rotation1;
00074   SoSFVec3f     translation1;
00076   SoSFRotation  rotation2;
00078   SoSFVec3f     translation2;
00080   SoSFRotation  rotation3;
00082   SoSFVec3f     translation3;
00084   SoSFRotation  rotation4;
00086   SoSFVec3f     translation4;
00088   SoSFRotation  rotation5;
00090   SoSFVec3f     translation5;
00091 
00093   static void    initClass();
00094 
00095   // Constructor
00096   SoClipBox();
00097 
00098   void nodeChanged(SoSensor* sensor);
00099   void activityChanged();
00100   void resetDraggerGeometry();
00101   void updateDraggerState();
00102   void resetSurroundChanged();
00103 
00104  protected:
00105    virtual ~SoClipBox();
00106 
00107  private:
00108    static void nodeChangedCB(void *userData, SoSensor* s);
00109 
00110    static void activityChangedCB(void *userData, SoSensor* s);
00111 
00112    static void resetSurroundChangedCB(void *userData, SoSensor* s);
00113 
00114   SoSwitch*        _onScene;
00115   SoSwitch*        _dragSwitches[6];
00116   SoClipPlane*     _clipPlanes[6];
00117   SoPlaneDragger*  _draggers[6];
00118   SoSeparator*     _dragGroup;
00119   SoGroup*         _clipGroup;
00120   SoSurroundScale* _surround;
00121 
00122   SoSFVec3f*       _translations[6];
00123   SoSFRotation*    _rotations[6];
00124 
00125   SoNodeSensor*    _nodeSensor;
00126   SoFieldSensor*   _activity[6];
00127   SoFieldSensor*   _resetSurroundSensor;
00128 
00129 };
00130 
00131 #endif
00132 
00133 
00134 
00135 
00136