MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
SoPicking.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_PICKING_H
14
#define SO_PICKING_H
15
16
18
19
#include <Inventor/nodes/SoSelection.h>
20
#include <Inventor/fields/SoSFTrigger.h>
21
#include <Inventor/fields/SoSFBool.h>
22
#include <Inventor/fields/SoSFEnum.h>
23
#include <Inventor/fields/SoSFVec3f.h>
24
#include <Inventor/fields/SoSFColor.h>
25
#include <Inventor/fields/SoSFVec4f.h>
26
#include <Inventor/fields/SoSFFloat.h>
27
#include <Inventor/fields/SoSFInt32.h>
28
#include <Inventor/fields/SoSFString.h>
29
#include <Inventor/fields/SoSFEnum.h>
30
#include <Inventor/fields/SoSFPath.h>
31
#include <Inventor/actions/SoCallbackAction.h>
32
33
#include <SoInteractionNode.h>
34
35
class
SoNodeSensor;
36
class
SoDataSensor;
37
class
SoHandleEventAction;
38
39
class
SoPicking
:
public
SoInteractionNode
40
{
41
SO_NODE_HEADER(
SoPicking
);
42
43
friend
class
SoPickingPickAction
;
44
45
public
:
47
SoPicking
();
48
50
static
void
initClass
();
51
54
SoSFVec3f
objectLocal
;
55
SoSFVec3f
objectWorld
;
56
SoSFVec3f
normalLocal
;
57
SoSFVec3f
normalWorld
;
58
SoSFVec3f
textureLocal3
;
59
SoSFVec3f
textureWorld3
;
60
SoSFVec4f
textureLocal4
;
61
SoSFVec4f
textureWorld4
;
62
SoSFBool
pointPicked
;
63
64
SoSFBool
enableColorPicking
;
65
SoSFColor
diffuseColor
;
66
67
SoSFBool
enablePathPicking
;
68
SoSFPath
pickedPath
;
69
70
SoSFBool
highlighted
;
71
SoSFBool
buttonPressed
;
72
SoSFInt32
clickCount
;
73
74
SoSFBool
enabled
;
75
SoSFBool
updateWhileDragging
;
76
SoSFBool
performPreClickTest
;
77
SoSFBool
updateContinuously
;
78
SoSFEnum
cursorShape
;
79
SoSFString
actionID
;
80
81
SoSFBool
highlighted2
;
82
SoSFBool
buttonPressed2
;
83
SoSFInt32
clickCount2
;
84
85
SoSFBool
enabled2
;
86
SoSFBool
updateWhileDragging2
;
87
SoSFBool
performPreClickTest2
;
88
SoSFEnum
cursorShape2
;
89
SoSFString
actionID2
;
90
91
SoSFBool
highlighted3
;
92
SoSFBool
buttonPressed3
;
93
SoSFInt32
clickCount3
;
94
95
SoSFBool
enabled3
;
96
SoSFBool
updateWhileDragging3
;
97
SoSFBool
performPreClickTest3
;
98
SoSFEnum
cursorShape3
;
99
SoSFString
actionID3
;
100
102
103
protected
:
104
using
SoInteractionOwner::pointerPosition;
105
107
void
pointerPosition
(
const
SoPointerPosition& pos)
override
;
108
110
using
SoInteractionNode::pointerLeftWindow;
111
void
pointerLeftWindow
()
override
;
112
113
private
:
115
void
_updatePickedPoint(SoHandleEventAction* action);
116
117
void
_updateActionID(SoField* field =
nullptr
);
118
void
_updateActionEnabled(SoField* field =
nullptr
);
119
120
void
_updateActionID2(SoField* field =
nullptr
);
121
void
_updateActionEnabled2(SoField* field =
nullptr
);
122
123
void
_updateActionID3(SoField* field =
nullptr
);
124
void
_updateActionEnabled3(SoField* field =
nullptr
);
125
126
void
_updateContinouslyCalled(SoField* field =
nullptr
);
127
128
SoPointingAction* _pickPointAction;
129
SoPointingAction* _pickPointAction2;
130
SoPointingAction* _pickPointAction3;
131
132
// Used as userData for postTailCallback
133
struct
PickingHelper
134
{
135
SbColor
diffuseColor
;
136
int
materialIndex;
137
};
138
static
SoCallbackAction::Response postTailCallback(
void
* userData, SoCallbackAction* action,
const
SoNode* node);
139
};
140
141
#endif
SoPicking::updateWhileDragging2
SoSFBool updateWhileDragging2
Definition
SoPicking.h:86
SoPicking::pointerLeftWindow
void pointerLeftWindow() override
SoPicking::cursorShape
SoSFEnum cursorShape
Definition
SoPicking.h:78
SoPicking::objectWorld
SoSFVec3f objectWorld
Definition
SoPicking.h:55
SoPicking::objectLocal
SoSFVec3f objectLocal
Definition
SoPicking.h:54
SoPicking::clickCount3
SoSFInt32 clickCount3
Definition
SoPicking.h:93
SoPicking::normalWorld
SoSFVec3f normalWorld
Definition
SoPicking.h:57
SoPicking::enableColorPicking
SoSFBool enableColorPicking
Definition
SoPicking.h:64
SoPicking::highlighted
SoSFBool highlighted
Definition
SoPicking.h:70
SoPicking::pointPicked
SoSFBool pointPicked
Definition
SoPicking.h:62
SoPicking::clickCount
SoSFInt32 clickCount
Definition
SoPicking.h:72
SoPicking::performPreClickTest
SoSFBool performPreClickTest
Definition
SoPicking.h:76
SoPicking::cursorShape2
SoSFEnum cursorShape2
Definition
SoPicking.h:88
SoPicking::updateContinuously
SoSFBool updateContinuously
Definition
SoPicking.h:77
SoPicking::textureLocal3
SoSFVec3f textureLocal3
Definition
SoPicking.h:58
SoPicking::performPreClickTest3
SoSFBool performPreClickTest3
Definition
SoPicking.h:97
SoPicking::normalLocal
SoSFVec3f normalLocal
Definition
SoPicking.h:56
SoPicking::pickedPath
SoSFPath pickedPath
Definition
SoPicking.h:68
SoPicking::enabled2
SoSFBool enabled2
Definition
SoPicking.h:85
SoPicking::updateWhileDragging3
SoSFBool updateWhileDragging3
Definition
SoPicking.h:96
SoPicking::actionID3
SoSFString actionID3
Definition
SoPicking.h:99
SoPicking::buttonPressed
SoSFBool buttonPressed
Definition
SoPicking.h:71
SoPicking::SoPickingPickAction
friend class SoPickingPickAction
Definition
SoPicking.h:43
SoPicking::actionID
SoSFString actionID
Definition
SoPicking.h:79
SoPicking::textureWorld3
SoSFVec3f textureWorld3
Definition
SoPicking.h:59
SoPicking::textureLocal4
SoSFVec4f textureLocal4
Definition
SoPicking.h:60
SoPicking::cursorShape3
SoSFEnum cursorShape3
Definition
SoPicking.h:98
SoPicking::SoPicking
SoPicking()
Constructor.
SoPicking::textureWorld4
SoSFVec4f textureWorld4
Definition
SoPicking.h:61
SoPicking::buttonPressed2
SoSFBool buttonPressed2
Definition
SoPicking.h:82
SoPicking::actionID2
SoSFString actionID2
Definition
SoPicking.h:89
SoPicking::updateWhileDragging
SoSFBool updateWhileDragging
Definition
SoPicking.h:75
SoPicking::highlighted3
SoSFBool highlighted3
Definition
SoPicking.h:91
SoPicking::pointerPosition
void pointerPosition(const SoPointerPosition &pos) override
this is called for every mouse move
SoPicking::enabled
SoSFBool enabled
Definition
SoPicking.h:74
SoPicking::buttonPressed3
SoSFBool buttonPressed3
Definition
SoPicking.h:92
SoPicking::enablePathPicking
SoSFBool enablePathPicking
Definition
SoPicking.h:67
SoPicking::diffuseColor
SoSFColor diffuseColor
Definition
SoPicking.h:65
SoPicking::initClass
static void initClass()
Initializes this class.
SoPicking::performPreClickTest2
SoSFBool performPreClickTest2
Definition
SoPicking.h:87
SoPicking::clickCount2
SoSFInt32 clickCount2
Definition
SoPicking.h:83
SoPicking::highlighted2
SoSFBool highlighted2
Definition
SoPicking.h:81
SoPicking::enabled3
SoSFBool enabled3
Definition
SoPicking.h:95
MeVisLab
Standard
Sources
Inventor
SoUtils
SoPicking.h
Generated by
1.18.0