MeshLib C++ Docs
Loading...
Searching...
No Matches

#include <MRViewer/MRMeshBoundarySelectionWidget.h>

Inheritance diagram for MR::BoundarySelectionWidget:

Classes

struct  BoundarySelectionWidgetParams

Public Types

using BoundarySelectionWidgetCallBack = std::function<void( std::shared_ptr<const MR::ObjectMeshHolder> )>
using BoundarySelectionWidgetChecker = std::function<bool( std::shared_ptr<const MR::ObjectMeshHolder> )>
using HolesOnObject = std::vector<MR::EdgeId>
using PerObjectHoles = std::unordered_map <std::shared_ptr<MR::ObjectMeshHolder>, HolesOnObject>
using PerObjectHolesPolylines = std::unordered_map <std::shared_ptr<MR::ObjectMeshHolder>, std::vector<AncillaryLines>>
using PerObjectMeshChangedSignals = std::unordered_map < std::shared_ptr<MR::ObjectMeshHolder>, boost::signals2::scoped_connection>

Public Member Functions

void enable (bool isEnabled)
 enable or disable widget
void create (BoundarySelectionWidgetCallBack onBoundarySelected, BoundarySelectionWidgetChecker isObjectValidToPick)
void onObjectChange_ ()
 meshChangedSignal processor
void reset ()
 reset widget, clear internal variables and detach from signals.
bool selectHole (std::shared_ptr< MR::ObjectMeshHolder > object, int index)
 select one of the holes. Return true on success.
void clear ()
 clear selection
std::pair< std::shared_ptr< MR::ObjectMeshHolder >, EdgeId > getSelectHole () const
 returns pair of selected hole ( in Edge representations) and objects on which particular hole is present
std::vector< MR::Vector3f > getPointsForSelectedHole () const
 collect and return vector of points ( verts coord ) for all edges in selected mesh boundary
Public Member Functions inherited from MR::MultiListener< MouseDownListener, MouseMoveListener >
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 ()

Public Attributes

BoundarySelectionWidgetParams params
 configuration params

Friends

class ChangeBoundarySelectionHistoryAction

Detailed Description

A widget that allows you to find, highlight and select boundaries (holes) in the mesh. To provide feedback during creation, it is necessary to specify a callback that will be called if a specific hole is selected.


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