Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
Ruler.h
1
2//
3// This class is part of the Open Inventor Medical utility library.
4//
5// The medical utility classes are provided as a prebuilt library named
6// "fei_inventor_medical", that can be used directly in an Open Inventor
7// application. The classes in the prebuilt library are documented and
8// supported by Thermo Fisher Scientific. These classes are also provided as source code.
9//
10// Please see $OIVHOME/include/Medical/InventorMedical.h for the full text.
11//
13
14#ifndef _MEDICAL_RULER_H
15#define _MEDICAL_RULER_H
16
17#include <Medical/InventorMedical.h>
18#include <Inventor/nodes/SoSeparator.h>
19
20#include <Inventor/fields/SoSFFloat.h>
21#include <Inventor/fields/SoSFInt32.h>
22#include <Inventor/fields/SoSFString.h>
23
24class SoCone;
25class SoFont;
26class SoText2;
27class SoText3;
28class SoLineSet;
29class SoDrawStyle;
30class SoTransform;
31class SoTranslation;
32class SoEventCallback;
35
68class INVENTORMEDICAL_API Ruler : public SoSeparator {
69
70 SO_NODE_HEADER(Ruler);
71
72public:
73
78
83
89 bool manageMouseMove(bool firstClick, const SoOrthoSliceDetail* detail);
90
95
98
100 static void initClass();
101
103 static void exitClass();
104
105private:
109 virtual void notify(SoNotList *list);
110
111private:
112 virtual ~Ruler();
113
114private:
115
119 void buildRuler();
120 void updateGlobalFactor();
121
122 bool m_text3D;
123 SbVec3f m_initPos;
124
125 SoDrawStyle* m_dStyle;
126 SoTransform* m_leftConeTransform;
127 SoTransform* m_rightConeTransform;
128 SoTranslation* m_initialLeftTranslation;
129 SoTranslation* m_initialRightTranslation;
130 SoCone* m_leftCone;
131 SoCone* m_rightCone;
132
133 SoVertexProperty* m_rulerVertexProp;
134 SoLineSet* m_ruler;
135
136 SoFont* m_annotationFont;
137 SoTransform* m_annotationTransform;
138 SoText3* m_rulerAnnotation3D;
139 SoText2* m_rulerAnnotation2D;
140};
141#endif
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> (Preview feature...
Definition Ruler.h:68
SoSFString label
Specifies an (optional) label appended to measure value.
Definition Ruler.h:82
static void exitClass()
Finish using class (called automatically by InventorMedical::finish()).
Ruler()
Constructor.
static void initClass()
Initialize class (called automatically by InventorMedical::init()).
SoSFFloat globalFactor
Specifies a scale factor applied to the size of the arrowheads on the line.
Definition Ruler.h:77
SoFont * getFontNode() const
Returns the internal font node.
bool manageMouseMove(bool firstClick, const SoOrthoSliceDetail *detail)
The application should call this method with 'true' on the mouse down event that begins a measure ope...
3D vector class.
Definition SbVec.h:932
Cone shape node.
Definition SoCone.h:143
Node that defines the style to use when rendering.
Node which invokes callbacks for events.
Node that defines font name, size, and type for text.
Definition SoFont.h:303
Polyline shape node.
Definition SoLineSet.h:190
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Stores detail informa...
Field containing a floating-point value.
Definition SoSFFloat.h:78
Field containing a string.
Definition SoSFString.h:117
Group node that saves and restores traversal state.
Screen-aligned 2D text shape node.
Definition SoText2.h:194
3D text shape node.
Definition SoText3.h:204
General 3D geometric transformation node.
Node representing a 3D translation.
Vertex property node.