MeVisLabToolboxReference
|
00001 #ifndef __SoPlaneSync_H 00002 #define __SoPlaneSync_H 00003 00004 //---------------------------------------------------------------------------------- 00005 // **InsertLicense** code 00006 //---------------------------------------------------------------------------------- 00009 00014 // This node calculates a new translation from a translation, a rotation 00015 // and a distance factor. It is especially useful to synchronize two 00016 // clipping planes. 00017 //---------------------------------------------------------------------------------- 00018 00019 #ifndef __SoUtilsSystem_H 00020 #include "SoUtilsSystem.h" 00021 #endif 00022 00023 #include "Inventor/nodes/SoGroup.h" 00024 #include "Inventor/fields/SoSFRotation.h" 00025 #include "Inventor/sensors/SoNodeSensor.h" 00026 00027 //---------------------------------------------------------------------------------- 00030 //---------------------------------------------------------------------------------- 00031 class SoPlaneSync: public SoGroup { 00032 00033 SO_NODE_HEADER(SoPlaneSync); 00034 00035 public: 00036 00038 SoPlaneSync(); 00039 00041 static void initClass(); 00042 00044 SoSFVec3f translation; 00045 00047 SoSFRotation rotation; 00048 00050 SoSFFloat distanceFactor; 00051 00053 SoSFVec3f translationOutput; 00054 00056 SoSFRotation rotationOutput; 00057 00058 protected: 00060 virtual ~SoPlaneSync() { }; 00061 00062 private: 00064 SoNodeSensor *_nodeSensor; 00065 00067 static void _nodeChangedCB(void *data, SoDataSensor* a); 00068 void _nodeChanged(SoDataSensor* sensor); 00070 }; 00071 00072 #endif 00073