MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::SurfaceManipulationWidget Class Reference

widget for surface modifying @detail available 3 modes: add (move surface region in direction of normal) remove (move surface region in opposite direction to normal) relax (relax surface region) More...

#include <MRSurfaceManipulationWidget.h>

+ Inheritance diagram for MR::SurfaceManipulationWidget:

Classes

struct  Settings
 Mesh change settings. More...
 

Public Types

enum class  WorkMode {
  Add , Remove , Relax , Laplacian ,
  Patch
}
 widget work modes More...
 
enum class  DeviationCalculationMethod { PointToPoint , PointToPlane , ExactDistance }
 Method for calculating mesh changes. More...
 

Public Member Functions

MRVIEWER_API SurfaceManipulationWidget ()
 
MRVIEWER_API ~SurfaceManipulationWidget ()
 
MRVIEWER_API void init (const std::shared_ptr< ObjectMesh > &objectMesh)
 initialize widget according ObjectMesh
 
MRVIEWER_API void reset ()
 reset widget state
 
MRVIEWER_API void setFixedRegion (const FaceBitSet &region)
 
MRVIEWER_API void setSettings (const Settings &settings)
 set widget settings (mesh change settings)
 
MRVIEWER_API const SettingsgetSettings ()
 get widget settings
 
MRVIEWER_API float getMinRadius ()
 mimum radius of editing area.
 
Palettepalette ()
 get palette used for visualization point shifts
 
MRVIEWER_API void updateTexture ()
 update texture used for colorize surface (use after change colorMap in palette)
 
MRVIEWER_API void updateUVs ()
 update texture uv coords used for colorize surface (use after change ranges in palette)
 
MRVIEWER_API void enableDeviationVisualization (bool enable)
 enable visualization of mesh deviations
 
MRVIEWER_API void setDeviationCalculationMethod (DeviationCalculationMethod method)
 set method for calculating mesh changes
 
MRVIEWER_API DeviationCalculationMethod deviationCalculationMethod () const
 get method for calculating mesh changes
 
MRVIEWER_API bool sameValidVerticesAsInOriginMesh () const
 checks for a one-to-one correspondence between the vertices of the original grid and the modified one
 
MRVIEWER_API Vector2f getMinMax ()
 get min / max point shifts for (usefull for setup palette)
 
MRVIEWER_API void setIgnoreOcclusion (bool ignore)
 allow the user to edit parts of object that are hidden in the current view by other objects
 
MRVIEWER_API bool ignoreOcclusion () const
 
- Public Member Functions inherited from MR::MultiListener< MouseDownListener, MouseMoveListener, MouseUpListener, PostDrawListener >
virtual ~MultiListener ()=default
 
virtual void connect (Viewer *viewer, int group=0, boost::signals2::connect_position pos=boost::signals2::connect_position::at_back)
 
virtual void disconnect ()
 

Detailed Description

widget for surface modifying @detail available 3 modes: add (move surface region in direction of normal) remove (move surface region in opposite direction to normal) relax (relax surface region)

Member Enumeration Documentation

◆ DeviationCalculationMethod

Method for calculating mesh changes.

Enumerator
PointToPoint 

distance between the start and end points

PointToPlane 

distance between the initial plane (starting point and normal to it) and the end point

ExactDistance 

distance between the start and end meshes

◆ WorkMode

widget work modes

Enumerator
Add 
Remove 
Relax 
Laplacian 
Patch 

Constructor & Destructor Documentation

◆ SurfaceManipulationWidget()

MRVIEWER_API MR::SurfaceManipulationWidget::SurfaceManipulationWidget ( )

◆ ~SurfaceManipulationWidget()

MRVIEWER_API MR::SurfaceManipulationWidget::~SurfaceManipulationWidget ( )

Member Function Documentation

◆ deviationCalculationMethod()

MRVIEWER_API DeviationCalculationMethod MR::SurfaceManipulationWidget::deviationCalculationMethod ( ) const
inline

get method for calculating mesh changes

◆ enableDeviationVisualization()

MRVIEWER_API void MR::SurfaceManipulationWidget::enableDeviationVisualization ( bool enable)

enable visualization of mesh deviations

◆ getMinMax()

MRVIEWER_API Vector2f MR::SurfaceManipulationWidget::getMinMax ( )

get min / max point shifts for (usefull for setup palette)

◆ getMinRadius()

MRVIEWER_API float MR::SurfaceManipulationWidget::getMinRadius ( )
inline

mimum radius of editing area.

◆ getSettings()

MRVIEWER_API const Settings & MR::SurfaceManipulationWidget::getSettings ( )
inline

get widget settings

◆ ignoreOcclusion()

MRVIEWER_API bool MR::SurfaceManipulationWidget::ignoreOcclusion ( ) const
inline

◆ init()

MRVIEWER_API void MR::SurfaceManipulationWidget::init ( const std::shared_ptr< ObjectMesh > & objectMesh)

initialize widget according ObjectMesh

◆ palette()

Palette & MR::SurfaceManipulationWidget::palette ( )
inline

get palette used for visualization point shifts

◆ reset()

MRVIEWER_API void MR::SurfaceManipulationWidget::reset ( )

reset widget state

◆ sameValidVerticesAsInOriginMesh()

MRVIEWER_API bool MR::SurfaceManipulationWidget::sameValidVerticesAsInOriginMesh ( ) const
inline

checks for a one-to-one correspondence between the vertices of the original grid and the modified one

◆ setDeviationCalculationMethod()

MRVIEWER_API void MR::SurfaceManipulationWidget::setDeviationCalculationMethod ( DeviationCalculationMethod method)

set method for calculating mesh changes

◆ setFixedRegion()

MRVIEWER_API void MR::SurfaceManipulationWidget::setFixedRegion ( const FaceBitSet & region)

lock the mesh region (vertices in this region cannot be moved, added or deleted)

Note
boundary edges can be splitted to improve quality of the patch

◆ setIgnoreOcclusion()

MRVIEWER_API void MR::SurfaceManipulationWidget::setIgnoreOcclusion ( bool ignore)
inline

allow the user to edit parts of object that are hidden in the current view by other objects

◆ setSettings()

MRVIEWER_API void MR::SurfaceManipulationWidget::setSettings ( const Settings & settings)

set widget settings (mesh change settings)

◆ updateTexture()

MRVIEWER_API void MR::SurfaceManipulationWidget::updateTexture ( )

update texture used for colorize surface (use after change colorMap in palette)

◆ updateUVs()

MRVIEWER_API void MR::SurfaceManipulationWidget::updateUVs ( )

update texture uv coords used for colorize surface (use after change ranges in palette)


The documentation for this class was generated from the following file: