ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::visualization::gui::PickPointsInteractor Class Reference

#include <PickPointsInteractor.h>

Inheritance diagram for cloudViewer::visualization::gui::PickPointsInteractor:
Collaboration diagram for cloudViewer::visualization::gui::PickPointsInteractor:

Public Member Functions

 PickPointsInteractor (rendering::CloudViewerScene *scene, rendering::Camera *camera)
 
virtual ~PickPointsInteractor ()
 
void SetPointSize (int px)
 
void SetPickableGeometry (const std::vector< SceneWidget::PickableGeometry > &geometry)
 
void SetNeedsRedraw ()
 
void SetOnPointsPicked (std::function< void(const std::map< std::string, std::vector< std::pair< size_t, Eigen::Vector3d >>> &, int)> f)
 
void SetOnUIChanged (std::function< void(const std::vector< Eigen::Vector2i > &)>)
 
void SetOnStartedPolygonPicking (std::function< void()> on_poly_pick)
 Calls the provided function when polygon picking is initiated. More...
 
void DoPick ()
 
void ClearPick ()
 
rendering::MatrixInteractorLogicGetMatrixInteractor () override
 
void Mouse (const MouseEvent &e) override
 
void Key (const KeyEvent &e) override
 
- Public Member Functions inherited from cloudViewer::visualization::gui::SceneWidget::MouseInteractor
virtual ~MouseInteractor ()=default
 
virtual bool Tick (const TickEvent &e)
 

Protected Member Functions

void OnPickImageDone (std::shared_ptr< geometry::Image > img)
 
rendering::MaterialRecord MakeMaterial ()
 

Detailed Description

Definition at line 35 of file PickPointsInteractor.h.

Constructor & Destructor Documentation

◆ PickPointsInteractor()

cloudViewer::visualization::gui::PickPointsInteractor::PickPointsInteractor ( rendering::CloudViewerScene scene,
rendering::Camera camera 
)

◆ ~PickPointsInteractor()

cloudViewer::visualization::gui::PickPointsInteractor::~PickPointsInteractor ( )
virtual

Definition at line 139 of file PickPointsInteractor.cpp.

Member Function Documentation

◆ ClearPick()

void cloudViewer::visualization::gui::PickPointsInteractor::ClearPick ( )

Definition at line 328 of file PickPointsInteractor.cpp.

References SetNeedsRedraw().

Referenced by Key().

◆ DoPick()

◆ GetMatrixInteractor()

rendering::MatrixInteractorLogic & cloudViewer::visualization::gui::PickPointsInteractor::GetMatrixInteractor ( )
overridevirtual

◆ Key()

◆ MakeMaterial()

◆ Mouse()

◆ OnPickImageDone()

void cloudViewer::visualization::gui::PickPointsInteractor::OnPickImageDone ( std::shared_ptr< geometry::Image img)
protected

◆ SetNeedsRedraw()

void cloudViewer::visualization::gui::PickPointsInteractor::SetNeedsRedraw ( )

Indicates that the selection scene must be redrawn and the picking pixels retrieved again before picking.

Definition at line 238 of file PickPointsInteractor.cpp.

Referenced by ClearPick(), DoPick(), and SetPickableGeometry().

◆ SetOnPointsPicked()

void cloudViewer::visualization::gui::PickPointsInteractor::SetOnPointsPicked ( std::function< void(const std::map< std::string, std::vector< std::pair< size_t, Eigen::Vector3d >>> &, int)>  f)

Calls the provided function when points are picked: f(indices, key_modifiers)

Definition at line 244 of file PickPointsInteractor.cpp.

◆ SetOnStartedPolygonPicking()

void cloudViewer::visualization::gui::PickPointsInteractor::SetOnStartedPolygonPicking ( std::function< void()>  on_poly_pick)

Calls the provided function when polygon picking is initiated.

Definition at line 258 of file PickPointsInteractor.cpp.

◆ SetOnUIChanged()

void cloudViewer::visualization::gui::PickPointsInteractor::SetOnUIChanged ( std::function< void(const std::vector< Eigen::Vector2i > &)>  on_ui)

Calls the provided function when a "UI" needs to be drawn. This is used for polygon picking to draw the polygon in progress. will be passed

Definition at line 253 of file PickPointsInteractor.cpp.

◆ SetPickableGeometry()

void cloudViewer::visualization::gui::PickPointsInteractor::SetPickableGeometry ( const std::vector< SceneWidget::PickableGeometry > &  geometry)

◆ SetPointSize()

void cloudViewer::visualization::gui::PickPointsInteractor::SetPointSize ( int  px)

Definition at line 141 of file PickPointsInteractor.cpp.

References MakeMaterial().


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