snark
|
base class for 3d viewers with mouse navigation More...
#include <view.h>
Inherits QGLView.
Inherited by Viewer, and Viewer.
Public Member Functions | |
view (const QColor4ub &background_color, double fov, bool z_up, bool orthographic=false) |
Protected Member Functions | |
void | draw_coordinates (QGLPainter *painter) |
draw a coordinate system centered on the scene rotation center | |
boost::optional< QVector3D > | getPoint (const QPoint &point2d) |
get 3d world point from clicked position | |
void | lookAtCenter () |
setup the camera to look at the scene center | |
void | mouseDoubleClickEvent (QMouseEvent *e) |
handle mouse double click: set rotation point | |
void | mouseMoveEvent (QMouseEvent *e) |
handle mouse move: pan or rotate the view ( using sphere rotation ) | |
void | mousePressEvent (QMouseEvent *e) |
handle mouse press | |
void | mouseReleaseEvent (QMouseEvent *e) |
handle mouse release | |
QVector3D | unproject (float x, float y, float depth) |
return 3d point in world coordinate from pixel coordinates and depth | |
void | updateView (const QVector3D &min, const QVector3D &max) |
update the scene radius and center to display the region between | |
void | updateZFar () |
update the position of the far plane so that the full scene is displayed | |
void | wheelEvent (QWheelEvent *e) |
handle mouse wheel: zoom in the scene |
base class for 3d viewers with mouse navigation
view | ( | const QColor4ub & | background_color, |
double | fov, | ||
bool | z_up, | ||
bool | orthographic = false |
||
) |
constructor
background_color | background color |
fov | camera field of view in degrees |
z_up | if true, the z-axis is pointing up, if false it is pointing down |
orthographic | use orthographic projection instead of perspective |
|
protected |
update the scene radius and center to display the region between
min | and |
max |
References view::updateZFar().