MeVisLab Toolbox Reference
SoSelection2.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_SELECTION2_H
14 #define SO_SELECTION2_H
15 
16 
18 // Creates some output fields which contain coordinates
19 // returned by the ray pick action executed by the SoSelection node.
20 // So simple selected inventor picked point coordinates
21 // can be connected to other modules via field connections.
22 
23 #include <Inventor/nodes/SoSelection.h>
24 #include <Inventor/fields/SoSFTrigger.h>
25 #include <Inventor/fields/SoSFBool.h>
26 #include <Inventor/fields/SoSFVec3f.h>
27 #include <Inventor/fields/SoSFVec4f.h>
28 #include <Inventor/fields/SoSFFloat.h>
29 #include <Inventor/fields/SoSFInt32.h>
30 #include <Inventor/fields/SoSFString.h>
31 #include <Inventor/fields/SoSFEnum.h>
32 
33 class SoNodeSensor;
34 class SoDataSensor;
35 class SoPath;
36 
37 class SoSelection2 : public SoSelection {
38 
39  SO_NODE_HEADER(SoSelection2);
40 
41 public:
42 
45 
47  static void initClass();
48 
51  SoSFVec3f objectVoxel;
52  SoSFVec3f objectWorld;
53  SoSFVec3f normalVoxel;
54  SoSFVec3f normalWorld;
55  SoSFVec3f textureVoxel3;
56  SoSFVec3f textureWorld3;
57  SoSFVec4f textureVoxel4;
58  SoSFVec4f textureWorld4;
60  SoSFBool pickMatching;
63 
64 
65 private:
66 
68  static SoPath *__pickFilterCB(void *userData, const SoPickedPoint *pick);
69 
71  SoPath *_pickFilterCB(const SoPickedPoint *pick);
72 
74  static void __selectionChangeStartedCB(void *userData, SoSelection *sel);
75 
77  void _selectionChangeStartedCB();
78 
80  static void __selectionChangedCB(void *userData, SoSelection *sel);
81 
83  void _selectionChangedCB();
84 
86  static void __singleSelectionChangeCB(void *userData, SoSelection *sel);
87 
89  void _singleSelectionChangeCB();
90 
91  void _updateNumberOfSelectedObjects();
92 
93  void _pickMatchingChanged(SoField*);
94 
95  bool _inSelectionChange;
96 };
97 
98 #endif
99 
SoSFVec3f objectVoxel
Definition: SoSelection2.h:51
static void initClass()
Initializes this class.
SoSFVec3f textureWorld3
Definition: SoSelection2.h:56
SoSFVec4f textureVoxel4
Definition: SoSelection2.h:57
SoSFVec3f textureVoxel3
Definition: SoSelection2.h:55
SoSFVec3f normalVoxel
Definition: SoSelection2.h:53
SoSFVec3f objectWorld
Definition: SoSelection2.h:52
SoSFInt32 numberOfSelectedObjects
Definition: SoSelection2.h:61
SoSFVec4f textureWorld4
Definition: SoSelection2.h:58
SoSelection2()
Constructor.
SoSFBool pickMatching
Switch to enable/disable pick twice mode for pickMatching.
Definition: SoSelection2.h:60
SoSFVec3f normalWorld
Definition: SoSelection2.h:54