MeVisLab Toolbox Reference
SoCSODistancePolylineEditor.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2012, 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 
15 
16 #pragma once
17 
20 
22 
25 {
26  SO_NODE_HEADER(SoCSODistancePolylineEditor);
27 
28 public:
29 
32 
34  static void initClass();
35 
37  SoSFBool useFreehandMode;
38 
39  void createStartPressAt(const SoPointerPosition& pos) override;
40 
41  void createNewCSO( const SoPointerPosition& pos );
42  void createDragMoveTo(const SoPointerPosition& pos) override;
43  bool createEndPress(int clickCount) override;
44  void pointerPositionIfAllowedAt(const SoPointerPosition& pos) override;
45 
46  void selectAndMoveStartPressAt(const SoPointerPosition& pos) override;
47  void selectAndMoveDragMoveTo(const SoPointerPosition& pos) override;
48  SoPointingAction* selectAndMoveEndPress(int clickCount) override;
49 
51  void insertSeedPointDragMoveTo(const SoPointerPosition& pos) override;
52  SoPointingAction* insertSeedPointEndPress(int clickCount) override;
53 
54  bool deleteSeedPoint(ml::CSO* cso, ml::CSOSeedPoint* seedPoint) override;
55 
56  void cancel() override;
57 
58 protected:
59 
61 
62 private:
63 
64  SbVec3f _startPosition;
65  SoPointerPosition _startPointerPosition;
66  ml::Vector3 _currentPosition;
67 };
68 
#define SOCSO_EXPORT
Header file for system independent resolution.
Definition: SoCSOSystem.h:21
Extension for rendering, generating, and modifying a distance polyline CSO.
void createDragMoveTo(const SoPointerPosition &pos) override
void cancel() override
Cancels an action like generating a CSO. Depends on concrete editor.
static void initClass()
init class in inventor runtime
SoPointingAction * selectAndMoveEndPress(int clickCount) override
SoCSODistancePolylineEditor()
Standard constructor.
ml::Vector3 getCurrentPositon(const SoPointerPosition &pos)
void insertSeedPointDragMoveTo(const SoPointerPosition &pos) override
SoPointingAction * insertSeedPointEndPress(int clickCount) override
void pointerPositionIfAllowedAt(const SoPointerPosition &pos) override
Sets seed points while moving the mouse – but not while dragging.
void createNewCSO(const SoPointerPosition &pos)
void selectAndMoveStartPressAt(const SoPointerPosition &pos) override
SoSFBool useFreehandMode
Toggles the interaction.
void createStartPressAt(const SoPointerPosition &pos) override
bool deleteSeedPoint(ml::CSO *cso, ml::CSOSeedPoint *seedPoint) override
Removes the given seed point from the given CSO and returns whether that was successful.
void insertSeedPointStartPressAt(const SoPointerPosition &pos) override
void selectAndMoveDragMoveTo(const SoPointerPosition &pos) override
bool createEndPress(int clickCount) override
Base class for extensions that generate line-type CSOs with special interaction on finished CSOs.
SoPointerPosition manages the current position of the mouse cursor.
SoPointingAction is the base class for any mouse based interaction.
The CSOSeedPoint can be interactively set and modified and is the framework for contours.
Definition: CSOSeedPoint.h:35
The CSO represents a contour segmentation object.
Definition: CSO.h:44