Class ViewerWidget

Inheritance Relationships

Base Type

  • public QGLViewer

Class Documentation

class ViewerWidget : public QGLViewer

Public Functions

ViewerWidget(QWidget *parent = NULL)
void clearAll()
void addSceneObject(SceneObject *obj)

Adds an object to the scene that can be drawn


objSceneObject to be added

void removeSceneObject(SceneObject *obj)

Removes a SceneObject from the list of drawable objects if it has been added previously. Does nothing otherwise.


objSceneObject to be removed

Public Slots

void enablePrintoutMode(bool enabled = true)
void enableHeightColorMode(bool enabled = true)
void enableSemanticColoring(bool enabled = true)
void enableSelectionBox(bool enabled = true)
void setCamPosition(double x, double y, double z, double lookX, double lookY, double lookZ)
void setCamPose(const octomath::Pose6D &pose)
virtual void setSceneBoundingBox(const qglviewer::Vec &min, const qglviewer::Vec &max)
void deleteCameraPath(int id)
void appendToCameraPath(int id, const octomath::Pose6D &pose)
void appendCurrentToCameraPath(int id)
void addCurrentToCameraPath(int id, int frame)
void removeFromCameraPath(int id, int frame)
void updateCameraPath(int id, int frame)
void jumpToCamFrame(int id, int frame)
void playCameraPath(int id, int start_frame)
void stopCameraPath(int id)
inline const SelectionBox &selectionBox() const
void resetView()

Resets the 3D viewpoint to the initial value


void cameraPathStopped(int id)
void cameraPathFrameChanged(int id, int current_camera_frame)
void select(const QMouseEvent *e)

Protected Functions

virtual void draw()
virtual void drawWithNames()
virtual void init()
virtual void postDraw()

Overloaded from QGLViewer. Draws own axis and grid in scale, then calls QGLViewer::postDraw().

virtual void postSelection(const QPoint&)
virtual QString helpString() const
qglviewer::Quaternion poseToQGLQuaternion(const octomath::Pose6D &pose)

Protected Attributes

std::vector<SceneObject*> m_sceneObjects
SelectionBox m_selectionBox
bool m_printoutMode
bool m_heightColorMode
bool m_semantic_coloring
bool m_drawAxis
bool m_drawGrid
bool m_drawSelectionBox
double m_zMin
double m_zMax
int m_current_camera_path
int m_current_camera_frame