#include <QtViewer.h>
Static Public Attributes | |
static const std::string | VIEW_FILE_EXTENSION = "view" |
TODO: standardize .view file parameters. More... | |
static Quat< SReal > | _mouseInteractorNewQuat |
static bool | _mouseTrans = false |
static bool | _mouseRotate = false |
Public Member Functions | |
QtViewer (QWidget *parent, const char *name="") | |
~QtViewer () override | |
QWidget * | getQWidget () override |
bool | ready () override |
void | wait () override |
ask the viewer to resume its activity More... | |
sofa::simulation::Node * | getScene () override |
int | getWidth () override |
int | getHeight () override |
void | UpdateOBJ (void) |
void | moveRayPickInteractor (int eventX, int eventY) override |
RayCasting PickHandler. More... | |
void | ApplyMouseInteractorTransformation (int x, int y) |
QString | helpString () const override |
void | screenshot (const std::string &filename, int compression_level=-1) override |
Public Member Functions inherited from sofa::gui::qt::viewer::CustomPolicySofaViewer< VisualModelPolicyType > | |
CustomPolicySofaViewer () | |
~CustomPolicySofaViewer () override | |
Public Member Functions inherited from sofa::gui::qt::viewer::SofaViewer | |
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 |
Public Member Functions inherited from sofa::gui::common::BaseViewer | |
BaseViewer () | |
virtual | ~BaseViewer () |
virtual void | drawColourPicking (ColourPickingVisitor::ColourCode) |
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 void | setCameraMode (core::visual::VisualParams::CameraType) |
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 () |
Static Public Member Functions | |
static QtViewer * | create (QtViewer *, common::BaseViewerArgument &arg) |
static const char * | viewerName () |
static const char * | acceleratedName () |
static int | EnableViewer () |
static int | DisableViewer () |
Protected Member Functions | |
void | calcProjection (int width=0, int height=0) |
void | initializeGL () override |
void | paintGL () override |
void | paintEvent (QPaintEvent *qpe) override |
void | resizeGL (int w, int h) override |
virtual void | viewAll () override |
Overloaded from SofaViewer. More... | |
Protected Member Functions inherited from sofa::gui::qt::viewer::SofaViewer | |
void | redraw () override |
internally called while the actual viewer needs a redraw (ie the camera changed) More... | |
Signals | |
void | redrawn () override |
void | resizeW (int) override |
void | resizeH (int) override |
void | quit () |
Signals inherited from sofa::gui::qt::viewer::SofaViewer | |
virtual void | redrawn ()=0 |
virtual void | resizeW (int)=0 |
virtual void | resizeH (int)=0 |
Public Slots | |
void | resetView () override |
virtual void | saveView () override |
virtual void | setSizeW (int) override |
virtual 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 | newView () override |
virtual void | moveView (const type::Vec3 &pos, const type::Quat< SReal > &ori) override |
virtual void | captureEvent () override |
virtual void | drawColourPicking (common::ColourPickingVisitor::ColourCode code) override |
virtual void | fitNodeBBox (sofa::core::objectmodel::BaseNode *node) override |
virtual void | fitObjectBBox (sofa::core::objectmodel::BaseObject *obj) override |
Additional Inherited Members | |
Protected Attributes inherited from sofa::gui::qt::viewer::SofaViewer | |
std::unique_ptr< EngineBackend > | m_backend |
QTimer | captureTimer |
bool | m_isControlPressed |
ColourPickingRenderCallBack | colourPickingRenderCallBack |
Protected Attributes inherited from sofa::gui::common::BaseViewer | |
sofa::simulation::Node::SPtr | groot |
the sofa root note of the current scene More... | |
sofa::component::visual::BaseCamera::SPtr | currentCamera |
std::string | sceneFileName |
bool | _video |
bool | m_isVideoButtonPressed |
bool | m_bShowAxis |
bool | _fullScreen |
int | _background |
bool | initTexturesDone |
sofa::type::Vec3 | backgroundColour |
std::string | backgroundImageFile |
sofa::type::Vec3 | ambientColour |
PickHandler * | pick |
int | _navigationMode |
bool | _mouseInteractorMoving |
int | _mouseInteractorSavedPosX |
int | _mouseInteractorSavedPosY |
std::string | _screenshotDirectory |
Vec3 sofa::gui::qt::viewer::qt::QtViewer::_mouseInteractorAbsolutePosition |
Quat<SReal> sofa::gui::qt::viewer::qt::QtViewer::_mouseInteractorCurrentQuat |
|
static |
bool sofa::gui::qt::viewer::qt::QtViewer::_mouseInteractorRotationMode |
Trackball sofa::gui::qt::viewer::qt::QtViewer::_mouseInteractorTrackball |
bool sofa::gui::qt::viewer::qt::QtViewer::_mouseInteractorTranslationMode |
|
static |
|
static |
int sofa::gui::qt::viewer::qt::QtViewer::_translationMode |
|
static |
TODO: standardize .view file parameters.
|
override |
|
inlinestatic |
void sofa::gui::qt::viewer::qt::QtViewer::ApplyMouseInteractorTransformation | ( | int | x, |
int | y | ||
) |
|
protected |
|
inlineoverridevirtualslot |
|
inlinestatic |
|
static |
Disable this class of viewer. This method is called after the viewer is destroyed and can be used to unregister classes associated with in the ObjectFactory.
|
overridevirtualslot |
|
static |
Activate this class of viewer. This method is called before the viewer is actually created and can be used to register classes associated with in the ObjectFactory.
|
inlineoverridevirtualslot |
|
inlineoverridevirtualslot |
|
inlineoverridevirtual |
Implements sofa::gui::common::BaseViewer.
|
inlineoverridevirtual |
Implements sofa::gui::qt::viewer::SofaViewer.
|
inlineoverridevirtual |
Reimplemented from sofa::gui::common::BaseViewer.
|
overridevirtualslot |
|
inlineoverridevirtual |
Implements sofa::gui::common::BaseViewer.
|
overridevirtual |
Implements sofa::gui::qt::viewer::SofaViewer.
|
overrideprotected |
|
overridevirtual |
RayCasting PickHandler.
Reimplemented from sofa::gui::common::BaseViewer.
|
overridevirtualslot |
|
overridevirtualslot |
|
overrideprotected |
|
overrideprotected |
|
signal |
|
inlineoverridevirtual |
true when the viewer keep the hand on the render false when it's not in activity
Reimplemented from sofa::gui::common::BaseViewer.
|
overridesignal |
|
overrideslot |
|
overrideprotected |
|
overridesignal |
|
overridesignal |
|
overridevirtualslot |
|
overridevirtual |
Reimplemented from sofa::gui::qt::viewer::SofaViewer.
|
overridevirtualslot |
|
overridevirtualslot |
|
overridevirtualslot |
void sofa::gui::qt::viewer::qt::QtViewer::UpdateOBJ | ( | void | ) |
|
inlineoverrideprotectedvirtual |
Overloaded from SofaViewer.
Implements sofa::gui::common::BaseViewer.
|
inlinestatic |
|
inlineoverridevirtual |
ask the viewer to resume its activity
Reimplemented from sofa::gui::common::BaseViewer.