MeshLib
 
Loading...
Searching...
No Matches
MR::SurfaceContoursWidget Class Reference

#include <MRSurfaceContoursWidget.h>

+ Inheritance diagram for MR::SurfaceContoursWidget:

Classes

struct  SurfaceContoursWidgetParams
 

Public Types

using PickerPointCallBack = std::function<void( std::shared_ptr<MR::VisualObject> )>
 
using PickerPointObjectChecker = std::function<bool( std::shared_ptr<MR::VisualObject> )>
 
using SurfaceContour = std::vector<std::shared_ptr<SurfacePointWidget>>
 
using SurfaceContours = std::unordered_map <std::shared_ptr<MR::VisualObject>, SurfaceContour>
 

Public Member Functions

MRVIEWER_API void enable (bool isEnabled)
 
MRVIEWER_API void create (PickerPointCallBack onPointAdd, PickerPointCallBack onPointMove, PickerPointCallBack onPointMoveFinish, PickerPointCallBack onPointRemove, PickerPointObjectChecker isObjectValidToPick)
 
MRVIEWER_API void clear ()
 
MRVIEWER_API void reset ()
 
const SurfaceContourgetSurfaceContour (const std::shared_ptr< MR::VisualObject > &obj)
 
const SurfaceContoursgetSurfaceContours () const
 
bool isClosedCountour (const std::shared_ptr< VisualObject > &obj)
 
void highlightLastPoint (const std::shared_ptr< VisualObject > &obj)
 
MRVIEWER_API std::pair< std::shared_ptr< MR::VisualObject >, int > getActivePoint () const
 
MRVIEWER_API void setActivePoint (std::shared_ptr< MR::VisualObject > obj, int index)
 
MRVIEWER_API std::shared_ptr< SurfacePointWidgetgetActiveSurfacePoint () const
 Get the active (the latest picked/moved) surface point widget.
 
MRVIEWER_API bool appendPoint (const std::shared_ptr< VisualObject > &obj, const PickedPoint &triPoint)
 
MRVIEWER_API bool removePoint (const std::shared_ptr< VisualObject > &obj, int pickedIndex)
 
MRVIEWER_API bool closeContour (const std::shared_ptr< VisualObject > &objectToCloseCoutour)
 
- 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

SurfaceContoursWidgetParams params
 

Friends

class AddPointActionPickerPoint
 
class RemovePointActionPickerPoint
 
class ChangePointActionPickerPoint
 
class SurfaceContoursWidgetClearAction
 

Member Typedef Documentation

◆ PickerPointCallBack

using MR::SurfaceContoursWidget::PickerPointCallBack = std::function<void( std::shared_ptr<MR::VisualObject> )>

◆ PickerPointObjectChecker

using MR::SurfaceContoursWidget::PickerPointObjectChecker = std::function<bool( std::shared_ptr<MR::VisualObject> )>

◆ SurfaceContour

using MR::SurfaceContoursWidget::SurfaceContour = std::vector<std::shared_ptr<SurfacePointWidget>>

◆ SurfaceContours

using MR::SurfaceContoursWidget::SurfaceContours = std::unordered_map <std::shared_ptr<MR::VisualObject>, SurfaceContour>

Member Function Documentation

◆ appendPoint()

MRVIEWER_API bool MR::SurfaceContoursWidget::appendPoint ( const std::shared_ptr< VisualObject > & obj,
const PickedPoint & triPoint )

◆ clear()

MRVIEWER_API void MR::SurfaceContoursWidget::clear ( )

◆ closeContour()

MRVIEWER_API bool MR::SurfaceContoursWidget::closeContour ( const std::shared_ptr< VisualObject > & objectToCloseCoutour)

◆ create()

MRVIEWER_API void MR::SurfaceContoursWidget::create ( PickerPointCallBack onPointAdd,
PickerPointCallBack onPointMove,
PickerPointCallBack onPointMoveFinish,
PickerPointCallBack onPointRemove,
PickerPointObjectChecker isObjectValidToPick )

◆ enable()

MRVIEWER_API void MR::SurfaceContoursWidget::enable ( bool isEnabled)

◆ getActivePoint()

MRVIEWER_API std::pair< std::shared_ptr< MR::VisualObject >, int > MR::SurfaceContoursWidget::getActivePoint ( ) const

◆ getActiveSurfacePoint()

MRVIEWER_API std::shared_ptr< SurfacePointWidget > MR::SurfaceContoursWidget::getActiveSurfacePoint ( ) const

Get the active (the latest picked/moved) surface point widget.

◆ getSurfaceContour()

const SurfaceContour & MR::SurfaceContoursWidget::getSurfaceContour ( const std::shared_ptr< MR::VisualObject > & obj)
inlinenodiscard

◆ getSurfaceContours()

const SurfaceContours & MR::SurfaceContoursWidget::getSurfaceContours ( ) const
inlinenodiscard

◆ highlightLastPoint()

void MR::SurfaceContoursWidget::highlightLastPoint ( const std::shared_ptr< VisualObject > & obj)

◆ isClosedCountour()

bool MR::SurfaceContoursWidget::isClosedCountour ( const std::shared_ptr< VisualObject > & obj)
nodiscard

◆ removePoint()

MRVIEWER_API bool MR::SurfaceContoursWidget::removePoint ( const std::shared_ptr< VisualObject > & obj,
int pickedIndex )

◆ reset()

MRVIEWER_API void MR::SurfaceContoursWidget::reset ( )

◆ setActivePoint()

MRVIEWER_API void MR::SurfaceContoursWidget::setActivePoint ( std::shared_ptr< MR::VisualObject > obj,
int index )

Friends And Related Symbol Documentation

◆ AddPointActionPickerPoint

friend class AddPointActionPickerPoint
friend

◆ ChangePointActionPickerPoint

friend class ChangePointActionPickerPoint
friend

◆ RemovePointActionPickerPoint

friend class RemovePointActionPickerPoint
friend

◆ SurfaceContoursWidgetClearAction

friend class SurfaceContoursWidgetClearAction
friend

Member Data Documentation

◆ params

SurfaceContoursWidgetParams MR::SurfaceContoursWidget::params

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