MeshLib Documentation
Loading...
Searching...
No Matches
MR::SurfacePointWidget Class Reference

#include <MRSurfacePointPicker.h>

+ Inheritance diagram for MR::SurfacePointWidget:

Classes

struct  Parameters
 

Public Types

enum class  PositionType {
  Faces , FaceCenters , Edges , EdgeCeneters ,
  Verts
}
 

Public Member Functions

MRVIEWER_API ~SurfacePointWidget ()
 
MRVIEWER_API const PickedPointcreate (const std::shared_ptr< VisualObject > &surface, const PointOnObject &startPos)
 
MRVIEWER_API const PickedPointcreate (const std::shared_ptr< VisualObject > &surface, const PickedPoint &startPos)
 
MRVIEWER_API void reset ()
 
std::shared_ptr< SphereObjectgetPickSphere () const
 
const ParametersgetParameters () const
 
MRVIEWER_API void setParameters (const Parameters &params)
 
MRVIEWER_API void updateParameters (const std::function< void(Parameters &)> &visitor)
 
bool getAutoHover () const
 
void setAutoHover (bool on)
 
MRVIEWER_API void setHovered (bool on)
 
const PickedPointgetCurrentPosition () const
 
MRVIEWER_API Vector3f toVector3f () const
 
std::optional< MeshTriPointgetCurrentPositionMeshTriPoint () const
 
MRVIEWER_API void updateCurrentPosition (const PointOnObject &pos)
 
MRVIEWER_API void updateCurrentPosition (const PickedPoint &pos)
 
void setStartMoveCallback (std::function< void(const PickedPoint &)> startMove)
 
void setOnMoveCallback (std::function< void(const PickedPoint &)> onMove)
 
void setEndMoveCallback (std::function< void(const PickedPoint &)> endMove)
 
std::shared_ptr< VisualObject > & getBaseSurface ()
 
bool isOnMove () const
 
- Public Member Functions inherited from MR::MultiListener< PreDrawListener, MouseDownListener, MouseMoveListener, MouseUpListener >
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 ()
 

Static Public Member Functions

static bool isPickIntoBackFace (const std::shared_ptr< MR::VisualObject > &obj, const MR::PointOnObject &pick, const Vector3f &cameraEye)
 

Member Enumeration Documentation

◆ PositionType

Enumerator
Faces 
FaceCenters 
Edges 
EdgeCeneters 
Verts 

Constructor & Destructor Documentation

◆ ~SurfacePointWidget()

MRVIEWER_API MR::SurfacePointWidget::~SurfacePointWidget ( )

Member Function Documentation

◆ create() [1/2]

MRVIEWER_API const PickedPoint & MR::SurfacePointWidget::create ( const std::shared_ptr< VisualObject > & surface,
const PickedPoint & startPos )

◆ create() [2/2]

MRVIEWER_API const PickedPoint & MR::SurfacePointWidget::create ( const std::shared_ptr< VisualObject > & surface,
const PointOnObject & startPos )

◆ getAutoHover()

bool MR::SurfacePointWidget::getAutoHover ( ) const
inline

◆ getBaseSurface()

std::shared_ptr< VisualObject > & MR::SurfacePointWidget::getBaseSurface ( )
inline

◆ getCurrentPosition()

const PickedPoint & MR::SurfacePointWidget::getCurrentPosition ( ) const
inline

◆ getCurrentPositionMeshTriPoint()

std::optional< MeshTriPoint > MR::SurfacePointWidget::getCurrentPositionMeshTriPoint ( ) const
inline

◆ getParameters()

const Parameters & MR::SurfacePointWidget::getParameters ( ) const
inline

◆ getPickSphere()

std::shared_ptr< SphereObject > MR::SurfacePointWidget::getPickSphere ( ) const
inline

◆ isOnMove()

bool MR::SurfacePointWidget::isOnMove ( ) const
inlinenodiscard

◆ isPickIntoBackFace()

static bool MR::SurfacePointWidget::isPickIntoBackFace ( const std::shared_ptr< MR::VisualObject > & obj,
const MR::PointOnObject & pick,
const Vector3f & cameraEye )
staticnodiscard

◆ reset()

MRVIEWER_API void MR::SurfacePointWidget::reset ( )

◆ setAutoHover()

void MR::SurfacePointWidget::setAutoHover ( bool on)
inline

◆ setEndMoveCallback()

void MR::SurfacePointWidget::setEndMoveCallback ( std::function< void(const PickedPoint &)> endMove)
inline

◆ setHovered()

MRVIEWER_API void MR::SurfacePointWidget::setHovered ( bool on)

◆ setOnMoveCallback()

void MR::SurfacePointWidget::setOnMoveCallback ( std::function< void(const PickedPoint &)> onMove)
inline

◆ setParameters()

MRVIEWER_API void MR::SurfacePointWidget::setParameters ( const Parameters & params)

◆ setStartMoveCallback()

void MR::SurfacePointWidget::setStartMoveCallback ( std::function< void(const PickedPoint &)> startMove)
inline

◆ toVector3f()

MRVIEWER_API Vector3f MR::SurfacePointWidget::toVector3f ( ) const

◆ updateCurrentPosition() [1/2]

MRVIEWER_API void MR::SurfacePointWidget::updateCurrentPosition ( const PickedPoint & pos)

◆ updateCurrentPosition() [2/2]

MRVIEWER_API void MR::SurfacePointWidget::updateCurrentPosition ( const PointOnObject & pos)

◆ updateParameters()

MRVIEWER_API void MR::SurfacePointWidget::updateParameters ( const std::function< void(Parameters &)> & visitor)

Update the widget parameters.

Parameters
visitor- the function that takes the widget parameters and modifies them. Then the parameters are applied by setParameters.

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