|
virtual void | drawColourPicking (common::ColourPickingVisitor::ColourCode code) override |
|
| QtGLViewer (QWidget *parent, const char *name="") |
|
| ~QtGLViewer () override |
|
QWidget * | getQWidget () override |
|
int | getWidth () override |
|
int | getHeight () override |
|
bool | ready () override |
|
void | wait () override |
| ask the viewer to resume its activity More...
|
|
void | UpdateOBJ (void) |
|
void | moveRayPickInteractor (int eventX, int eventY) override |
| RayCasting PickHandler. More...
|
|
void | setCameraMode (core::visual::VisualParams::CameraType mode) override |
|
void | screenshot (const std::string &filename, int compression_level=-1) override |
|
QString | helpString () const override |
| Returns the QString displayed in the help() window main tab. More...
|
|
| QGLViewer (QWidget *parent=0, Qt::WindowFlags flags=Qt::WindowFlags()) |
| Constructor. More...
|
|
virtual | ~QGLViewer () |
| Virtual destructor. More...
|
|
unsigned int | shortcut (KeyboardAction action) const |
| Returns the keyboard shortcut associated to a given QGLViewer::KeyboardAction. More...
|
|
unsigned int | keyboardAccelerator (KeyboardAction action) const |
|
Qt::Key | keyFrameKey (unsigned int index) const |
|
Qt::KeyboardModifiers | playKeyFramePathStateKey () const |
|
Qt::KeyboardModifiers | addKeyFrameStateKey () const |
|
Qt::KeyboardModifiers | playPathStateKey () const |
|
Qt::Key | pathKey (unsigned int index) const |
| Returns the keyboard key associated to camera Key Frame path index . More...
|
|
Qt::KeyboardModifiers | addKeyFrameKeyboardModifiers () const |
| Returns the keyboard modifiers that must be pressed with a pathKey() to add the current camera position to a KeyFrame path. More...
|
|
Qt::KeyboardModifiers | playPathKeyboardModifiers () const |
| Returns the keyboard modifiers that must be pressed with a pathKey() to play a camera KeyFrame path. More...
|
|
MouseAction | mouseAction (unsigned int state) const |
| This method is deprecated since version 2.5.0. More...
|
|
int | mouseHandler (unsigned int state) const |
| This method is deprecated since version 2.5.0. More...
|
|
int | mouseButtonState (MouseHandler handler, MouseAction action, bool withConstraint=true) const |
| This method is deprecated since version 2.5.0. More...
|
|
ClickAction | clickAction (unsigned int state, bool doubleClick, Qt::MouseButtons buttonsBefore) const |
| This method is deprecated since version 2.5.0. More...
|
|
void | getClickButtonState (ClickAction action, unsigned int &state, bool &doubleClick, Qt::MouseButtons &buttonsBefore) const |
| This method is deprecated since version 2.5.0. More...
|
|
unsigned int | wheelButtonState (MouseHandler handler, MouseAction action, bool withConstraint=true) const |
| This method is deprecated since version 2.5.0. More...
|
|
MouseAction | mouseAction (Qt::Key key, Qt::KeyboardModifiers modifiers, Qt::MouseButton button) const |
| Returns the MouseAction the will be triggered when the mouse button is pressed, while the keyboard modifiers and key are pressed. More...
|
|
int | mouseHandler (Qt::Key key, Qt::KeyboardModifiers modifiers, Qt::MouseButton button) const |
| Returns the MouseHandler which will be activated when the mouse button is pressed, while the modifiers and key are pressed. More...
|
|
void | getMouseActionBinding (MouseHandler handler, MouseAction action, bool withConstraint, Qt::Key &key, Qt::KeyboardModifiers &modifiers, Qt::MouseButton &button) const |
| Returns the mouse and keyboard state that triggers action on handler withConstraint . More...
|
|
ClickAction | clickAction (Qt::Key key, Qt::KeyboardModifiers modifiers, Qt::MouseButton button, bool doubleClick=false, Qt::MouseButtons buttonsBefore=Qt::NoButton) const |
| Same as mouseAction(), but for the ClickAction set using setMouseBinding(). More...
|
|
void | getClickActionBinding (ClickAction action, Qt::Key &key, Qt::KeyboardModifiers &modifiers, Qt::MouseButton &button, bool &doubleClick, Qt::MouseButtons &buttonsBefore) const |
| Returns the mouse and keyboard state that triggers action . More...
|
|
MouseAction | wheelAction (Qt::Key key, Qt::KeyboardModifiers modifiers) const |
| Returns the MouseAction (if any) that is performed when using the wheel, when the modifiers and key keyboard keys are pressed. More...
|
|
int | wheelHandler (Qt::Key key, Qt::KeyboardModifiers modifiers) const |
| Returns the MouseHandler (if any) that receives wheel events when the modifiers and key keyboard keys are pressed. More...
|
|
void | getWheelActionBinding (MouseHandler handler, MouseAction action, bool withConstraint, Qt::Key &key, Qt::KeyboardModifiers &modifiers) const |
| Returns the keyboard state that triggers action on handler withConstraint using the mouse wheel. More...
|
|
virtual void | setVisualHintsMask (int mask, int delay=2000) |
| Defines the mask that will be used to drawVisualHints(). More...
|
|
virtual void | drawVisualHints () |
| Draws viewer related visual hints. More...
|
|
bool | axisIsDrawn () const |
| Returns true if the world axis is drawn by the viewer. More...
|
|
bool | gridIsDrawn () const |
| Returns true if a XY grid is drawn by the viewer. More...
|
|
bool | FPSIsDisplayed () const |
| Returns true if the viewer displays the current frame rate (Frames Per Second). More...
|
|
bool | textIsEnabled () const |
| Returns true if text display (see drawText()) is enabled. More...
|
|
bool | cameraIsEdited () const |
| Returns true if the camera() is being edited in the viewer. More...
|
|
QColor | backgroundColor () const |
| Returns the background color of the viewer. More...
|
|
QColor | foregroundColor () const |
| Returns the foreground color used by the viewer. More...
|
|
qreal | sceneRadius () const |
| Returns the scene radius. More...
|
|
qglviewer::Vec | sceneCenter () const |
| Returns the scene center, defined in world coordinates. More...
|
|
qglviewer::Camera * | camera () const |
| Returns the associated qglviewer::Camera, never nullptr . More...
|
|
qglviewer::ManipulatedFrame * | manipulatedFrame () const |
| Returns the viewer's qglviewer::ManipulatedFrame. More...
|
|
qglviewer::MouseGrabber * | mouseGrabber () const |
| Returns the current qglviewer::MouseGrabber, or nullptr if no qglviewer::MouseGrabber currently grabs mouse events. More...
|
|
void | setMouseGrabberIsEnabled (const qglviewer::MouseGrabber *const mouseGrabber, bool enabled=true) |
| Sets the mouseGrabberIsEnabled() state. More...
|
|
bool | mouseGrabberIsEnabled (const qglviewer::MouseGrabber *const mouseGrabber) |
| Returns true if mouseGrabber is enabled. More...
|
|
qreal | aspectRatio () const |
| Returns the aspect ratio of the viewer's widget (width() / height()). More...
|
|
qreal | currentFPS () |
| Returns the current averaged viewer frame rate. More...
|
|
bool | isFullScreen () const |
| Returns true if the viewer is in fullScreen mode. More...
|
|
bool | displaysInStereo () const |
| Returns true if the viewer displays in stereo. More...
|
|
virtual QSize | sizeHint () const |
| Returns the recommended size for the QGLViewer. More...
|
|
virtual void | startScreenCoordinatesSystem (bool upward=false) const |
| Modify the projection matrix so that drawing can be done directly with 2D screen coordinates. More...
|
|
virtual void | stopScreenCoordinatesSystem () const |
| Stops the pixel coordinate drawing block started by startScreenCoordinatesSystem(). More...
|
|
void | drawText (int x, int y, const QString &text, const QFont &fnt=QFont()) |
| Draws text at position x , y (expressed in screen coordinates pixels, origin in the upper left corner of the widget). More...
|
|
void | displayMessage (const QString &message, int delay=2000) |
| Briefly displays a message in the lower left corner of the widget. More...
|
|
const QString & | snapshotFileName () const |
| Returns the snapshot file name used by saveSnapshot(). More...
|
|
const QString & | snapshotFilename () const |
|
const QString & | snapshotFormat () const |
| Returns the snapshot file format used by saveSnapshot(). More...
|
|
int | snapshotCounter () const |
| Returns the value of the counter used to name snapshots in saveSnapshot() when automatic is true . More...
|
|
int | snapshotQuality () |
| Defines the image quality of the snapshots produced with saveSnapshot(). More...
|
|
QFont | scaledFont (const QFont &font) const |
| Return a possibly scaled version of font , used for snapshot rendering. More...
|
|
GLuint | bufferTextureId () const |
| Returns the texture id of the texture created by copyBufferToTexture(). More...
|
|
qreal | bufferTextureMaxU () const |
| Returns the texture coordinate corresponding to the u extremum of the bufferTexture. More...
|
|
qreal | bufferTextureMaxV () const |
| Same as bufferTextureMaxU(), but for the v texture coordinate. More...
|
|
void | renderText (int x, int y, const QString &str, const QFont &font=QFont()) |
|
void | renderText (double x, double y, double z, const QString &str, const QFont &font=QFont()) |
|
bool | animationIsStarted () const |
| Return true when the animation loop is started. More...
|
|
int | animationPeriod () const |
| The animation loop period, in milliseconds. More...
|
|
virtual QString | mouseString () const |
| Returns a QString that describes the application mouse bindings, displayed in the help() window Mouse tab. More...
|
|
virtual QString | keyboardString () const |
| Returns a QString that describes the application keyboard shortcut bindings, and that will be displayed in the help() window Keyboard tab. More...
|
|
virtual QString | mouseBindingsString () const |
| This method is deprecated, use mouseString() instead. More...
|
|
virtual QString | shortcutBindingsString () const |
| This method is deprecated, use keyboardString() instead. More...
|
|
int | selectedName () const |
| Returns the name (an integer value) of the entity that was last selected by select(). More...
|
|
int | selectBufferSize () const |
| Returns the selectBuffer() size. More...
|
|
int | selectRegionWidth () const |
| Returns the width (in pixels) of a selection frustum, centered on the mouse cursor, that is used to select objects. More...
|
|
int | selectRegionHeight () const |
| See the selectRegionWidth() documentation. More...
|
|
GLuint * | selectBuffer () |
| Returns a pointer to an array of GLuint . More...
|
|
QString | stateFileName () const |
| Returns the state file name. More...
|
|
virtual QDomElement | domElement (const QString &name, QDomDocument &document) const |
| Returns an XML QDomElement that represents the QGLViewer. More...
|
|
| CustomPolicySofaViewer () |
|
| ~CustomPolicySofaViewer () override |
|
| SofaViewer () |
|
| ~SofaViewer () override |
|
virtual void | removeViewerTab (QTabWidget *) |
| Optional QTabWidget GUI for a concreate viewer. More...
|
|
virtual void | configureViewerTab (QTabWidget *) |
| Optional QTabWidget GUI for a concreate viewer. More...
|
|
void | captureEvent () override |
|
bool | isControlPressed () const |
|
virtual void | configure (sofa::component::setting::ViewerSetting *viewerConf) override |
|
const std::string | screenshotName () override |
|
void | setPrefix (const std::string &prefix, bool prependDirectory=true) override |
|
virtual void | setBackgroundImage (std::string imageFileName=std::string("textures/SOFA_logo.bmp")) override |
|
| BaseViewer () |
|
virtual | ~BaseViewer () |
|
virtual sofa::simulation::Node * | getScene () |
|
virtual const std::string & | getSceneFileName () |
|
virtual void | setSceneFileName (const std::string &f) |
|
virtual void | setScene (sofa::simulation::Node::SPtr scene, const char *filename=nullptr, bool=false) |
|
virtual bool | load (void) |
| Load the viewer. It's the initialisation. More...
|
|
virtual bool | unload (void) |
| unload the viewer without delete More...
|
|
virtual void | getView (sofa::type::Vec3 &pos, sofa::type::Quat< SReal > &ori) const |
|
virtual void | setView (const sofa::type::Vec3 &pos, const sofa::type::Quat< SReal > &ori) |
|
virtual void | moveView (const sofa::type::Vec3 &pos, const sofa::type::Quat< SReal > &ori) |
|
virtual void | newView () |
|
virtual void | resetView () |
|
virtual void | setBackgroundColour (float r, float g, float b) |
|
std::string | getBackgroundImage () |
|
virtual void | saveView ()=0 |
|
virtual void | setSizeW (int)=0 |
|
virtual void | setSizeH (int)=0 |
|
virtual void | fitObjectBBox (sofa::core::objectmodel::BaseObject *) |
|
virtual void | fitNodeBBox (sofa::core::objectmodel::BaseNode *) |
|
virtual void | setFullScreen (bool) |
|
PickHandler * | getPickHandler () |
|
|
void | resetView () override |
|
void | saveView () override |
|
void | setSizeW (int) override |
|
void | setSizeH (int) override |
|
virtual void | getView (type::Vec3 &pos, type::Quat< SReal > &ori) const override |
|
virtual void | setView (const type::Vec3 &pos, const type::Quat< SReal > &ori) override |
|
virtual void | captureEvent () override |
|
void | fitObjectBBox (sofa::core::objectmodel::BaseObject *object) override |
|
void | fitNodeBBox (sofa::core::objectmodel::BaseNode *node) override |
|
void | setShortcut (KeyboardAction action, unsigned int key) |
| Defines the shortcut() that triggers a given QGLViewer::KeyboardAction. More...
|
|
void | setKeyboardAccelerator (KeyboardAction action, unsigned int key) |
|
void | setKeyDescription (unsigned int key, QString description) |
| Defines a custom keyboard shortcut description, that will be displayed in the help() window Keyboard tab. More...
|
|
void | clearShortcuts () |
| Clears all the default keyboard shortcuts. More...
|
|
virtual void | setKeyFrameKey (unsigned int index, int key) |
|
virtual void | setPlayKeyFramePathStateKey (unsigned int buttonState) |
|
virtual void | setPlayPathStateKey (unsigned int buttonState) |
|
virtual void | setAddKeyFrameStateKey (unsigned int buttonState) |
|
virtual void | setPathKey (int key, unsigned int index=0) |
| Sets the pathKey() associated with the camera Key Frame path index . More...
|
|
virtual void | setPlayPathKeyboardModifiers (Qt::KeyboardModifiers modifiers) |
| Sets the playPathKeyboardModifiers() value. More...
|
|
virtual void | setAddKeyFrameKeyboardModifiers (Qt::KeyboardModifiers modifiers) |
| Sets the addKeyFrameKeyboardModifiers() value. More...
|
|
void | setMouseBinding (unsigned int state, MouseHandler handler, MouseAction action, bool withConstraint=true) |
| This method is deprecated since version 2.5.0. More...
|
|
void | setMouseBinding (unsigned int state, ClickAction action, bool doubleClick=false, Qt::MouseButtons buttonsBefore=Qt::NoButton) |
| This method is deprecated since version 2.5.0. More...
|
|
void | setMouseBindingDescription (unsigned int state, QString description, bool doubleClick=false, Qt::MouseButtons buttonsBefore=Qt::NoButton) |
| This method is deprecated since version 2.5.0. More...
|
|
void | setMouseBinding (Qt::KeyboardModifiers modifiers, Qt::MouseButton buttons, MouseHandler handler, MouseAction action, bool withConstraint=true) |
| Defines a MouseAction binding. More...
|
|
void | setMouseBinding (Qt::KeyboardModifiers modifiers, Qt::MouseButton button, ClickAction action, bool doubleClick=false, Qt::MouseButtons buttonsBefore=Qt::NoButton) |
| Defines a ClickAction binding. More...
|
|
void | setWheelBinding (Qt::KeyboardModifiers modifiers, MouseHandler handler, MouseAction action, bool withConstraint=true) |
| Defines a mouse wheel binding. More...
|
|
void | setMouseBindingDescription (Qt::KeyboardModifiers modifiers, Qt::MouseButton button, QString description, bool doubleClick=false, Qt::MouseButtons buttonsBefore=Qt::NoButton) |
| Defines a custom mouse binding description, displayed in the help() window's Mouse tab. More...
|
|
void | setMouseBinding (Qt::Key key, Qt::KeyboardModifiers modifiers, Qt::MouseButton buttons, MouseHandler handler, MouseAction action, bool withConstraint=true) |
| Associates a MouseAction to any mouse button , while keyboard modifiers and key are pressed. More...
|
|
void | setMouseBinding (Qt::Key key, Qt::KeyboardModifiers modifiers, Qt::MouseButton button, ClickAction action, bool doubleClick=false, Qt::MouseButtons buttonsBefore=Qt::NoButton) |
| Associates a ClickAction to a button and keyboard key and modifier(s) combination. More...
|
|
void | setWheelBinding (Qt::Key key, Qt::KeyboardModifiers modifiers, MouseHandler handler, MouseAction action, bool withConstraint=true) |
| Associates a MouseAction and a MouseHandler to a mouse wheel event. More...
|
|
void | setMouseBindingDescription (Qt::Key key, Qt::KeyboardModifiers modifiers, Qt::MouseButton button, QString description, bool doubleClick=false, Qt::MouseButtons buttonsBefore=Qt::NoButton) |
| Defines a custom mouse binding description, displayed in the help() window's Mouse tab. More...
|
|
void | clearMouseBindings () |
| Clears all the default mouse bindings. More...
|
|
MouseAction | wheelAction (Qt::KeyboardModifiers modifiers) const |
| This method is deprecated since version 2.5.0. More...
|
|
int | wheelHandler (Qt::KeyboardModifiers modifiers) const |
| This method is deprecated since version 2.5.0. More...
|
|
void | setHandlerKeyboardModifiers (MouseHandler handler, Qt::KeyboardModifiers modifiers) |
| This method has been deprecated since version 2.5.0. More...
|
|
void | setHandlerStateKey (MouseHandler handler, unsigned int buttonState) |
|
void | setMouseStateKey (MouseHandler handler, unsigned int buttonState) |
|
virtual void | resetVisualHints () |
| Reset the mask used by drawVisualHints(). More...
|
|
void | setAxisIsDrawn (bool draw=true) |
| Sets the state of axisIsDrawn(). More...
|
|
void | setGridIsDrawn (bool draw=true) |
| Sets the state of gridIsDrawn(). More...
|
|
void | setFPSIsDisplayed (bool display=true) |
| Sets the state of FPSIsDisplayed(). More...
|
|
void | setTextIsEnabled (bool enable=true) |
| Sets the state of textIsEnabled(). More...
|
|
void | setCameraIsEdited (bool edit=true) |
| Starts (edit = true , default) or stops (edit=false ) the edition of the camera(). More...
|
|
void | toggleAxisIsDrawn () |
| Toggles the state of axisIsDrawn(). More...
|
|
void | toggleGridIsDrawn () |
| Toggles the state of gridIsDrawn(). More...
|
|
void | toggleFPSIsDisplayed () |
| Toggles the state of FPSIsDisplayed(). More...
|
|
void | toggleTextIsEnabled () |
| Toggles the state of textIsEnabled(). More...
|
|
void | toggleCameraIsEdited () |
| Toggles the state of cameraIsEdited(). More...
|
|
void | setBackgroundColor (const QColor &color) |
| Sets the backgroundColor() of the viewer and calls qglClearColor() . More...
|
|
void | setForegroundColor (const QColor &color) |
| Sets the foregroundColor() of the viewer, used to draw visual hints. More...
|
|
virtual void | setSceneRadius (qreal radius) |
| Sets the sceneRadius(). More...
|
|
virtual void | setSceneCenter (const qglviewer::Vec ¢er) |
| Sets the sceneCenter(), defined in world coordinates. More...
|
|
void | setSceneBoundingBox (const qglviewer::Vec &min, const qglviewer::Vec &max) |
| Convenient way to call setSceneCenter() and setSceneRadius() from a (world axis aligned) bounding box of the scene. More...
|
|
void | showEntireScene () |
| Moves the camera so that the entire scene is visible. More...
|
|
void | setCamera (qglviewer::Camera *const camera) |
| Associates a new qglviewer::Camera to the viewer. More...
|
|
void | setManipulatedFrame (qglviewer::ManipulatedFrame *frame) |
| Sets the viewer's manipulatedFrame(). More...
|
|
void | setMouseGrabber (qglviewer::MouseGrabber *mouseGrabber) |
| Directly defines the mouseGrabber(). More...
|
|
void | setFullScreen (bool fullScreen=true) |
| Sets the isFullScreen() state. More...
|
|
void | setStereoDisplay (bool stereo=true) |
| Sets the state of displaysInStereo(). More...
|
|
void | toggleFullScreen () |
| Toggles the state of isFullScreen(). More...
|
|
void | toggleStereoDisplay () |
| Toggles the state of displaysInStereo(). More...
|
|
void | toggleCameraMode () |
| Swaps between two predefined camera mouse bindings. More...
|
|
void | saveSnapshot (bool automatic=true, bool overwrite=false) |
| Saves a snapshot of the current image displayed by the widget. More...
|
|
void | saveSnapshot (const QString &fileName, bool overwrite=false) |
| Same as saveSnapshot(), except that it uses fileName instead of snapshotFileName(). More...
|
|
void | setSnapshotFileName (const QString &name) |
| Sets snapshotFileName(). More...
|
|
void | setSnapshotFormat (const QString &format) |
| Sets the snapshotFormat(). More...
|
|
void | setSnapshotCounter (int counter) |
| Sets the snapshotCounter(). More...
|
|
void | setSnapshotQuality (int quality) |
| Sets the snapshotQuality(). More...
|
|
bool | openSnapshotFormatDialog () |
| Opens a dialog that displays the different available snapshot formats. More...
|
|
void | snapshotToClipboard () |
| Takes a snapshot of the current display and pastes it to the clipboard. More...
|
|
void | copyBufferToTexture (GLint internalFormat, GLenum format=GL_NONE) |
| Makes a copy of the current buffer into a texture. More...
|
|
void | setAnimationPeriod (int period) |
| Sets the animationPeriod(), in milliseconds. More...
|
|
virtual void | startAnimation () |
| Starts the animation loop. More...
|
|
virtual void | stopAnimation () |
| Stops animation. More...
|
|
virtual void | animate () |
| Scene animation method. More...
|
|
void | toggleAnimation () |
| Calls startAnimation() or stopAnimation(), depending on animationIsStarted(). More...
|
|
virtual void | help () |
| Opens a modal help window that includes four tabs, respectively filled with helpString(), keyboardString(), mouseString() and about libQGLViewer. More...
|
|
virtual void | aboutQGLViewer () |
| Displays the help window "About" tab. More...
|
|
virtual void | select (const QMouseEvent *event) |
| Simple wrapper method: calls select (event->pos()). More...
|
|
virtual void | select (const QPoint &point) |
| This method performs a selection in the scene from pixel coordinates. More...
|
|
void | setSelectBufferSize (int size) |
| Sets the selectBufferSize(). More...
|
|
void | setSelectRegionWidth (int width) |
| Sets the selectRegionWidth(). More...
|
|
void | setSelectRegionHeight (int height) |
| Sets the selectRegionHeight(). More...
|
|
void | setSelectedName (int id) |
| Set the selectedName() value. More...
|
|
virtual void | initFromDOMElement (const QDomElement &element) |
| Restores the QGLViewer state from a QDomElement created by domElement(). More...
|
|
virtual void | saveStateToFile () |
| Saves in stateFileName() an XML representation of the QGLViewer state, obtained from domElement(). More...
|
|
virtual bool | restoreStateFromFile () |
| Restores the QGLViewer state from the stateFileName() file using initFromDOMElement(). More...
|
|
void | setStateFileName (const QString &name) |
| Defines the stateFileName() used by saveStateToFile() and restoreStateFromFile(). More...
|
|
void | saveToFile (const QString &fileName=QString()) |
| This method is deprecated since version 1.3.9-5. More...
|
|
bool | restoreFromFile (const QString &fileName=QString()) |
| This function is deprecated since version 1.3.9-5. More...
|
|