Classes | |
class | addNew |
Helper class to create a component and add it as a child of a given Node. More... | |
Typedefs | |
typedef SReal | Scalar |
typedef sofa::defaulttype::Vec3Types::Deriv | Deriv3 |
typedef linearalgebra::FullVector< SReal > | FullVector |
typedef Eigen::Matrix< SReal, Eigen::Dynamic, 1 > | Vector |
typedef Eigen::Matrix< SReal, Eigen::Dynamic, Eigen::Dynamic > | DenseMatrix |
typedef Eigen::SparseMatrix< SReal, Eigen::RowMajor > | SparseMatrix |
Enumerations | |
enum | MappingType { MT_Barycentric = 0 , MT_Rigid , MT_Identity } |
Functions | |
Node::SPtr | createRootWithCollisionPipeline (const std::string &responseType) |
Node::SPtr | createEulerSolverNode (Node::SPtr parent, const std::string &name, const std::string &scheme) |
Node::SPtr | createObstacle (Node::SPtr parent, const std::string &filenameCollision, const std::string filenameVisual, const std::string &color, const Deriv3 &translation, const Deriv3 &rotation) |
Node::SPtr | createCollisionNodeVec3 (Node::SPtr parent, BaseObject::SPtr dof, const std::string &filename, const std::vector< std::string > &elements, const Deriv3 &translation, const Deriv3 &rotation) |
simulation::Node::SPtr | createVisualNodeVec3 (simulation::Node::SPtr parent, BaseObject::SPtr dof, const std::string &filename, const std::string &color, const Deriv3 &translation, const Deriv3 &rotation, const MappingType &mappingT) |
Node::SPtr | createCollisionNodeRigid (Node::SPtr parent, BaseObject::SPtr dofRigid, const std::string &filename, const std::vector< std::string > &elements, const Deriv3 &translation, const Deriv3 &rotation) |
Node::SPtr | createVisualNodeRigid (Node::SPtr parent, BaseObject::SPtr dofRigid, const std::string &filename, const std::string &color, const Deriv3 &translation, const Deriv3 &rotation) |
void | addCollisionModels (Node::SPtr parent, const std::vector< std::string > &elements) |
void | addTetraFEM (simulation::Node::SPtr parent, const std::string &objectName, SReal totalMass, SReal young, SReal poisson) |
void | addTriangleFEM (simulation::Node::SPtr node, const std::string &objectName, SReal totalMass, SReal young, SReal poisson) |
simulation::Node::SPtr | addCube (simulation::Node::SPtr parent, const std::string &objectName, const Deriv3 &gridSize, SReal totalMass, SReal young, SReal poisson, const Deriv3 &translation, const Deriv3 &rotation, const Deriv3 &scale) |
simulation::Node::SPtr | addRigidCube (simulation::Node::SPtr parent, const std::string &objectName, const Deriv3 &gridSize, const Deriv3 &translation, const Deriv3 &rotation, const Deriv3 &scale) |
simulation::Node::SPtr | addCylinder (simulation::Node::SPtr parent, const std::string &objectName, const Deriv3 &gridSize, const Deriv3 &axis, SReal radius, SReal length, SReal totalMass, SReal young, SReal poisson, const Deriv3 &translation, const Deriv3 &rotation, const Deriv3 &scale) |
simulation::Node::SPtr | addRigidCylinder (simulation::Node::SPtr parent, const std::string &objectName, const Deriv3 &gridSize, const Deriv3 &axis, SReal radius, SReal length, const Deriv3 &translation, const Deriv3 &rotation, const Deriv3 &scale) |
simulation::Node::SPtr | addSphere (simulation::Node::SPtr parent, const std::string &objectName, const Deriv3 &gridSize, const Deriv3 &axis, SReal radius, SReal totalMass, SReal young, SReal poisson, const Deriv3 &translation, const Deriv3 &rotation, const Deriv3 &scale) |
simulation::Node::SPtr | addRigidSphere (simulation::Node::SPtr parent, const std::string &objectName, const Deriv3 &gridSize, const Deriv3 &axis, SReal radius, const Deriv3 &translation, const Deriv3 &rotation, const Deriv3 &scale) |
simulation::Node::SPtr | addPlane (simulation::Node::SPtr parent, const std::string &objectName, const Deriv3 &gridSize, SReal totalMass, SReal young, SReal poisson, const Deriv3 &translation, const Deriv3 &rotation, const Deriv3 &scale) |
simulation::Node::SPtr | addRigidPlane (simulation::Node::SPtr parent, const std::string &objectName, const Deriv3 &gridSize, const Deriv3 &translation, const Deriv3 &rotation, const Deriv3 &scale) |
Node::SPtr | massSpringString (Node::SPtr parent, double x0, double y0, double z0, double x1, double y1, double z1, unsigned numParticles, double totalMass, double stiffnessValue, double dampingRatio) |
Create a stiff string. More... | |
Node::SPtr | initSofa () |
Initialize the sofa library and create the root of the scene graph. More... | |
Node::SPtr | getRoot () |
Initialize the sofa library and create the root of the scene graph. More... | |
void | initScene (Node::SPtr _root) |
Node::SPtr | clearScene () |
Clear the scene graph and return a pointer to the new root. More... | |
void | setDataLink (core::objectmodel::BaseData *source, core::objectmodel::BaseData *target) |
Create a link from source to target. More... | |
SOFA_SCENECREATOR_API simulation::Node::SPtr | createEulerSolverNode (simulation::Node::SPtr parent, const std::string &name, const std::string &integrationScheme=std::string("Implicit")) |
SOFA_SCENECREATOR_API simulation::Node::SPtr | createObstacle (simulation::Node::SPtr parent, const std::string &filenameCollision, const std::string filenameVisual, const std::string &color, const Deriv3 &translation=Deriv3(), const Deriv3 &rotation=Deriv3()) |
SOFA_SCENECREATOR_API simulation::Node::SPtr | createCollisionNodeVec3 (simulation::Node::SPtr parent, BaseObject::SPtr dof, const std::string &filename, const std::vector< std::string > &elements, const Deriv3 &translation=Deriv3(), const Deriv3 &rotation=Deriv3()) |
SOFA_SCENECREATOR_API simulation::Node::SPtr | createCollisionNodeRigid (simulation::Node::SPtr parent, BaseObject::SPtr dofRigid, const std::string &filename, const std::vector< std::string > &elements, const Deriv3 &translation=Deriv3(), const Deriv3 &rotation=Deriv3()) |
SOFA_SCENECREATOR_API simulation::Node::SPtr | createVisualNodeRigid (simulation::Node::SPtr parent, BaseObject::SPtr dofRigid, const std::string &filename, const std::string &color, const Deriv3 &translation=Deriv3(), const Deriv3 &rotation=Deriv3()) |
SOFA_SCENECREATOR_API simulation::Node::SPtr | createGridScene (Vec3 startPoint, Vec3 endPoint, unsigned numX, unsigned numY, unsigned numZ, double totalMass, double stiffnessValue=1.0, double dampingRatio=0) |
SOFA_SCENECREATOR_API void | addCollisionModels (simulation::Node::SPtr CollisionNode, const std::vector< std::string > &elements) |
SOFA_SCENECREATOR_API simulation::Node::SPtr | massSpringString (simulation::Node::SPtr parent, double x0, double y0, double z0, double x1, double y1, double z1, unsigned numParticles, double totalMass, double stiffnessValue=1.0, double dampingRatio=0) |
Create a string composed of particles (at least 2) and springs. More... | |
SOFA_SCENECREATOR_API void | initScene (simulation::Node::SPtr root) |
Initialize the scene graph. More... | |
Vector | getVector (core::ConstVecId id, bool indep) |
typedef Eigen::Matrix<SReal, Eigen::Dynamic,Eigen::Dynamic> sofa::modeling::DenseMatrix |
typedef sofa::defaulttype::Vec3Types::Deriv sofa::modeling::Deriv3 |
typedef linearalgebra::FullVector<SReal> sofa::modeling::FullVector |
typedef SReal sofa::modeling::Scalar |
typedef Eigen::SparseMatrix<SReal, Eigen::RowMajor> sofa::modeling::SparseMatrix |
typedef Eigen::Matrix<SReal, Eigen::Dynamic, 1> sofa::modeling::Vector |
void sofa::modeling::addCollisionModels | ( | Node::SPtr | parent, |
const std::vector< std::string > & | elements | ||
) |
SOFA_SCENECREATOR_API void sofa::modeling::addCollisionModels | ( | simulation::Node::SPtr | CollisionNode, |
const std::vector< std::string > & | elements | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::addCube | ( | simulation::Node::SPtr | parent, |
const std::string & | objectName, | ||
const Deriv3 & | gridSize = Deriv3(10, 10, 10) , |
||
SReal | totalMass = 1.0 , |
||
SReal | young = 300 , |
||
SReal | poisson = 0.3 , |
||
const Deriv3 & | translation = Deriv3() , |
||
const Deriv3 & | rotation = Deriv3() , |
||
const Deriv3 & | scale = Deriv3(1.0, 1.0, 1.0) |
||
) |
Create 3D objects, using mechanical Obj, grid topology and visualisation inside one node By default object is centered and volume equal to 1 unit, use dof modifier to change the scale/position/rotation
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::addCylinder | ( | simulation::Node::SPtr | parent, |
const std::string & | objectName, | ||
const Deriv3 & | gridSize, | ||
const Deriv3 & | axis, | ||
SReal | radius, | ||
SReal | length, | ||
SReal | totalMass, | ||
SReal | young, | ||
SReal | poisson, | ||
const Deriv3 & | translation, | ||
const Deriv3 & | rotation, | ||
const Deriv3 & | scale | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::addPlane | ( | simulation::Node::SPtr | parent, |
const std::string & | objectName, | ||
const Deriv3 & | gridSize, | ||
SReal | totalMass, | ||
SReal | young, | ||
SReal | poisson, | ||
const Deriv3 & | translation, | ||
const Deriv3 & | rotation, | ||
const Deriv3 & | scale | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::addRigidCube | ( | simulation::Node::SPtr | parent, |
const std::string & | objectName, | ||
const Deriv3 & | gridSize, | ||
const Deriv3 & | translation, | ||
const Deriv3 & | rotation, | ||
const Deriv3 & | scale | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::addRigidCylinder | ( | simulation::Node::SPtr | parent, |
const std::string & | objectName, | ||
const Deriv3 & | gridSize, | ||
const Deriv3 & | axis, | ||
SReal | radius, | ||
SReal | length, | ||
const Deriv3 & | translation, | ||
const Deriv3 & | rotation, | ||
const Deriv3 & | scale | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::addRigidPlane | ( | simulation::Node::SPtr | parent, |
const std::string & | objectName, | ||
const Deriv3 & | gridSize, | ||
const Deriv3 & | translation, | ||
const Deriv3 & | rotation, | ||
const Deriv3 & | scale | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::addRigidSphere | ( | simulation::Node::SPtr | parent, |
const std::string & | objectName, | ||
const Deriv3 & | gridSize, | ||
const Deriv3 & | axis, | ||
SReal | radius, | ||
const Deriv3 & | translation, | ||
const Deriv3 & | rotation, | ||
const Deriv3 & | scale | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::addSphere | ( | simulation::Node::SPtr | parent, |
const std::string & | objectName, | ||
const Deriv3 & | gridSize, | ||
const Deriv3 & | axis, | ||
SReal | radius, | ||
SReal | totalMass, | ||
SReal | young, | ||
SReal | poisson, | ||
const Deriv3 & | translation, | ||
const Deriv3 & | rotation, | ||
const Deriv3 & | scale | ||
) |
SOFA_SCENECREATOR_API void sofa::modeling::addTetraFEM | ( | simulation::Node::SPtr | parent, |
const std::string & | objectName, | ||
SReal | totalMass, | ||
SReal | young, | ||
SReal | poisson | ||
) |
SOFA_SCENECREATOR_API void sofa::modeling::addTriangleFEM | ( | simulation::Node::SPtr | node, |
const std::string & | objectName, | ||
SReal | totalMass, | ||
SReal | young, | ||
SReal | poisson | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::clearScene | ( | ) |
Clear the scene graph and return a pointer to the new root.
Node::SPtr sofa::modeling::createCollisionNodeRigid | ( | Node::SPtr | parent, |
BaseObject::SPtr | dofRigid, | ||
const std::string & | filename, | ||
const std::vector< std::string > & | elements, | ||
const Deriv3 & | translation, | ||
const Deriv3 & | rotation | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::createCollisionNodeRigid | ( | simulation::Node::SPtr | parent, |
BaseObject::SPtr | dofRigid, | ||
const std::string & | filename, | ||
const std::vector< std::string > & | elements, | ||
const Deriv3 & | translation = Deriv3() , |
||
const Deriv3 & | rotation = Deriv3() |
||
) |
Create a collision node using Rigid Mapping, using a 3d model specified by filename. elements is a vector of type of collision models (Triangle, Line, Point, Sphere) an initial transformation can be performed
Node::SPtr sofa::modeling::createCollisionNodeVec3 | ( | Node::SPtr | parent, |
BaseObject::SPtr | dof, | ||
const std::string & | filename, | ||
const std::vector< std::string > & | elements, | ||
const Deriv3 & | translation, | ||
const Deriv3 & | rotation | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::createCollisionNodeVec3 | ( | simulation::Node::SPtr | parent, |
BaseObject::SPtr | dof, | ||
const std::string & | filename, | ||
const std::vector< std::string > & | elements, | ||
const Deriv3 & | translation = Deriv3() , |
||
const Deriv3 & | rotation = Deriv3() |
||
) |
Create a collision node using Barycentric Mapping, using a 3d model specified by filename. elements is a vector of type of collision models (Triangle, Line, Point, Sphere) an initial transformation can be performed
Node::SPtr sofa::modeling::createEulerSolverNode | ( | Node::SPtr | parent, |
const std::string & | name, | ||
const std::string & | scheme | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::createEulerSolverNode | ( | simulation::Node::SPtr | parent, |
const std::string & | name, | ||
const std::string & | integrationScheme = std::string("Implicit") |
||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::createGridScene | ( | Vec3 | startPoint, |
Vec3 | endPoint, | ||
unsigned | numX, | ||
unsigned | numY, | ||
unsigned | numZ, | ||
double | totalMass, | ||
double | stiffnessValue = 1.0 , |
||
double | dampingRatio = 0 |
||
) |
Node::SPtr sofa::modeling::createObstacle | ( | Node::SPtr | parent, |
const std::string & | filenameCollision, | ||
const std::string | filenameVisual, | ||
const std::string & | color, | ||
const Deriv3 & | translation, | ||
const Deriv3 & | rotation | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::createObstacle | ( | simulation::Node::SPtr | parent, |
const std::string & | filenameCollision, | ||
const std::string | filenameVisual, | ||
const std::string & | color, | ||
const Deriv3 & | translation = Deriv3() , |
||
const Deriv3 & | rotation = Deriv3() |
||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::createRootWithCollisionPipeline | ( | const std::string & | responseType | ) |
Node::SPtr sofa::modeling::createVisualNodeRigid | ( | Node::SPtr | parent, |
BaseObject::SPtr | dofRigid, | ||
const std::string & | filename, | ||
const std::string & | color, | ||
const Deriv3 & | translation, | ||
const Deriv3 & | rotation | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::createVisualNodeRigid | ( | simulation::Node::SPtr | parent, |
BaseObject::SPtr | dofRigid, | ||
const std::string & | filename, | ||
const std::string & | color, | ||
const Deriv3 & | translation = Deriv3() , |
||
const Deriv3 & | rotation = Deriv3() |
||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::createVisualNodeVec3 | ( | simulation::Node::SPtr | parent, |
BaseObject::SPtr | dof, | ||
const std::string & | filename, | ||
const std::string & | color, | ||
const Deriv3 & | translation, | ||
const Deriv3 & | rotation, | ||
const MappingType & | mappingT | ||
) |
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::getRoot | ( | ) |
Initialize the sofa library and create the root of the scene graph.
SOFA_SCENECREATOR_API Vector sofa::modeling::getVector | ( | core::ConstVecId | id, |
bool | independentOnly = true |
||
) |
Get a state vector from the scene graph. Includes only the independent state values, or also the mapped ones, depending on the flag.
void sofa::modeling::initScene | ( | Node::SPtr | _root | ) |
SOFA_SCENECREATOR_API void sofa::modeling::initScene | ( | simulation::Node::SPtr | root | ) |
Initialize the scene graph.
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::initSofa | ( | ) |
Initialize the sofa library and create the root of the scene graph.
Node::SPtr sofa::modeling::massSpringString | ( | Node::SPtr | parent, |
double | x0, | ||
double | y0, | ||
double | z0, | ||
double | x1, | ||
double | y1, | ||
double | z1, | ||
unsigned | numParticles, | ||
double | totalMass, | ||
double | stiffnessValue, | ||
double | dampingRatio | ||
) |
Create a stiff string.
SOFA_SCENECREATOR_API simulation::Node::SPtr sofa::modeling::massSpringString | ( | simulation::Node::SPtr | parent, |
double | x0, | ||
double | y0, | ||
double | z0, | ||
double | x1, | ||
double | y1, | ||
double | z1, | ||
unsigned | numParticles, | ||
double | totalMass, | ||
double | stiffnessValue = 1.0 , |
||
double | dampingRatio = 0 |
||
) |
Create a string composed of particles (at least 2) and springs.