#include <BaseViewer.h>
Public Attributes | |
bool | m_showSelectedNodeBoundingBox {true} |
bool | m_showSelectedObjectBoundingBox {true} |
bool | m_showSelectedObjectPositions {true} |
bool | m_showSelectedObjectSurfaces {true} |
bool | m_showSelectedObjectVolumes {true} |
bool | m_showSelectedObjectIndices {true} |
float | m_visualScaling {0.2} |
Protected Attributes | |
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 |
std::unique_ptr< PickHandler > | pick |
int | _navigationMode |
bool | _mouseInteractorMoving |
int | _mouseInteractorSavedPosX |
int | _mouseInteractorSavedPosY |
std::string | _screenshotDirectory |
std::set< sofa::core::objectmodel::Base::SPtr > | currentSelection |
Public Member Functions | |
BaseViewer () | |
virtual | ~BaseViewer () |
virtual void | drawColourPicking (ColourPickingVisitor::ColourCode) |
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 void | setCameraMode (core::visual::VisualParams::CameraType) |
virtual bool | ready () |
virtual void | wait () |
ask the viewer to resume its activity More... | |
virtual bool | load (void) |
Load the viewer. It's the initialisation. More... | |
virtual bool | unload (void) |
unload the viewer without delete More... | |
virtual void | viewAll (void)=0 |
Recompute viewer's home position so it encompass the whole scene and apply it. More... | |
virtual void | configure (sofa::component::setting::ViewerSetting *viewerConf) |
virtual const std::string | screenshotName () |
virtual void | setPrefix (const std::string &prefix, bool prependDirectory=true) |
virtual void | screenshot (const std::string &filename, int compression_level=-1) |
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) |
virtual void | setBackgroundImage (std::string imageFileName=std::string("textures/SOFA_logo.bmp")) |
std::string | getBackgroundImage () |
virtual void | saveView ()=0 |
virtual void | setSizeW (int)=0 |
virtual void | setSizeH (int)=0 |
virtual int | getWidth ()=0 |
virtual int | getHeight ()=0 |
virtual void | captureEvent () |
virtual void | fitObjectBBox (sofa::core::objectmodel::BaseObject *) |
virtual void | fitNodeBBox (sofa::core::objectmodel::BaseNode *) |
virtual void | setFullScreen (bool) |
virtual void | moveRayPickInteractor (int, int) |
RayCasting PickHandler. More... | |
PickHandler * | getPickHandler () |
virtual void | drawScene (void)=0 |
the rendering pass is done here (have to be called in a loop) More... | |
void | drawSelection (sofa::core::visual::VisualParams *vparams) |
void | setCurrentSelection (const std::set< core::objectmodel::Base::SPtr > &selection) |
const std::set< sofa::core::objectmodel::Base::SPtr > & | getCurrentSelection () const |
Protected Member Functions | |
void | drawIndices (const sofa::type::BoundingBox &bbox, const std::vector< sofa::type::Vec3 > &positions) |
virtual void | redraw ()=0 |
internally called while the actual viewer needs a redraw (ie the camera changed) More... | |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
the sofa root note of the current scene
|
protected |
|
protected |
|
protected |
bool sofa::gui::common::BaseViewer::m_showSelectedNodeBoundingBox {true} |
bool sofa::gui::common::BaseViewer::m_showSelectedObjectBoundingBox {true} |
bool sofa::gui::common::BaseViewer::m_showSelectedObjectIndices {true} |
bool sofa::gui::common::BaseViewer::m_showSelectedObjectPositions {true} |
bool sofa::gui::common::BaseViewer::m_showSelectedObjectSurfaces {true} |
bool sofa::gui::common::BaseViewer::m_showSelectedObjectVolumes {true} |
float sofa::gui::common::BaseViewer::m_visualScaling {0.2} |
|
protected |
|
protected |
sofa::gui::common::BaseViewer::BaseViewer | ( | ) |
|
virtual |
|
inlinevirtual |
|
virtual |
|
inlinevirtual |
|
protected |
|
pure virtual |
the rendering pass is done here (have to be called in a loop)
void sofa::gui::common::BaseViewer::drawSelection | ( | sofa::core::visual::VisualParams * | vparams | ) |
|
virtual |
|
virtual |
std::string sofa::gui::common::BaseViewer::getBackgroundImage | ( | ) |
const std::set< core::objectmodel::Base::SPtr > & sofa::gui::common::BaseViewer::getCurrentSelection | ( | ) | const |
|
pure virtual |
PickHandler * sofa::gui::common::BaseViewer::getPickHandler | ( | ) |
|
virtual |
|
virtual |
|
virtual |
|
pure virtual |
|
virtual |
Load the viewer. It's the initialisation.
RayCasting PickHandler.
|
virtual |
|
virtual |
|
virtual |
true when the viewer keep the hand on the render false when it's not in activity
|
protectedpure virtual |
internally called while the actual viewer needs a redraw (ie the camera changed)
|
virtual |
|
pure virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void sofa::gui::common::BaseViewer::setCurrentSelection | ( | const std::set< core::objectmodel::Base::SPtr > & | selection | ) |
|
inlinevirtual |
|
virtual |
|
virtual |
|
virtual |
|
pure virtual |
|
pure virtual |
|
virtual |
|
virtual |
unload the viewer without delete
|
pure virtual |
Recompute viewer's home position so it encompass the whole scene and apply it.
|
virtual |
ask the viewer to resume its activity