MeVisLab Toolbox Reference
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
35class SoNodeSensor;
36class SoDataSensor;
38
40{
41 SO_NODE_HEADER(SoPicking);
42
43 friend class SoPickingPickAction;
44
45public:
48
50 static void initClass();
51
63
66
69
73
80
84
90
94
100
102
103protected:
105
107 void pointerPosition(const SoPointerPosition& pos) override;
108
111 void pointerLeftWindow() override;
112
113private:
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
SoInteractionNode is the base class for normal interaction nodes in OpenInventor that handle their in...
void pointerPosition(SoState *state, const SoPointerPosition &pos) override
Same as below, with additional SoState argument. By default, simply calls the below version.
virtual void pointerLeftWindow()
This is called when the mouse cursor leaves the window.
SoSFBool updateWhileDragging2
Definition SoPicking.h:86
void pointerLeftWindow() override
This is called when the mouse cursor leaves the window.
SoSFEnum cursorShape
Definition SoPicking.h:78
SoSFVec3f objectWorld
Definition SoPicking.h:55
SoSFVec3f objectLocal
Definition SoPicking.h:54
SoSFInt32 clickCount3
Definition SoPicking.h:93
SoSFVec3f normalWorld
Definition SoPicking.h:57
SoSFBool enableColorPicking
Definition SoPicking.h:64
SoSFBool highlighted
Definition SoPicking.h:70
SoSFBool pointPicked
Definition SoPicking.h:62
SoSFInt32 clickCount
Definition SoPicking.h:72
SoSFBool performPreClickTest
Definition SoPicking.h:76
SoSFEnum cursorShape2
Definition SoPicking.h:88
SoSFBool updateContinuously
Definition SoPicking.h:77
SoSFVec3f textureLocal3
Definition SoPicking.h:58
SoSFBool performPreClickTest3
Definition SoPicking.h:97
SoSFVec3f normalLocal
Definition SoPicking.h:56
SoSFPath pickedPath
Definition SoPicking.h:68
SoSFBool enabled2
Definition SoPicking.h:85
SoSFBool updateWhileDragging3
Definition SoPicking.h:96
SoSFString actionID3
Definition SoPicking.h:99
SoSFBool buttonPressed
Definition SoPicking.h:71
friend class SoPickingPickAction
Definition SoPicking.h:43
SoSFString actionID
Definition SoPicking.h:79
SoSFVec3f textureWorld3
Definition SoPicking.h:59
SoSFVec4f textureLocal4
Definition SoPicking.h:60
SoSFEnum cursorShape3
Definition SoPicking.h:98
SoPicking()
Constructor.
SoSFVec4f textureWorld4
Definition SoPicking.h:61
SoSFBool buttonPressed2
Definition SoPicking.h:82
SoSFString actionID2
Definition SoPicking.h:89
SoSFBool updateWhileDragging
Definition SoPicking.h:75
SoSFBool highlighted3
Definition SoPicking.h:91
void pointerPosition(const SoPointerPosition &pos) override
this is called for every mouse move
SoSFBool enabled
Definition SoPicking.h:74
SoSFBool buttonPressed3
Definition SoPicking.h:92
SoSFBool enablePathPicking
Definition SoPicking.h:67
SoSFColor diffuseColor
Definition SoPicking.h:65
static void initClass()
Initializes this class.
SoSFBool performPreClickTest2
Definition SoPicking.h:87
SoSFInt32 clickCount2
Definition SoPicking.h:83
SoSFBool highlighted2
Definition SoPicking.h:81
SoSFBool enabled3
Definition SoPicking.h:95
SoPointerPosition manages the current position of the mouse cursor.
SoPointingAction is the base class for any mouse based interaction.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.