SOFA API  56988ca1
Open source framework for multi-physics simuation
sofa::simulation::node Namespace Reference

Functions

sofa::simulation::NodegetNodeFrom (sofa::core::objectmodel::BaseContext *context)
 
sofa::core::objectmodel::BaseContexttoBaseContext (sofa::simulation::Node *node)
 
void initRoot (Node *root)
 Initialize the objects. More...
 
void init (Node *node)
 Init a node without changing the context of the simulation. More...
 
void exportInXML (Node *root, const char *fileName)
 Print all object in the graph in XML format. More...
 
void print (Node *root)
 Print all object in the graph. More...
 
void updateVisualContext (Node *root)
 Update contexts. Required before drawing the scene if root flags are modified. More...
 
void animate (Node *root, SReal dt=0.0)
 Execute one timestep. If dt is 0, the dt parameter in the graph will be used. More...
 
void updateVisual (Node *root)
 Update the Visual Models: triggers the Mappings. More...
 
void reset (Node *root)
 Reset to initial state. More...
 
void initTextures (Node *root)
 Initialize the textures. More...
 
void updateContext (Node *root)
 Update contexts. Required before drawing the scene if root flags are modified. More...
 
void computeBBox (Node *root, SReal *minBBox, SReal *maxBBox, bool init)
 
void computeTotalBBox (Node *root, SReal *minBBox, SReal *maxBBox)
 
void draw (sofa::core::visual::VisualParams *vparams, Node *root)
 Render the scene. More...
 
void exportOBJ (Node *root, const char *filename, bool exportMTL=true)
 Export a scene to an OBJ 3D Scene. More...
 
void exportGraph (Node *root, const char *filename=nullptr)
 Print all objects in the graph in the given file (format is given by the filename extension) More...
 
void dumpState (Node *root, std::ofstream &out)
 Dump the current state in the given stream. More...
 
NodeSPtr load (const std::string &, bool reload=false, const std::vector< std::string > &sceneArgs=std::vector< std::string >(0))
 Load a scene from a file. More...
 
void unload (NodeSPtr root)
 Unload a scene from a Node. More...
 

Function Documentation

◆ animate()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::animate ( Node root,
SReal  dt 
)

Execute one timestep. If dt is 0, the dt parameter in the graph will be used.

◆ computeBBox()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::computeBBox ( Node root,
SReal *  minBBox,
SReal *  maxBBox,
bool  init = true 
)

Compute the bounding box of the scene. If init is set to "true", then minBBox and maxBBox will be initialised to a default value

Warning
MechanicalObjects with showObject member set to false are ignored
See also
computeTotalBBox(Node* root, SReal* minBBox, SReal* maxBBox)

◆ computeTotalBBox()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::computeTotalBBox ( Node root,
SReal *  minBBox,
SReal *  maxBBox 
)

Compute the bounding box of the scene. Includes all objects, may they be displayed or not.

See also
computeBBox(Node* root, SReal* minBBox, SReal* maxBBox, bool init=true)

◆ draw()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::draw ( sofa::core::visual::VisualParams vparams,
Node root 
)

Render the scene.

◆ dumpState()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::dumpState ( Node root,
std::ofstream &  out 
)

Dump the current state in the given stream.

◆ exportGraph()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::exportGraph ( Node root,
const char filename 
)

Print all objects in the graph in the given file (format is given by the filename extension)

◆ exportInXML()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::exportInXML ( Node root,
const char fileName 
)

Print all object in the graph in XML format.

◆ exportOBJ()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::exportOBJ ( Node root,
const char filename,
bool  exportMTL 
)

Export a scene to an OBJ 3D Scene.

◆ getNodeFrom()

SOFA_SIMULATION_CORE_API Node * sofa::simulation::node::getNodeFrom ( sofa::core::objectmodel::BaseContext context)

◆ init()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::init ( Node node)

Init a node without changing the context of the simulation.

◆ initRoot()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::initRoot ( Node root)

Initialize the objects.

◆ initTextures()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::initTextures ( Node root)

Initialize the textures.

◆ load()

NodeSPtr SOFA_SIMULATION_CORE_API sofa::simulation::node::load ( const std::string &  filename,
bool  reload,
const std::vector< std::string > &  sceneArgs 
)

Load a scene from a file.

◆ print()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::print ( Node root)

Print all object in the graph.

◆ reset()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::reset ( Node root)

Reset to initial state.

◆ toBaseContext()

SOFA_SIMULATION_CORE_API sofa::core::objectmodel::BaseContext * sofa::simulation::node::toBaseContext ( sofa::simulation::Node node)

◆ unload()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::unload ( NodeSPtr  root)

Unload a scene from a Node.

◆ updateContext()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::updateContext ( Node root)

Update contexts. Required before drawing the scene if root flags are modified.

◆ updateVisual()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::updateVisual ( Node root)

Update the Visual Models: triggers the Mappings.

◆ updateVisualContext()

void SOFA_SIMULATION_CORE_API sofa::simulation::node::updateVisualContext ( Node root)

Update contexts. Required before drawing the scene if root flags are modified.