19 public MultiListener<MouseDownListener, MouseMoveListener, MouseUpListener,
41 float relaxForce = 0.2f;
42 float editForce = 1.f;
43 float sharpness = 50.f;
44 float relaxForceAfterEdit = 0.25f;
49 MRVIEWER_API
void init(
const std::shared_ptr<ObjectMesh>& objectMesh );
73 MRVIEWER_API
bool onMouseDown_(
MouseButton button,
int modifiers )
override;
75 MRVIEWER_API
bool onMouseUp_(
MouseButton button,
int modifiers )
override;
77 MRVIEWER_API
bool onMouseMove_(
int mouse_x,
int mouse_y )
override;
79 MRVIEWER_API
void postDraw_()
override;
81 void reallocData_(
size_t size );
84 void initConnections_();
85 void resetConnections_();
87 void changeSurface_();
88 void updateUVmap_(
bool set );
89 void updateRegion_(
const Vector2f& mousePos );
93 void laplacianMoveVert_(
const Vector2f& mousePos );
95 void updateVizualizeSelection_(
const ObjAndPick& objAndPick );
97 void updateRegionUVs_(
const VertBitSet& region );
98 void updateValueChanges_(
const VertBitSet& region );
99 void updateValueChangesByDistance_(
const VertBitSet& region );
103 std::shared_ptr<ObjectMesh> obj_;
104 float minRadius_ = 1.f;
106 VertBitSet singleEditingRegion_;
107 VertBitSet visualizationRegion_;
108 VertBitSet generalEditingRegion_;
109 VertScalars pointsShift_;
110 VertScalars editingDistanceMap_;
111 VertScalars visualizationDistanceMap_;
112 VertBitSet changedRegion_;
113 VertScalars valueChanges_;
114 VertScalars lastStableValueChanges_;
115 std::shared_ptr<Mesh> originalMesh_;
116 VertBitSet unknownSign_;
117 std::shared_ptr<ObjectMesh> lastStableObjMesh_;
118 bool firstInit_ =
true;
119 bool badRegion_ =
false;
121 bool mousePressed_ =
false;
123 std::chrono::time_point<std::chrono::high_resolution_clock> timePoint_;
124 boost::signals2::scoped_connection meshChangedConnection_;
125 bool ownMeshChangedSignal_ =
false;
127 bool connectionsInitialized_ =
false;
131 Vector3f touchVertIniPos_;
132 Vector2i storedDown_;
133 std::unique_ptr<Laplacian> laplacian_;
134 std::shared_ptr<HistoryAction> historyAction_;
135 bool appendHistoryAction_ =
false;
137 std::shared_ptr<Palette> palette_;
138 bool enableDeviationTexture_ =
true;
std::pair< std::shared_ptr< MR::VisualObject >, MR::PointOnObject > ObjAndPick
Definition MRViewport.h:21
Definition MRLaplacian.h:32
Class to hold one dimension texture with value to UV mapping.
Definition MRPalette.h:25
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