SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::simulation::graph::DAGSimulation Class Reference

#include <DAGSimulation.h>

Inheritance diagram for sofa::simulation::graph::DAGSimulation:

Detailed Description

Main controller of the scene. Defines how the scene is inited at the beginning, and updated at each time step. Derives from BaseObject in order to model the parameters as Datas, which makes their edition easy in the GUI.

Public Member Functions

 DAGSimulation ()
 
 ~DAGSimulation () override
 
virtual NodeSPtr createNewGraph (const std::string &name) override
 create a new graph(or tree) and return its root node. More...
 
virtual NodeSPtr createNewNode (const std::string &name) override
 creates and returns a new node. More...
 
bool isDirectedAcyclicGraph () override
 Can the simulation handle a directed acyclic graph? More...
 
- Public Member Functions inherited from sofa::simulation::Simulation
 Simulation ()
 
virtual ~Simulation ()
 
 Simulation (const Simulation &n)=delete
 
Simulationoperator= (const Simulation &n)=delete
 
virtual void print (Node *root)=delete
 Print all object in the graph. More...
 
virtual void init (Node *root)=delete
 Initialize the objects. More...
 
virtual void initNode (Node *node)=delete
 Init a node without changing the context of the simulation. More...
 
virtual void animate (Node *root, SReal dt=0.0)=delete
 Execute one timestep. If dt is 0, the dt parameter in the graph will be used. More...
 
virtual void updateVisual (Node *root)=delete
 Update the Visual Models: triggers the Mappings. More...
 
virtual void reset (Node *root)=delete
 Reset to initial state. More...
 
virtual void initTextures (Node *root)=delete
 Initialize the textures. More...
 
virtual void updateContext (Node *root)=delete
 Update contexts. Required before drawing the scene if root flags are modified. More...
 
virtual void updateVisualContext (Node *root)=delete
 Update contexts. Required before drawing the scene if root flags are modified. More...
 
virtual void computeBBox (Node *root, SReal *minBBox, SReal *maxBBox, bool init=true)=delete
 
virtual void computeTotalBBox (Node *root, SReal *minBBox, SReal *maxBBox)=delete
 
virtual void draw (sofa::core::visual::VisualParams *vparams, Node *root)=delete
 Render the scene. More...
 
virtual void exportOBJ (Node *root, const char *filename, bool exportMTL=true)=delete
 Export a scene to an OBJ 3D Scene. More...
 
virtual void exportXML (Node *root, const char *fileName=nullptr)=delete
 Print all object in the graph in XML format. More...
 
virtual void exportGraph (Node *root, const char *filename=nullptr)=delete
 Print all objects in the graph in the given file (format is given by the filename extension) More...
 
virtual void dumpState (Node *root, std::ofstream &out)=delete
 Dump the current state in the given stream. More...
 
virtual NodeSPtr load (const std::string &, bool reload=false, const std::vector< std::string > &sceneArgs=std::vector< std::string >(0))=delete
 Load a scene from a file. More...
 
virtual void unload (NodeSPtr root)=delete
 Unload a scene from a Node. More...
 

Additional Inherited Members

- Static Public Attributes inherited from sofa::simulation::Simulation
static Simulation::SPtr theSimulation { nullptr }
 

Constructor details

◆ DAGSimulation()

sofa::simulation::graph::DAGSimulation::DAGSimulation ( )

◆ ~DAGSimulation()

sofa::simulation::graph::DAGSimulation::~DAGSimulation ( )
override

Function details

◆ createNewGraph()

Node::SPtr sofa::simulation::graph::DAGSimulation::createNewGraph ( const std::string &  name)
overridevirtual

create a new graph(or tree) and return its root node.

Implements sofa::simulation::Simulation.

◆ createNewNode()

Node::SPtr sofa::simulation::graph::DAGSimulation::createNewNode ( const std::string &  name)
overridevirtual

creates and returns a new node.

Implements sofa::simulation::Simulation.

◆ isDirectedAcyclicGraph()

bool sofa::simulation::graph::DAGSimulation::isDirectedAcyclicGraph ( )
inlineoverridevirtual

Can the simulation handle a directed acyclic graph?

Implements sofa::simulation::Simulation.