Easy3D 2.5.3
PointCloudPicker Class Reference

Implementation of picking points from a point cloud. More...

#include <easy3d/gui/picker_point_cloud.h>

Inheritance diagram for PointCloudPicker:
Picker

Public Member Functions

 PointCloudPicker (const Camera *cam)
 
unsigned int resolution () const
 Returns the picker resolution (in pixels). More...
 
void set_resolution (unsigned int r)
 Sets the picker resolution (in pixels). More...
 
PointCloud::Vertex pick_vertex (PointCloud *model, int x, int y)
 Pick vertex at a given screen location. More...
 
void pick_vertices (PointCloud *model, const Rect &rect, bool deselect)
 Pick vertices of a point cloud by a rectangle. The selected vertices will be marked in vertex property "v:select". More...
 
void pick_vertices (PointCloud *model, const Polygon2 &plg, bool deselect)
 Pick vertices of a point cloud by a polygon/lasso. The selected vertices will be marked in vertex property "v:select". More...
 
- Public Member Functions inherited from Picker
 Picker (const Camera *cam)
 
const Cameracamera () const
 Returns the pointer of the camera.
 
Line3 picking_line (int x, int y) const
 Construct a picking line. More...
 
vec3 picking_dir (int x, int y) const
 The picking direction, pointing inside the screen. More...
 
vec3 project (const vec3 &p) const
 Project a 3D point in the world coordinate system onto the 2D screen coordinate system. More...
 
vec3 unproject (int x, int y, float depth) const
 Compute the world coordinates of a point defined in the screen coordinate system. More...
 
void screen_to_opengl (int x, int y, int &gl_x, int &gl_y, int width, int height) const
 Convert a point expressed in the screen coordinate system (with an origin in the upper left corner) into the OpenGL coordinate system (with an origin in the lower left corner). The high DPI scaling is also taken into consideration, so the result always corresponds to its image pixel. More...
 

Detailed Description

Implementation of picking points from a point cloud.

See also
Picker, ModelPicker, SurfaceMeshPicker
Examples
Tutorial_403_PointSelection.

Member Function Documentation

◆ pick_vertex()

PointCloud::Vertex pick_vertex ( PointCloud model,
int  x,
int  y 
)

Pick vertex at a given screen location.

Parameters
(x,y)The screen point.
deselectTrue to perform an inverse operation.
Returns
The picked vertex.

◆ pick_vertices() [1/2]

void pick_vertices ( PointCloud model,
const Polygon2 plg,
bool  deselect 
)

Pick vertices of a point cloud by a polygon/lasso. The selected vertices will be marked in vertex property "v:select".

Parameters
plgThe polygon region.
deselectTrue to perform an inverse operation.

◆ pick_vertices() [2/2]

void pick_vertices ( PointCloud model,
const Rect rect,
bool  deselect 
)

Pick vertices of a point cloud by a rectangle. The selected vertices will be marked in vertex property "v:select".

Parameters
rectThe rectangle region.
deselectTrue to perform an inverse operation.

◆ resolution()

unsigned int resolution ( ) const
inline

Returns the picker resolution (in pixels).

The picker resolution indicates the sensitivity of picking a point. It is used only for the CPU implementation of picking a single point.

◆ set_resolution()

void set_resolution ( unsigned int  r)
inline

Sets the picker resolution (in pixels).

The picker resolution indicates the sensitivity of picking a point. It is used only for the CPU implementation of picking a single point.


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