27#ifndef EASY3D_GUI_PICKER_H
28#define EASY3D_GUI_PICKER_H
30#include <easy3d/core/types.h>
31#include <easy3d/renderer/camera.h>
36 class FramebufferObject;
117 void screen_to_opengl(
int x,
int y,
int &gl_x,
int &gl_y,
int width,
int height)
const;
122 void setup_framebuffer(
int width,
int height);
127 bool use_gpu_if_supported_;
A perspective or orthographic camera.
Definition: camera.h:116
vec3 projectedCoordinatesOf(const vec3 &src, const Frame *frame=nullptr) const
Definition: camera.cpp:1255
vec3 unprojectedCoordinatesOf(const vec3 &src, const Frame *frame=nullptr) const
Definition: camera.cpp:1305
An implementation of framebuffer object (FBO).
Definition: framebuffer_object.h:122
A generic line representation, which supports both 2D and 3D lines.
Definition: line.h:40
static GenericLine from_two_points(const Point &p, const Point &q)
Constructs a line from two points p and q.
Definition: line.h:50
const Vector & direction() const
Returns the direction of a line.
Definition: line.h:62
Base class for picking mechanism.
Definition: picker.h:43
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) i...
Definition: picker.cpp:71
const Camera * camera() const
Returns the pointer of the camera.
Definition: picker.h:50
Line3 picking_line(int x, int y) const
Construct a picking line.
Definition: picker.h:60
vec3 project(const vec3 &p) const
Project a 3D point in the world coordinate system onto the 2D screen coordinate system.
Definition: picker.h:88
vec3 picking_dir(int x, int y) const
The picking direction, pointing inside the screen.
Definition: picker.h:74
vec3 unproject(int x, int y, float depth) const
Compute the world coordinates of a point defined in the screen coordinate system.
Definition: picker.h:102
Definition: collider.cpp:182
Vec< 3, float > vec3
A 3D point/vector of float type.
Definition: types.h:45