MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
SoPlaneDragger.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_PLANE_DRAGGER_H
14
#define SO_PLANE_DRAGGER_H
15
17
18
#include "
SoUtilsSystem.h
"
19
20
#include <ThirdPartyWarningsDisable.h>
21
#include <Inventor/draggers/SoJackDragger.h>
22
#include <Inventor/fields/SoSFPlane.h>
23
#include <Inventor/fields/SoSFBool.h>
24
#include <Inventor/fields/SoSFColor.h>
25
#include <Inventor/nodes/SoMaterial.h>
26
#include <ThirdPartyWarningsRestore.h>
27
28
class
SoViewerProxy
;
29
31
34
class
SoPlaneDragger
:
public
SoJackDragger
35
{
36
SO_KIT_HEADER(
SoPlaneDragger
);
37
38
public
:
39
// Constructor
40
SoPlaneDragger
();
41
43
SoSFPlane
plane
;
44
45
SoSFBool
drawPlane
;
46
SoSFBool
enableTranslation
;
47
SoSFBool
enableRotation
;
48
49
SoSFBool
enableMouseOverCursor
;
50
SoSFBool
enableMouseOverHighlight
;
51
52
SoSFColor
planePassivColor
;
53
SoSFColor
planeActiveColor
;
54
56
static
void
initClass
();
57
59
void
fieldChanged
(SoField* field =
nullptr
);
60
61
void
handleEvent
(SoHandleEventAction* ha)
override
;
62
63
void
updateHighlightWithPickedPoint
(SoHandleEventAction* ha);
64
65
void
setCursorForState
();
66
67
protected
:
68
~SoPlaneDragger
()
override
;
69
70
private
:
72
SoDrawStyle* _drawStyleP1;
74
SoPickStyle* _pickStyleTranslator;
76
SoPickStyle* _pickStyleRotator;
77
79
SoMaterial* _planePassivMaterial;
81
SoMaterial* _planeActiveMaterial;
82
83
SoNode* _pickSphere;
84
SoNode* _pickLineSet;
85
SoNode* _pickFaceSet;
86
87
enum
HighlightState {
88
HIGHLIGHT_NONE,
89
HIGHLIGHT_TRANSLATOR,
90
HIGHLIGHT_ROTATOR,
91
};
92
93
void
setHighlightState(HighlightState state);
94
95
static
void
finishedDraggingCB(
void
* userData, SoDragger* dragger);
96
97
SoSwitch* _translatorHighlightSwitch;
98
SoSwitch* _rotatorHighlightSwitch;
99
HighlightState _lastHighlightState;
100
SoViewerProxy
* _lastViewerProxy;
101
};
102
103
#endif
SoUtilsSystem.h
SoPlaneDragger::fieldChanged
void fieldChanged(SoField *field=nullptr)
handle field changes
SoPlaneDragger::enableMouseOverCursor
SoSFBool enableMouseOverCursor
Definition
SoPlaneDragger.h:49
SoPlaneDragger::setCursorForState
void setCursorForState()
SoPlaneDragger::drawPlane
SoSFBool drawPlane
Definition
SoPlaneDragger.h:45
SoPlaneDragger::enableTranslation
SoSFBool enableTranslation
Definition
SoPlaneDragger.h:46
SoPlaneDragger::SoPlaneDragger
SoPlaneDragger()
SoPlaneDragger::updateHighlightWithPickedPoint
void updateHighlightWithPickedPoint(SoHandleEventAction *ha)
SoPlaneDragger::enableRotation
SoSFBool enableRotation
Definition
SoPlaneDragger.h:47
SoPlaneDragger::~SoPlaneDragger
~SoPlaneDragger() override
SoPlaneDragger::planePassivColor
SoSFColor planePassivColor
Definition
SoPlaneDragger.h:52
SoPlaneDragger::planeActiveColor
SoSFColor planeActiveColor
Definition
SoPlaneDragger.h:53
SoPlaneDragger::initClass
static void initClass()
inventor runtime type system
SoPlaneDragger::plane
SoSFPlane plane
plane that the dragger currently represents
Definition
SoPlaneDragger.h:43
SoPlaneDragger::handleEvent
void handleEvent(SoHandleEventAction *ha) override
SoPlaneDragger::enableMouseOverHighlight
SoSFBool enableMouseOverHighlight
Definition
SoPlaneDragger.h:50
SoViewerProxy
Definition
SoViewerProxy.h:30
MeVisLab
Standard
Sources
Inventor
SoUtils
SoPlaneDragger.h
Generated by
1.18.0