#include <BatchGUI.h>
Protected Attributes | |
std::ostringstream | m_dumpVisitorStream |
sofa::simulation::NodeSPtr | groot |
std::string | filename |
Static Protected Attributes | |
static signed int | nbIter = BatchGUI::DEFAULT_NUMBER_OF_ITERATIONS |
static std::string | nbIterInp ="" |
static bool | hideProgressBar { false } |
Static Protected Attributes inherited from sofa::gui::common::BaseGUI | |
static std::string | mGuiName = "" |
static std::string | configDirectoryPath = "." |
static std::string | screenshotDirectoryPath = "." |
static const char * | mProgramName = nullptr |
static ArgumentParser * | mArgumentParser = nullptr |
Public Member Functions | |
bool | canBeDefaultGUI () const override |
methods each GUI must implement | |
BatchGUI () | |
void | setScene (sofa::simulation::NodeSPtr 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::Node * | currentSimulation () override |
Get the rootNode of the sofa scene. More... | |
Public Member Functions inherited from sofa::gui::common::BaseGUI | |
virtual void | configureGUI (sofa::simulation::NodeSPtr 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 | setGnuplotPath (const std::string &) |
virtual void | initViewer (BaseViewer *) |
virtual void | setViewerConfiguration (sofa::component::setting::ViewerSetting *) |
virtual void | setViewerResolution (int, int) |
virtual void | setFullScreen () |
virtual void | centerWindow () |
virtual void | setBackgroundColor (const sofa::type::RGBAColor &) |
virtual void | setBackgroundImage (const std::string &) |
virtual BaseViewer * | getViewer () |
virtual void | registerViewer (BaseViewer *) |
virtual bool | saveScreenshot (const std::string &filename, int compression_level=-1) |
virtual void | setMouseButtonConfiguration (sofa::component::setting::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... | |
Protected Member Functions | |
~BatchGUI () override | |
The destructor should not be called directly. Use the closeGUI() method instead. More... | |
void | startDumpVisitor () |
void | stopDumpVisitor () |
void | exportJson (const std::string &timerOutputStr, int iterationNumber) const |
Export a text file (with json extension) containing the timer output string. More... | |
Protected Member Functions inherited from sofa::gui::common::BaseGUI | |
BaseGUI () | |
virtual | ~BaseGUI () |
The destructor should not be called directly. Use the closeGUI() method instead. More... | |
Static Protected Member Functions | |
static bool | canExportJson (const std::string &timerOutputStr, const std::string &timerId) |
Return true if the timer output string has a json string and the timer is setup to output json. More... | |
registration of each GUI | |
static const signed int | DEFAULT_NUMBER_OF_ITERATIONS = 1000 |
static BaseGUI * | CreateGUI (const char *name, sofa::simulation::NodeSPtr groot=nullptr, const char *filename=nullptr) |
static int | RegisterGUIParameters (common::ArgumentParser *argumentParser) |
static void | OnNbIterChange (const common::ArgumentParser *, const std::string &strValue) |
Additional Inherited Members | |
Static Public Member Functions inherited from sofa::gui::common::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) |
|
staticconstexpr |
|
protected |
|
protected |
|
inlinestaticprotected |
|
protected |
|
staticprotected |
|
staticprotected |
sofa::gui::batch::BatchGUI::BatchGUI | ( | ) |
|
overrideprotected |
The destructor should not be called directly. Use the closeGUI() method instead.
|
inlineoverridevirtual |
If the function returns true: when the GUI is created, its name will be saved so that it will be created when no GUI is specified. If the function returns false, the GUI name is not saved, and the last one will be used when no GUI is specified.
Reimplemented from sofa::gui::common::BaseGUI.
|
staticprotected |
Return true if the timer output string has a json string and the timer is setup to output json.
|
overridevirtual |
Close the GUI.
Implements sofa::gui::common::BaseGUI.
|
static |
|
overridevirtual |
Get the rootNode of the sofa scene.
Implements sofa::gui::common::BaseGUI.
|
protected |
Export a text file (with json extension) containing the timer output string.
|
overridevirtual |
Implements sofa::gui::common::BaseGUI.
|
static |
|
overridevirtual |
Update the GUI.
Implements sofa::gui::common::BaseGUI.
|
static |
void sofa::gui::batch::BatchGUI::resetScene | ( | ) |
|
overridevirtual |
Register the scene in our GUI.
Implements sofa::gui::common::BaseGUI.
|
protected |
|
protected |