Implementation of picking points from a point cloud.
More...
#include <easy3d/gui/picker_point_cloud.h>
|
| PointCloudPicker (const Camera *cam) |
| Constructor.
|
|
unsigned int | resolution () const |
| Returns the picker resolution (in pixels).
|
|
void | set_resolution (unsigned int r) |
| Sets the picker resolution (in pixels).
|
|
PointCloud::Vertex | pick_vertex (PointCloud *model, int x, int y) |
| Pick vertex at a given screen location.
|
|
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".
|
|
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".
|
|
| Picker (const Camera *cam) |
| Constructor.
|
|
virtual | ~Picker () |
| Destructor.
|
|
const Camera * | camera () const |
| Returns the pointer of the camera.
|
|
Line3 | picking_line (int x, int y) const |
| Construct a picking line.
|
|
vec3 | picking_dir (int x, int y) const |
| The picking direction, pointing inside the screen.
|
|
vec3 | project (const vec3 &p) const |
| Project a 3D point in the world coordinate system onto the 2D screen coordinate system.
|
|
vec3 | unproject (int x, int y, float depth) const |
| Compute the world coordinates of a point defined in the screen coordinate system.
|
|
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.
|
|
Implementation of picking points from a point cloud.
- See also
- Picker, ModelPicker, SurfaceMeshPicker
- Examples
- Tutorial_403_PointSelection/main.cpp.
◆ PointCloudPicker()
Constructor.
- Parameters
-
cam | The camera used for picking. |
◆ pick_vertex()
Pick vertex at a given screen location.
- Parameters
-
model | The point cloud model. |
x | The x coordinate of the screen point. |
y | The y coordinate of the screen point. |
- Returns
- The picked vertex.
◆ pick_vertices() [1/2]
Pick vertices of a point cloud by a polygon/lasso. The selected vertices will be marked in vertex property "v:select".
- Parameters
-
model | The point cloud model. |
plg | The polygon region. |
deselect | True 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
-
model | The point cloud model. |
rect | The rectangle region. |
deselect | True 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.
- Returns
- The picker resolution in pixels.
◆ 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.
- Parameters
-
r | The new picker resolution in pixels. |
The documentation for this class was generated from the following files: