#include <glwidget.h>
Public Slots | |
| PLUGINGLWIDGET_EXPORT void | addObject () |
| PLUGINGLWIDGET_EXPORT void | addObjectFromFile (const QString &filename) |
| PLUGINGLWIDGET_EXPORT void | clearScene () |
| PLUGINGLWIDGET_EXPORT void | resetCamera () |
| PLUGINGLWIDGET_EXPORT void | drawAxes () |
| PLUGINGLWIDGET_EXPORT void | drawPoint (const Vector &pos, float r, float g, float b) |
| PLUGINGLWIDGET_EXPORT Box | boundingBoxIncludingAxes () |
| PLUGINGLWIDGET_EXPORT void | loadPlugin () |
| PLUGINGLWIDGET_EXPORT void | loadPlugins (const QStringList &list) |
| PLUGINGLWIDGET_EXPORT void | loadDefaultPlugins () |
Public Member Functions | |
| PLUGINGLWIDGET_EXPORT | GLWidget (const QGLFormat &format, const string &args) |
| PLUGINGLWIDGET_EXPORT Scene * | scene () |
| PLUGINGLWIDGET_EXPORT Camera * | camera () |
| PLUGINGLWIDGET_EXPORT QGLShaderProgram * | defaultProgram () |
| PLUGINGLWIDGET_EXPORT void | setPluginPath (const QString &) |
| GLWidget::GLWidget | ( | const QGLFormat & | format, |
| const string & | args | ||
| ) |
Creates a GLWidget.
| void GLWidget::addObject | ( | ) | [slot] |
Opens a file dialog enabling the user to select one or more OBJ files to add to the scene. All loaded plugins get their onObjectAdd() method invoked for each loaded object.
| void GLWidget::addObjectFromFile | ( | const QString & | filename | ) | [slot] |
Adds an OBJ file to the scene. All loaded plugins get their onObjectAdd() method invoked.
| Box GLWidget::boundingBoxIncludingAxes | ( | ) | [slot] |
Returns the bounding box of the scene, enlarged to include also a representation of the world axes.
| Camera * GLWidget::camera | ( | ) |
Returns a pointer to the camera.
| void GLWidget::clearScene | ( | ) | [slot] |
Clears the scene (removes all OBJs) All loaded plugins get their onSceneClear() method invoked.
| QGLShaderProgram * GLWidget::defaultProgram | ( | ) |
Returns a basic, default shader program
| void GLWidget::drawAxes | ( | ) | [slot] |
Draws three lines representing world space axes.
| void GLWidget::drawPoint | ( | const Vector & | pos, |
| float | r, | ||
| float | g, | ||
| float | b | ||
| ) | [slot] |
Draws a point at the given 3D position with the given color.
| void GLWidget::loadDefaultPlugins | ( | ) | [slot] |
Loads default plugins.
| void GLWidget::loadPlugin | ( | ) | [slot] |
Opens a file dialog enabling the user to select one or more plugins to load. After loading each plugin, its onPluginLoad() method is invoked.
| void GLWidget::loadPlugins | ( | const QStringList & | list | ) | [slot] |
Loads one plugins and calls its onPluginLoad() method.
| void GLWidget::resetCamera | ( | ) | [slot] |
Resets the camera so that the whole scene (including world axes) is visible.
| Scene * GLWidget::scene | ( | ) |
Returns a pointer to the 3D scene.
| void GLWidget::setPluginPath | ( | const QString & | p | ) |
Sets the path where plugins will be searched into.