SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::gui::BatchGUI Class Reference

#include <BatchGUI.h>

Inheritance diagram for sofa::gui::BatchGUI:

Protected Attributes

std::ostringstream m_dumpVisitorStream
 
sofa::simulation::Node::SPtr groot
 
std::string filename
 

Static Protected Attributes

static signed int nbIter = BatchGUI::DEFAULT_NUMBER_OF_ITERATIONS
 
static std::string nbIterInp =""
 
- Static Protected Attributes inherited from sofa::gui::BaseGUI
static std::string mGuiName = ""
 
static std::string configDirectoryPath = "."
 
static std::string screenshotDirectoryPath = "."
 
static const char * mProgramName = nullptr
 
static ArgumentParsermArgumentParser = nullptr
 

Protected Member Functions

 ~BatchGUI () override
 The destructor should not be called directly. Use the closeGUI() method instead. More...
 
void startDumpVisitor ()
 
void stopDumpVisitor ()
 
- Protected Member Functions inherited from sofa::gui::BaseGUI
 BaseGUI ()
 
virtual ~BaseGUI ()
 The destructor should not be called directly. Use the closeGUI() method instead. More...
 

methods each GUI must implement

 BatchGUI ()
 
void setScene (sofa::simulation::Node::SPtr groot, const char *filename="", bool temporaryFile=false) override
 Register the scene in our GUI. More...
 
void resetScene ()
 
int mainLoop () override
 
void redraw () override
 Update the GUI. More...
 
int closeGUI () override
 Close the GUI. More...
 
sofa::simulation::NodecurrentSimulation () override
 Get the rootNode of the sofa scene. More...
 
static void setNumIterations (const std::string &nbIterInp)
 

registration of each GUI

static const signed int DEFAULT_NUMBER_OF_ITERATIONS = 1000
 
static BaseGUICreateGUI (const char *name, sofa::simulation::Node::SPtr groot=nullptr, const char *filename=nullptr)
 
static int RegisterGUIParameters (ArgumentParser *argumentParser)
 

Additional Inherited Members

- Public Member Functions inherited from sofa::gui::BaseGUI
virtual void configureGUI (sofa::simulation::Node::SPtr groot)
 Use a component setting to configure our GUI. More...
 
void exportGnuplot (sofa::simulation::Node *node, std::string gnuplot_directory="")
 
virtual void setDumpState (bool)
 
virtual void setLogTime (bool)
 
virtual void setExportState (bool)
 
virtual void setRecordPath (const std::string &)
 
virtual void setGnuplotPath (const std::string &)
 
virtual void initViewer (BaseViewer *)
 
virtual void setViewerConfiguration (sofa::component::configurationsetting::ViewerSetting *)
 
virtual void setViewerResolution (int, int)
 
virtual void setFullScreen ()
 
virtual void setBackgroundColor (const sofa::helper::types::RGBAColor &)
 
virtual void setBackgroundImage (const std::string &)
 
virtual BaseViewergetViewer ()
 
virtual void registerViewer (BaseViewer *)
 
virtual bool saveScreenshot (const std::string &filename, int compression_level=-1)
 
virtual void setMouseButtonConfiguration (sofa::component::configurationsetting::MouseButtonSetting *)
 
virtual void stepMainLoop ()
 
virtual void sendMessage (const std::string &, const std::string &)
 Send a (script) message. More...
 
virtual void showFPS (double)
 Force the displayed FPS value (if any) More...
 
- Static Public Member Functions inherited from sofa::gui::BaseGUI
static std::string & GetGUIName ()
 
static const char * GetProgramName ()
 
static void SetProgramName (const char *argv0)
 
static void SetArgumentParser (ArgumentParser *parser)
 
static const std::string & getConfigDirectoryPath ()
 
static const std::string & getScreenshotDirectoryPath ()
 
static void setConfigDirectoryPath (const std::string &path, bool createIfNecessary=false)
 
static void setScreenshotDirectoryPath (const std::string &path, bool createIfNecessary=false)
 

Attribute details

const signed int sofa::gui::BatchGUI::DEFAULT_NUMBER_OF_ITERATIONS = 1000
static
std::string sofa::gui::BatchGUI::filename
protected
sofa::simulation::Node::SPtr sofa::gui::BatchGUI::groot
protected
std::ostringstream sofa::gui::BatchGUI::m_dumpVisitorStream
protected
signed int sofa::gui::BatchGUI::nbIter = BatchGUI::DEFAULT_NUMBER_OF_ITERATIONS
staticprotected
std::string sofa::gui::BatchGUI::nbIterInp =""
staticprotected

Constructor details

sofa::gui::BatchGUI::BatchGUI ( )
sofa::gui::BatchGUI::~BatchGUI ( )
overrideprotected

The destructor should not be called directly. Use the closeGUI() method instead.

Function details

int sofa::gui::BatchGUI::closeGUI ( )
overridevirtual

Close the GUI.

Implements sofa::gui::BaseGUI.

BaseGUI * sofa::gui::BatchGUI::CreateGUI ( const char *  name,
sofa::simulation::Node::SPtr  groot = nullptr,
const char *  filename = nullptr 
)
static
sofa::simulation::Node * sofa::gui::BatchGUI::currentSimulation ( )
overridevirtual

Get the rootNode of the sofa scene.

Implements sofa::gui::BaseGUI.

int sofa::gui::BatchGUI::mainLoop ( )
overridevirtual

Implements sofa::gui::BaseGUI.

void sofa::gui::BatchGUI::redraw ( )
overridevirtual

Update the GUI.

Implements sofa::gui::BaseGUI.

int sofa::gui::BatchGUI::RegisterGUIParameters ( ArgumentParser argumentParser)
static
void sofa::gui::BatchGUI::resetScene ( )
static void sofa::gui::BatchGUI::setNumIterations ( const std::string &  nbIterInp)
inlinestatic
void sofa::gui::BatchGUI::setScene ( sofa::simulation::Node::SPtr  groot,
const char *  filename = "",
bool  temporaryFile = false 
)
overridevirtual

Register the scene in our GUI.

Implements sofa::gui::BaseGUI.

void sofa::gui::BatchGUI::startDumpVisitor ( )
protected
void sofa::gui::BatchGUI::stopDumpVisitor ( )
protected