29 #include <unordered_map> 39 namespace visualization {
40 class SelectionPolygon;
41 class PointCloudPicker;
45 enum class SelectionMode { None = 0, Point = 1, Rectangle = 2, Moving = 3 };
56 bool AddGeometry(std::shared_ptr<const geometry::Geometry> geometry_ptr,
57 bool reset_bounding_box =
true)
override;
58 bool UpdateGeometry(std::shared_ptr<const geometry::Geometry> geometry_ptr =
60 void PrintVisualizerHelp()
override;
61 void UpdateWindowTitle()
override;
62 void BuildUtilities()
override;
63 void SetPointSize(
double size);
64 std::vector<int> PickPoints(
double x,
double y,
double w,
double h);
70 std::vector<PickedPoint> GetPickedPoints()
const;
71 void ClearPickedPoints();
73 void RegisterSelectionChangedCallback(std::function<
void()> f);
76 void RegisterSelectionMovingCallback(std::function<
void()> f);
77 void RegisterSelectionMovedCallback(std::function<
void()> f);
80 bool InitViewControl()
override;
81 bool InitRenderOption()
override;
82 void WindowResizeCallback(GLFWwindow *window,
int w,
int h)
override;
83 void MouseMoveCallback(GLFWwindow *window,
double x,
double y)
override;
84 void MouseScrollCallback(GLFWwindow *window,
double x,
double y)
override;
85 void MouseButtonCallback(GLFWwindow *window,
89 void KeyPressCallback(GLFWwindow *window,
94 void InvalidateSelectionPolygon();
95 void InvalidatePicking();
96 void AddPickedPoints(
const std::vector<int> indices);
97 void RemovePickedPoints(
const std::vector<int> indices);
98 float GetDepth(
int winX,
int winY);
99 Eigen::Vector3d CalcDragDelta(
double winX,
double winY);
101 void DragSelectedPoints(
const Eigen::Vector3d &delta,
DragType type);
102 const std::vector<Eigen::Vector3d> *GetGeometryPoints(
103 std::shared_ptr<const geometry::Geometry> geometry);
107 std::shared_ptr<glsl::SelectionPolygonRenderer>
115 std::shared_ptr<glsl::PointCloudPickerRenderer>
NoneType None
Definition: TensorKey.cpp:37
Eigen::Vector3d coord
Definition: VisualizerWithVertexSelection.h:68
float drag_depth_
Definition: VisualizerWithVertexSelection.h:112
std::shared_ptr< glsl::GeometryRenderer > ui_selected_points_renderer_ptr_
Definition: VisualizerWithVertexSelection.h:129
std::function< void()> on_selection_moved_
Definition: VisualizerWithVertexSelection.h:133
std::function< void()> on_selection_changed_
Definition: VisualizerWithVertexSelection.h:131
std::unordered_map< int, Eigen::Vector3d > selected_points_before_drag_
Definition: VisualizerWithVertexSelection.h:127
std::shared_ptr< geometry::PointCloud > ui_points_geometry_ptr_
Definition: VisualizerWithVertexSelection.h:123
std::unordered_map< int, Eigen::Vector3d > selected_points_
Definition: VisualizerWithVertexSelection.h:126
VisualizerWithVertexSelection()
Definition: VisualizerWithVertexSelection.h:48
int size
Definition: FilePCD.cpp:59
Eigen::Vector2d mouse_down_pos_
Definition: VisualizerWithVertexSelection.h:110
RenderOption pick_point_opts_
Definition: VisualizerWithVertexSelection.h:121
~VisualizerWithVertexSelection() override
Definition: VisualizerWithVertexSelection.h:49
Defines rendering options for visualizer.
Definition: RenderOption.h:39
std::shared_ptr< SelectionPolygon > selection_polygon_ptr_
Definition: VisualizerWithVertexSelection.h:106
std::function< void()> on_selection_moving_
Definition: VisualizerWithVertexSelection.h:132
std::vector< int > points_in_rect_
Definition: VisualizerWithVertexSelection.h:111
std::shared_ptr< glsl::GeometryRenderer > ui_points_renderer_ptr_
Definition: VisualizerWithVertexSelection.h:124
char type
Definition: FilePCD.cpp:60
int index
Definition: VisualizerWithVertexSelection.h:67
std::shared_ptr< glsl::PointCloudPickerRenderer > pointcloud_picker_renderer_ptr_
Definition: VisualizerWithVertexSelection.h:116
Definition: PinholeCameraIntrinsic.cpp:35
The main Visualizer class.
Definition: Visualizer.h:62
DragType
Definition: VisualizerWithVertexSelection.h:100
SelectionMode
Definition: VisualizerWithVertexSelection.h:45
Definition: VisualizerWithVertexSelection.h:66
std::shared_ptr< glsl::GeometryRenderer > geometry_renderer_ptr_
Definition: VisualizerWithVertexSelection.h:119
Definition: VisualizerWithVertexSelection.h:43
std::shared_ptr< PointCloudPicker > pointcloud_picker_ptr_
Definition: VisualizerWithVertexSelection.h:114
std::shared_ptr< geometry::PointCloud > ui_selected_points_geometry_ptr_
Definition: VisualizerWithVertexSelection.h:128
std::shared_ptr< glsl::SelectionPolygonRenderer > selection_polygon_renderer_ptr_
Definition: VisualizerWithVertexSelection.h:108
std::shared_ptr< const geometry::Geometry > geometry_ptr_
Definition: VisualizerWithVertexSelection.h:118