OpenGL based display of the 3d model. More...
#include <glviewer.h>
Public Slots | |
void | addPointCloud (pointcloud_type *pc, QMatrix4x4 transform) |
void | deleteLastNode () |
void | drawToPS (QString filname) |
void | reset () |
void | setEdges (QList< QPair< int, int > > *edge_list) |
void | setRotationGrid (double rot_step_in_degree) |
void | setStereoShift (double shift) |
void | setXRotation (int angle) |
void | setYRotation (int angle) |
void | setZRotation (int angle) |
void | toggleBackgroundColor (bool on) |
void | toggleFollowMode (bool on) |
void | toggleShowClouds (bool on) |
void | toggleShowEdges (bool on) |
void | toggleShowIDs (bool on) |
void | toggleShowPoses (bool on) |
void | toggleStereo (bool on) |
void | toggleTriangulation () |
void | updateTransforms (QList< QMatrix4x4 > *transforms) |
Signals | |
void | cloudRendered (pointcloud_type const *) |
Public Member Functions | |
GLViewer (QWidget *parent=0) | |
QSize | minimumSizeHint () const |
QSize | sizeHint () const |
~GLViewer () | |
Protected Member Functions | |
void | drawAxis (float scale) |
Draw colored axis, scale long. | |
void | drawClouds (float xshift) |
Draw the scene. Xshift allows for a camera shift in x direction for the stereo view. | |
void | drawEdges () |
Draw pose graph edges in opengl. | |
void | drawTriangle (const point_type &p1, const point_type &p2, const point_type &p3) |
void | initializeGL () |
void | mouseDoubleClickEvent (QMouseEvent *event) |
void | mouseMoveEvent (QMouseEvent *event) |
void | mousePressEvent (QMouseEvent *event) |
void | paintGL () |
void | pointCloud2GLList (pointcloud_type const *pc) |
Compile the pointcloud to a GL Display List. | |
void | pointCloud2GLStrip (pointcloud_type *pc) |
QImage | renderList (QMatrix4x4 transform, int list_id) |
void | resizeGL (int width, int height) |
void | wheelEvent (QWheelEvent *event) |
Private Member Functions | |
bool | setClickedPosition (int x, int y) |
void | setViewPoint (QMatrix4x4 cam_pose_mat) |
Private Attributes | |
float | bg_col_ [4] |
QList< GLuint > | cloud_list_indices |
QList< QMatrix4x4 > * | cloud_matrices |
QList< QPair< int, int > > * | edge_list_ |
bool | follow_mode_ |
double | fov_ |
int | height_ |
QPoint | lastPos |
GLenum | polygon_mode |
double | rotation_stepping_ |
bool | show_clouds_ |
bool | show_edges_ |
bool | show_ids_ |
bool | show_poses_ |
bool | stereo_ |
double | stereo_shift_ |
QMatrix4x4 | viewpoint_tf_ |
int | width_ |
int | xRot |
float | xTra |
int | yRot |
float | yTra |
int | zRot |
float | zTra |
OpenGL based display of the 3d model.
Definition at line 27 of file glviewer.h.
GLViewer::GLViewer | ( | QWidget * | parent = 0 | ) |
Definition at line 42 of file glviewer.cpp.
Definition at line 72 of file glviewer.cpp.
void GLViewer::addPointCloud | ( | pointcloud_type * | pc, |
QMatrix4x4 | transform | ||
) | [slot] |
Definition at line 352 of file glviewer.cpp.
void GLViewer::cloudRendered | ( | pointcloud_type const * | ) | [signal] |
void GLViewer::deleteLastNode | ( | ) | [slot] |
Definition at line 504 of file glviewer.cpp.
void GLViewer::drawAxis | ( | float | scale | ) | [protected] |
Draw colored axis, scale long.
Definition at line 165 of file glviewer.cpp.
void GLViewer::drawClouds | ( | float | xshift | ) | [protected] |
Draw the scene. Xshift allows for a camera shift in x direction for the stereo view.
Definition at line 205 of file glviewer.cpp.
void GLViewer::drawEdges | ( | ) | [protected] |
Draw pose graph edges in opengl.
Definition at line 587 of file glviewer.cpp.
void GLViewer::drawToPS | ( | QString | filname | ) | [slot] |
Definition at line 662 of file glviewer.cpp.
void GLViewer::drawTriangle | ( | const point_type & | p1, |
const point_type & | p2, | ||
const point_type & | p3 | ||
) | [inline, protected] |
Draw a triangle in opengl Assumes gl mode for triangles
Definition at line 141 of file glviewer.cpp.
void GLViewer::initializeGL | ( | ) | [protected] |
Definition at line 123 of file glviewer.cpp.
QSize GLViewer::minimumSizeHint | ( | ) | const |
Definition at line 74 of file glviewer.cpp.
void GLViewer::mouseDoubleClickEvent | ( | QMouseEvent * | event | ) | [protected] |
Resets to certain perspectives Double clicks onto an object part will make that part the pivot of The camera movement. Depending on the button the position of the camera will be the most recent frame (left button) or the first frame (right button). If the background is clicked, the pivot will be the camera position itself
Definition at line 261 of file glviewer.cpp.
void GLViewer::mouseMoveEvent | ( | QMouseEvent * | event | ) | [protected] |
Definition at line 325 of file glviewer.cpp.
void GLViewer::mousePressEvent | ( | QMouseEvent * | event | ) | [protected] |
Definition at line 317 of file glviewer.cpp.
void GLViewer::paintGL | ( | ) | [protected] |
Definition at line 183 of file glviewer.cpp.
void GLViewer::pointCloud2GLList | ( | pointcloud_type const * | pc | ) | [protected] |
Compile the pointcloud to a GL Display List.
Definition at line 514 of file glviewer.cpp.
void GLViewer::pointCloud2GLStrip | ( | pointcloud_type * | pc | ) | [protected] |
Definition at line 359 of file glviewer.cpp.
QImage GLViewer::renderList | ( | QMatrix4x4 | transform, |
int | list_id | ||
) | [protected] |
Definition at line 578 of file glviewer.cpp.
void GLViewer::reset | ( | ) | [slot] |
Definition at line 568 of file glviewer.cpp.
void GLViewer::resizeGL | ( | int | width, |
int | height | ||
) | [protected] |
Definition at line 240 of file glviewer.cpp.
bool GLViewer::setClickedPosition | ( | int | x, |
int | y | ||
) | [private] |
Definition at line 623 of file glviewer.cpp.
void GLViewer::setEdges | ( | QList< QPair< int, int > > * | edge_list | ) | [slot] |
Definition at line 582 of file glviewer.cpp.
void GLViewer::setRotationGrid | ( | double | rot_step_in_degree | ) | [slot] |
Definition at line 106 of file glviewer.cpp.
void GLViewer::setStereoShift | ( | double | shift | ) | [slot] |
Definition at line 110 of file glviewer.cpp.
void GLViewer::setViewPoint | ( | QMatrix4x4 | cam_pose_mat | ) | [private] |
cam_pose_mat transforms the viewpoint from the origin cam_pose_mat is inverted, i.e. it should describes the transformation of the camera itself
Moving the camera is inverse to moving the points to draw
Definition at line 618 of file glviewer.cpp.
void GLViewer::setXRotation | ( | int | angle | ) | [slot] |
Definition at line 89 of file glviewer.cpp.
void GLViewer::setYRotation | ( | int | angle | ) | [slot] |
Definition at line 98 of file glviewer.cpp.
void GLViewer::setZRotation | ( | int | angle | ) | [slot] |
Definition at line 115 of file glviewer.cpp.
QSize GLViewer::sizeHint | ( | ) | const |
Definition at line 78 of file glviewer.cpp.
void GLViewer::toggleBackgroundColor | ( | bool | on | ) | [slot] |
Definition at line 288 of file glviewer.cpp.
void GLViewer::toggleFollowMode | ( | bool | on | ) | [slot] |
Definition at line 314 of file glviewer.cpp.
void GLViewer::toggleShowClouds | ( | bool | on | ) | [slot] |
Definition at line 298 of file glviewer.cpp.
void GLViewer::toggleShowEdges | ( | bool | on | ) | [slot] |
Definition at line 306 of file glviewer.cpp.
void GLViewer::toggleShowIDs | ( | bool | on | ) | [slot] |
Definition at line 302 of file glviewer.cpp.
void GLViewer::toggleShowPoses | ( | bool | on | ) | [slot] |
Definition at line 310 of file glviewer.cpp.
void GLViewer::toggleStereo | ( | bool | on | ) | [slot] |
Definition at line 283 of file glviewer.cpp.
void GLViewer::toggleTriangulation | ( | ) | [slot] |
Definition at line 649 of file glviewer.cpp.
void GLViewer::updateTransforms | ( | QList< QMatrix4x4 > * | transforms | ) | [slot] |
Definition at line 343 of file glviewer.cpp.
void GLViewer::wheelEvent | ( | QWheelEvent * | event | ) | [protected] |
Definition at line 321 of file glviewer.cpp.
float GLViewer::bg_col_[4] [private] |
Definition at line 96 of file glviewer.h.
QList<GLuint> GLViewer::cloud_list_indices [private] |
Definition at line 99 of file glviewer.h.
QList<QMatrix4x4>* GLViewer::cloud_matrices [private] |
Definition at line 101 of file glviewer.h.
QList<QPair<int, int> >* GLViewer::edge_list_ [private] |
Definition at line 100 of file glviewer.h.
bool GLViewer::follow_mode_ [private] |
Definition at line 112 of file glviewer.h.
double GLViewer::fov_ [private] |
Definition at line 115 of file glviewer.h.
int GLViewer::height_ [private] |
Definition at line 114 of file glviewer.h.
QPoint GLViewer::lastPos [private] |
Definition at line 97 of file glviewer.h.
GLenum GLViewer::polygon_mode [private] |
Definition at line 98 of file glviewer.h.
double GLViewer::rotation_stepping_ [private] |
Definition at line 116 of file glviewer.h.
bool GLViewer::show_clouds_ [private] |
Definition at line 111 of file glviewer.h.
bool GLViewer::show_edges_ [private] |
Definition at line 110 of file glviewer.h.
bool GLViewer::show_ids_ [private] |
Definition at line 109 of file glviewer.h.
bool GLViewer::show_poses_ [private] |
Definition at line 108 of file glviewer.h.
bool GLViewer::stereo_ [private] |
Definition at line 113 of file glviewer.h.
double GLViewer::stereo_shift_ [private] |
Definition at line 115 of file glviewer.h.
QMatrix4x4 GLViewer::viewpoint_tf_ [private] |
Definition at line 102 of file glviewer.h.
int GLViewer::width_ [private] |
Definition at line 114 of file glviewer.h.
int GLViewer::xRot [private] |
Definition at line 94 of file glviewer.h.
float GLViewer::xTra [private] |
Definition at line 95 of file glviewer.h.
int GLViewer::yRot [private] |
Definition at line 94 of file glviewer.h.
float GLViewer::yTra [private] |
Definition at line 95 of file glviewer.h.
int GLViewer::zRot [private] |
Definition at line 94 of file glviewer.h.
float GLViewer::zTra [private] |
Definition at line 95 of file glviewer.h.