00001 /*======================================================================= 00002 ** VSG_COPYRIGHT_TAG 00003 **=======================================================================*/ 00004 /*======================================================================= 00005 ** Author : Pascal Estrade (Jul 2009) 00006 **=======================================================================*/ 00007 00008 /*---------------------------------------------------------------------------------------- 00009 Medical example program. 00010 Description : Manage events for this demonstration. 00011 ----------------------------------------------------------------------------------------*/ 00012 00013 #include <VolumeViz/nodes/SoObliqueSlice.h> 00014 #include <Inventor/Gui/view/PoView.h> 00015 #include <VolumeViz/nodes/SoOrthoSlice.h> 00016 00017 class SoEventCallback; 00018 class SoJackDragger; 00019 class SoSensor; 00020 00021 const int NUM_I = 4; 00022 const int NUM_J = 6; 00023 00024 struct dataEvent { 00025 SoOrthoSlice* OrthoSlice_Z[NUM_I][NUM_J]; 00026 PoView* view[NUM_I][NUM_J]; 00027 SoSeparator* sep; 00028 }; 00029 00030 void keyboardPressCB(void *userData, SoEventCallback *eventCB); 00031 00032 // Get mouse move events. 00033 void mouseMoveEventCB(void *userData, SoEventCallback *eventCB); 00034 00035 // Get mouse button events. 00036 void mouseButtonEventCB(void *userData, SoEventCallback *eventCB); 00037 00038 // Get key events. 00039 void keyboardPressCB(void *userData, SoEventCallback *eventCB); 00040 00041 // Manipulate Oblique Slice and clipping plane. 00042 void motionObliSliceCallback(void *user_data, SoJackDragger *dragger); 00043 00044 // Change camera in Oblique Viewer. This to be always in front of the oblique slice. 00045 void obliqueRotationFieldSensorCB( void *userData, SoSensor *s); 00046