Sofa.Core
General description
The general object hierarchy and data structures.
General description
A Sofa simulation is refered as a “Scene”. A scene contains several object. Each objcet is implemented as the aggregation of component. Groups of component are grouped and organized logically using a specific container called Node. Nodes are hierarchically organized in a scene graph.
- Commonly used classes:
Overloaded function.
The class object is a base class for simulation components.
Main class used to register and dynamically create objects.
Camera is an API dedicated to the control of the Camera in SOFA.
The purpose of a data is to store the attributs of your component.
Example of use
import Sofa.Core # Create a new node n = Sofa.Core.Node("MyNode") # Create a new node n = Sofa.Core.Node("MyNode"") # Add a child node name 'Node2' n.addChild("Node2") # Add a mechanical component to MyNode n.addObject("MechanicalObject", name="dofs") Sofa.Simulation.init(root) Sofa.Simulation.print(root)
API Table of Content
Classes
Root class of the scene graph hierarchy
Camera is an API dedicated to the control of the Camera in SOFA.
Record storing information about a class
ContactListener is an API dedicated to the monitoring of two collision models.
The purpose of a data is to store the attributs of your component.
Classic python container implemented for SOFA data fields.
DataDict exposes the data of a sofa object in a way similar to a normal python dictionnary.
Iterator reimplemented to fit dataDict.
A Link allows you to access a sofa component from another one anywhere in the simulation graph.
Hold a linkpath to an object or a data.
Mass is an API dedicated to the control of a mass in SOFA.
Mass is an API dedicated to the control of a mass in SOFA.
Mass is an API dedicated to the control of a mass in SOFA.
Mass is an API dedicated to the control of a mass in SOFA.
Mass is an API dedicated to the control of a mass in SOFA.
Mass is an API dedicated to the control of a mass in SOFA.
Overloaded function.
The class object is a base class for simulation components.
Main class used to register and dynamically create objects.
Overloaded function.