MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
SoCrossHair.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_CROSS_HAIR_H
14
#define SO_CROSS_HAIR_H
15
17
18
// Creates a simple cross given by inventor cylinders which can be placed
19
// at arbitrary 3d positions.
20
21
#include "
SoUtilsSystem.h
"
22
23
#include <Inventor/nodes/SoSeparator.h>
24
#include <Inventor/fields/SoSFTrigger.h>
25
#include <Inventor/fields/SoSFBool.h>
26
#include <Inventor/fields/SoSFVec3f.h>
27
#include <Inventor/fields/SoSFFloat.h>
28
#include <Inventor/fields/SoSFUInt32.h>
29
#include <Inventor/fields/SoSFString.h>
30
#include <Inventor/fields/SoSFEnum.h>
31
32
class
SoTranslation;
33
class
SoScale;
34
class
SoLineSet;
35
class
SoCoordinate3;
36
class
SoSwitch;
37
class
SoDragPointDragger;
38
class
SoDrawStyle;
39
class
SoPixelScaleAccess
;
40
41
class
SOUTILS_EXPORT
SoCrossHair
:
public
SoSeparator
42
{
43
44
SO_NODE_HEADER(
SoCrossHair
);
45
46
public
:
48
enum
ColorMode
{
49
CROSS_HAIR_0
= 0,
50
CROSS_HAIR_1
= 1,
51
CROSS_HAIR_2
= 2
52
};
53
54
enum
RenderMode
{
55
Lines
,
56
Cylinders
57
};
58
60
SoCrossHair
();
61
63
static
void
initClass
();
64
66
SoSFEnum
crosshairType
;
67
68
SoSFTypedEnum<RenderMode>
renderMode
;
69
71
SoSFVec3f
position
;
72
74
SoSFVec3f
scale
;
75
77
SoSFFloat
cylinderRadius
;
78
80
SoSFBool
useDragger
;
81
83
SoSFVec3f
positionOut
;
84
85
protected
:
87
~SoCrossHair
()
override
;
88
89
private
:
90
void
addCylinders(
int
numPoints, SbVec3f* data);
91
94
void
_useDraggerChanged(SoField*);
95
void
_crossHairTypeChanged(SoField*);
97
99
SoCoordinate3* _coord;
100
102
SoLineSet* _lines;
103
105
SoSwitch* _draggerSwitch;
106
108
SoDragPointDragger* _dragger;
109
110
SoSwitch* _renderSwitch;
111
112
SoSeparator* _cylinders;
113
};
114
115
#endif
SoUtilsSystem.h
SOUTILS_EXPORT
#define SOUTILS_EXPORT
System dependent includes. Disables some compiler/linker warnings.
Definition
SoUtilsSystem.h:30
SoCrossHair::useDragger
SoSFBool useDragger
Enables/disables the dragger to move the cross. Default is off.
Definition
SoCrossHair.h:80
SoCrossHair::RenderMode
RenderMode
Definition
SoCrossHair.h:54
SoCrossHair::Lines
@ Lines
Definition
SoCrossHair.h:55
SoCrossHair::Cylinders
@ Cylinders
Definition
SoCrossHair.h:56
SoCrossHair::cylinderRadius
SoSFFloat cylinderRadius
If renderMode == Cylinder, this radius is used as radius of the Cylinder.
Definition
SoCrossHair.h:77
SoCrossHair::positionOut
SoSFVec3f positionOut
The position output of the dragger.
Definition
SoCrossHair.h:83
SoCrossHair::renderMode
SoSFTypedEnum< RenderMode > renderMode
Definition
SoCrossHair.h:68
SoCrossHair::crosshairType
SoSFEnum crosshairType
Type selector for cross hair cursor. Default is CROSS_HAIR_0.
Definition
SoCrossHair.h:66
SoCrossHair::ColorMode
ColorMode
Type selector for cross hair cursors.
Definition
SoCrossHair.h:48
SoCrossHair::CROSS_HAIR_0
@ CROSS_HAIR_0
Definition
SoCrossHair.h:49
SoCrossHair::CROSS_HAIR_1
@ CROSS_HAIR_1
Definition
SoCrossHair.h:50
SoCrossHair::CROSS_HAIR_2
@ CROSS_HAIR_2
Definition
SoCrossHair.h:51
SoCrossHair::scale
SoSFVec3f scale
Extents of the three cross lines. Defaults are (2,2,2).
Definition
SoCrossHair.h:74
SoCrossHair::initClass
static void initClass()
Initializes this class.
SoCrossHair::~SoCrossHair
~SoCrossHair() override
Destructor.
SoCrossHair::SoCrossHair
SoCrossHair()
Constructor.
SoCrossHair::position
SoSFVec3f position
Position of the cross in 3d. Default is (0,0,0).
Definition
SoCrossHair.h:71
SoPixelScaleAccess
Definition
SoPixelScaleAccess.h:29
MeVisLab
Standard
Sources
Inventor
SoUtils
SoCrossHair.h
Generated by
1.18.0