@@ -20,8 +20,8 @@ class MRVIEWER_CLASS PickPointManager : public MultiListener<
20
20
MouseMoveListener>
21
21
{
22
22
public:
23
- using PickerPointCallBack = std::function<void ( std::shared_ptr<MR:: VisualObject> obj, int index )>;
24
- using AllowCallBack = std::function<bool ( const std::shared_ptr<MR:: VisualObject>& obj, int index )>;
23
+ using PickerPointCallBack = std::function<void ( std::shared_ptr<VisualObject> obj, int index )>;
24
+ using AllowCallBack = std::function<bool ( const std::shared_ptr<VisualObject>& obj, int index )>;
25
25
26
26
struct Params
27
27
{
@@ -44,17 +44,14 @@ class MRVIEWER_CLASS PickPointManager : public MultiListener<
44
44
// / Parameters affect to future points only
45
45
SurfacePointWidget::Parameters surfacePointParams;
46
46
47
- // / Color for ordinary points in the contour
48
- // / Parameters affect to future points only
49
- MR::Color ordinaryPointColor = Color::gray();
47
+ // / The color of all pick spheres except the one with the largest index on each object
48
+ Color ordinaryPointColor = Color::gray();
50
49
51
- // / Color for the last modified point in the contour
52
- // / Parameters affect to future points only
53
- MR::Color lastPointColor = Color::green();
50
+ // / The color of last by index pick sphere in open contour
51
+ Color lastPointColor = Color::green();
54
52
55
- // / Color for the special point used to close a contour. Better do not change it.
56
- // / Parameters affect to future points only
57
- MR::Color closeContourPointColor = Color::transparent();
53
+ // / The color of last by index pick sphere in closed contour, which coincides in position with the first pick sphere
54
+ Color closeContourPointColor = Color::transparent();
58
55
59
56
// / Predicate to additionally filter objects that should be treated as pickable.
60
57
Viewport::PickRenderObjectPredicate pickPredicate;
@@ -88,7 +85,7 @@ class MRVIEWER_CLASS PickPointManager : public MultiListener<
88
85
struct WidgetHistoryAction : HistoryAction {};
89
86
90
87
using SurfaceContour = std::vector<std::shared_ptr<SurfacePointWidget>>;
91
- using SurfaceContours = std::unordered_map <std::shared_ptr<MR:: VisualObject>, SurfaceContour>;
88
+ using SurfaceContours = std::unordered_map <std::shared_ptr<VisualObject>, SurfaceContour>;
92
89
93
90
// / create an object and starts listening for mouse events
94
91
MRVIEWER_API PickPointManager ();
@@ -97,7 +94,7 @@ class MRVIEWER_CLASS PickPointManager : public MultiListener<
97
94
MRVIEWER_API ~PickPointManager ();
98
95
99
96
// / return contour for specific object (creating new one if necessary)
100
- [[nodiscard]] const SurfaceContour& getSurfaceContour ( const std::shared_ptr<MR:: VisualObject>& obj ) { return pickedPoints_[obj]; }
97
+ [[nodiscard]] const SurfaceContour& getSurfaceContour ( const std::shared_ptr<VisualObject>& obj ) { return pickedPoints_[obj]; }
101
98
102
99
// / return all contours, i.e. per object unorderd_map of ordered surface points [vector].
103
100
[[nodiscard]] const SurfaceContours& getSurfaceContours () const { return pickedPoints_; }
@@ -161,7 +158,7 @@ class MRVIEWER_CLASS PickPointManager : public MultiListener<
161
158
void colorLast2Points_ ( const std::shared_ptr<VisualObject>& obj );
162
159
163
160
// creates point widget for add to contour.
164
- [[nodiscard]] std::shared_ptr<SurfacePointWidget> createPickWidget_ ( const std::shared_ptr<MR:: VisualObject>& obj, const PickedPoint& pt );
161
+ [[nodiscard]] std::shared_ptr<SurfacePointWidget> createPickWidget_ ( const std::shared_ptr<VisualObject>& obj, const PickedPoint& pt );
165
162
166
163
// / removes everything
167
164
void clearNoHistory_ ();
0 commit comments