00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef COIN_SOVRMLCYLINDERSENSOR_H
00025 #define COIN_SOVRMLCYLINDERSENSOR_H
00026
00027 #include <Inventor/nodes/SoSubNode.h>
00028 #include <Inventor/VRMLnodes/SoVRMLDragSensor.h>
00029 #include <Inventor/fields/SoSFFloat.h>
00030 #include <Inventor/fields/SoSFRotation.h>
00031
00032 class COIN_DLL_API SoVRMLCylinderSensor : public SoVRMLDragSensor
00033 {
00034 typedef SoVRMLDragSensor inherited;
00035 SO_NODE_HEADER(SoVRMLCylinderSensor);
00036
00037 public:
00038 static void initClass(void);
00039 SoVRMLCylinderSensor(void);
00040
00041 SoSFFloat diskAngle;
00042 SoSFFloat maxAngle;
00043 SoSFFloat minAngle;
00044 SoSFFloat offset;
00045 SoSFRotation rotation_changed;
00046
00047 protected:
00048
00049 virtual SbBool dragStart(void);
00050 virtual void drag(void);
00051 virtual void dragFinish(void);
00052
00053 virtual ~SoVRMLCylinderSensor();
00054
00055 private:
00056 static float findAngle(const SbRotation & rot);
00057 class SbCylinderProjector * cylinderproj;
00058 };
00059
00060 #endif // ! COIN_SOVRMLCYLINDERSENSOR_H