MeVisLab Resolution Independence API
SoExaminerViewer.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef SO_EXAMINER_VIEWER_H
14 #define SO_EXAMINER_VIEWER_H
15 
16 #include "SoViewers.h"
17 #include "SoFullViewer.h"
18 
19 //=============================================================
23 
24 //=============================================================
26 
27  SO_NODE_HEADER(SoExaminerViewer);
28 
29  public:
31 
32  SoSFBool animationEnabled;
33  SoSFBool feedback;
34  SoSFInt32 feedbackSize;
35  SoSFTrigger stopAnimating;
36  SoSFString mouseInteraction;
37 
39 
41 
42  SoSFTrigger startRotation;
43  SoSFTrigger stopRotation;
44  SoSFVec3f rotationAxis;
45  SoSFFloat rotationAngle;
46  SoSFInt32 rotationSteps;
48  SoSFTrigger rotationStopped;
49  SoSFBool recordRotation;
50 
52 
54  SoSFBool wheelZoomEnabled;
57 
59 
61  static void initClass();
62 
65  void* createViewer(void* hwnd, SoNode* scene) override;
66 
68  void setupViewer() override;
69 
71  void storeViewerState() override;
72 
74  void rotationChanged(SoSensor* sensor);
75  static void rotationChangedCB(void *data, SoSensor *sensor);
76 
78  void reorientCamera(const SbRotation & rot);
79 
82  void getSyncFieldNames(SbStringList& list) override;
83 
84  protected:
85 
86  ~SoExaminerViewer() override;
87 
89  void stopAnimatingChanged(SoField*);
90  void feedbackChanged(SoField*);
91  void feedbackSizeChanged(SoField*);
92  void animationEnabledChanged(SoField*);
93  void mouseInteractionChanged(SoField*);
94  void startRotationChanged(SoField*);
95  void stopRotationChanged(SoField*);
96  void wheelZoomEnabledChanged(SoField*);
98 
100 
102  bool _rotating;
104  SoTimerSensor* _rotSensor;
105 };
106 
107 #endif
#define SO_VIEWERS_CLASS_SPEC
Definition: SoViewers.h:43
Encapsulates the So*ExaminerViewer of Open Inventor into an Inventor Node.
bool _rotating
flag if currently autorotating
static void initClass()
inventor runtime
void feedbackSizeChanged(SoField *)
SoSFVec3f rotationAxis
void getSyncFieldNames(SbStringList &list) override
collect the fields that should be synced on cloned viewers if you derive this method,...
SoSFTrigger rotationStopped
void wheelRotationEnabledChanged(SoField *)
void stopAnimatingChanged(SoField *)
further field callbacks
SoTimerSensor * _rotSensor
timer sensor for autorotation
void animationEnabledChanged(SoField *)
SoSFBool wheelZoomEnabled
enable zoom/rotation by mouse wheel
void storeViewerState() override
called automatically by timer sensor if storeCurrentState is on
SoSFBool animationEnabled
Fields.
void feedbackChanged(SoField *)
void wheelZoomEnabledChanged(SoField *)
void mouseInteractionChanged(SoField *)
void evaluateInteractionString()
SoSFString mouseInteraction
SoSFInt32 feedbackSize
SoSFInt32 rotationCurrentStep
void setupViewer() override
sets all values from fields
SoSFTrigger startRotation
Autorotation Fields around given axis.
SoSFTrigger stopRotation
SoSFInt32 rotationSteps
SoSFBool wheelRotationEnabled
SoSFFloat rotationAngle
SoSFTrigger stopAnimating
void startRotationChanged(SoField *)
static void rotationChangedCB(void *data, SoSensor *sensor)
~SoExaminerViewer() override
void reorientCamera(const SbRotation &rot)
reorient the camera, rotating rot around the focus point of the viewer
void * createViewer(void *hwnd, SoNode *scene) override
create a viewer in the given window void pointer is used to be compatible to any windows system
void rotationChanged(SoSensor *sensor)
called when the autorotate time is triggered
void stopRotationChanged(SoField *)
SoFullViewer encapsulates SoQtFullViewer from Open Inventor in an Inventor Node.
Definition: SoFullViewer.h:33