![]() |
RobWorkProject
23.9.11-
|
Class representing an OpenGL based QT Widget for 3D visualization of Drawables. More...
#include <GLViewRW.hpp>
Inherits QOpenGLWidget.
Public Member Functions | |
GLViewRW (QWidget *parent=0) | |
Constructs an OpenGL based QT Widget. More... | |
~GLViewRW () | |
destructor | |
void | setupToolBar (QToolBar *toolbar) |
sets up the toolbar | |
void | setupMenu (QMenu *menu) |
sets up menu | |
void | addDrawable (rwlibs::opengl::Drawable *drawable) |
Adds a Drawable to the view component. More... | |
void | clear () |
Clears the list of Drawables. | |
void | saveBufferToFile (const QString &filename) |
Saves the current 3D view to disk as either jpg, bmp or png. More... | |
void | showPivotPoint (bool visible) |
Specified whether to visualize the pivot point. More... | |
void | setDrawType (rw::graphics::Render::DrawType drawType) |
Sets whether to visualize as SOLID, WIRE or BOTH. More... | |
void | keyPressEvent (QKeyEvent *e) |
Class representing an OpenGL based QT Widget for 3D visualization of Drawables.
GLViewRW | ( | QWidget * | parent = 0 | ) |
Constructs an OpenGL based QT Widget.
parent | [in] Parent widget |
void addDrawable | ( | rwlibs::opengl::Drawable * | drawable | ) |
Adds a Drawable to the view component.
The GLViewRW does not take control of the drawable, therefore it is the callers reponsibility to destroy the Drawable when not being used anymore.
Likewise it is the callers reponsibility not to delete the Drawable before being removed from the GLViewRW Widget.
drawable | [in] Pointer to drawable to be visualized |
void saveBufferToFile | ( | const QString & | filename | ) |
Saves the current 3D view to disk as either jpg, bmp or png.
If failing a std::string is thrown with a detailed description of what when wrong.
filename | [in] Path and name of the file. The filename extension should be either ".jpg", ".bmp" or ".png" to specify which format to use. |
void setDrawType | ( | rw::graphics::Render::DrawType | drawType | ) |
Sets whether to visualize as SOLID, WIRE or BOTH.
drawType | [in] The drawtype to use |
void showPivotPoint | ( | bool | visible | ) |
Specified whether to visualize the pivot point.
visible | [in] True for showing pivot point, false otherwise. |