20 public MultiListener<MouseDownListener, MouseMoveListener, MouseUpListener,
42 float relaxForce = 0.2f;
43 float editForce = 1.f;
44 float sharpness = 50.f;
45 float relaxForceAfterEdit = 0.25f;
50 MRVIEWER_API
void init(
const std::shared_ptr<ObjectMesh>& objectMesh );
68 MRVIEWER_API
bool onMouseMove_(
int mouse_x,
int mouse_y )
override;
70 MRVIEWER_API
void postDraw_()
override;
72 void initConnections_();
73 void resetConnections_();
75 void changeSurface_();
76 void updateUVmap_(
bool set );
77 void updateRegion_(
const Vector2f& mousePos );
81 void laplacianMoveVert_(
const Vector2f& mousePos );
83 void updateVizualizeSelection_(
const ObjAndPick& objAndPick );
87 std::shared_ptr<ObjectMesh> obj_;
88 float diagonal_ = 1.f;
89 float minRadius_ = 1.f;
94 VertScalars pointsShift_;
95 VertScalars editingDistanceMap_;
96 VertScalars visualizationDistanceMap_;
97 std::shared_ptr<ObjectMesh> oldMesh_;
98 bool firstInit_ =
true;
99 bool badRegion_ =
false;
101 bool mousePressed_ =
false;
103 std::chrono::time_point<std::chrono::high_resolution_clock> timePoint_;
104 boost::signals2::scoped_connection meshChangedConnection_;
105 bool ownMeshChangedSignal_ =
false;
107 bool connectionsInitialized_ =
false;
112 Vector2i storedDown_;
113 std::unique_ptr<Laplacian> laplacian_;
114 std::shared_ptr<HistoryAction> historyAction_;
115 bool appendHistoryAction_ =
false;
int VertId
Definition MRDotNet/MRMeshFwd.h:51
std::pair< std::shared_ptr< MR::VisualObject >, MR::PointOnObject > ObjAndPick
Definition MRViewport.h:21
Definition MRDotNet/MRBitSet.h:39
Definition MRLaplacian.h:32
represents a 3-dimentional float-typed vector
Definition MRDotNet/MRVector3.h:8
Definition MRCameraOrientationPlugin.h:8
MouseButton
Definition MRMouse.h:9
EdgeWeights
determines the weight of each edge in applications like Laplacian
Definition MREnums.h:8
Definition MRViewerEventsListener.h:29
Definition MRMesh/MRPointOnFace.h:11