Skip to content

MechanicalObject

mechanical state vectors

Templates:

  • Rigid2d
  • Rigid3d
  • Vec1d
  • Vec2d
  • Vec3d
  • Vec6d

Target: Sofa.Component.StateContainer

namespace: sofa::component::statecontainer

parents:

  • MechanicalState

Data

Name Description Default value
name object name unnamed
printLog if true, emits extra messages at runtime. 0
tags list of the subsets the object belongs to
bbox this object bounding box
componentState The state of the component among (Dirty, Valid, Undefined, Loading, Invalid). Undefined
listening if true, handle the events, otherwise ignore the events 0
restScale optional scaling of rest position coordinates (to simulated pre-existing internal tension).(default = 1.0) 1
useTopology Shall this object rely on any active topology to initialize its size and positions 1
size Size of the vectors 0
reserve Size to reserve when creating vectors. (default=0) 0
States
position position coordinates of the degrees of freedom
velocity velocity coordinates of the degrees of freedom
derivX dx vector of the degrees of freedom
reset_position reset position coordinates of the degrees of freedom
reset_velocity reset velocity coordinates of the degrees of freedom
Force
force force vector of the degrees of freedom
externalForce externalForces vector of the degrees of freedom
Rest States
rest_position rest position coordinates of the degrees of freedom
Free Motion
free_position free position coordinates of the degrees of freedom
free_velocity free velocity coordinates of the degrees of freedom
Jacobian
constraint constraints applied to the degrees of freedom
mappingJacobian mappingJacobian applied to the degrees of freedom
Visualization
showObject Show objects. (default=false) 0
showObjectScale Scale for object display. (default=0.1) 0.1
showIndices Show indices. (default=false) 0
showIndicesScale Scale for indices display. (default=0.02) 0.02
showVectors Show velocity. (default=false) 0
showVectorsScale Scale for vectors display. (default=0.0001) 0.0001
drawMode The way vectors will be drawn: - 0: Line - 1:Cylinder - 2: Arrow. The DOFS will be drawn: - 0: point - >1: sphere. (default=0) 0
showColor Color for object display. (default=[1 1 1 1]) 1 1 1 1
Transformation
translation Translation of the DOFs 0 0 0
rotation Rotation of the DOFs 0 0 0
scale3d Scale of the DOFs in 3 dimensions 1 1 1
translation2 Translation of the DOFs, applied after the rest position has been computed 0 0 0
rotation2 Rotation of the DOFs, applied the after the rest position has been computed 0 0 0
Name Description Destination type name
context Graph Node containing this object (or BaseContext::getDefault() if no graph is used) BaseContext
slaves Sub-objects used internally by this object BaseObject
master nullptr for regular objects, or master object for which this object is one sub-objects BaseObject
topology Link to the topology relevant for this object BaseMeshTopology