HermiteSplineProjectiveConstraint
Apply a hermite cubic spline trajectory to given points.
Rigid3d
Templates:
- Rigid3d
Target: Sofa.Component.Constraint.Projective
namespace: sofa::component::constraint::projective
parents:
- ProjectiveConstraintSet
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 |
group | ID of the group containing this constraint. This ID is used to specify which constraints are solved by which solver, by specifying in each solver which groups of constraints it should handle. | 0 |
endTime | The constraint stops acting after the given value. Use a negative value for infinite constraints | -1 |
indices | Indices of the constrained points | |
BeginTime | Begin Time of the motion | |
EndTime | End Time of the motion | |
X0 | first control point | |
dX0 | first control tangente | |
X1 | second control point | |
dX1 | second control tangente | |
SX0 | first interpolation vector | |
SX1 | second interpolation vector |
Links
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 |
mechanicalStates | List of mechanical states to which this component is associated | BaseMechanicalState |
mstate | MechanicalState used by this component | MechanicalState<Rigid3d> |
topology | link to the topology container | BaseMeshTopology |
Vec3d
Templates:
- Vec3d
Target: Sofa.Component.Constraint.Projective
namespace: sofa::component::constraint::projective
parents:
- ProjectiveConstraintSet
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 |
group | ID of the group containing this constraint. This ID is used to specify which constraints are solved by which solver, by specifying in each solver which groups of constraints it should handle. | 0 |
endTime | The constraint stops acting after the given value. Use a negative value for infinite constraints | -1 |
indices | Indices of the constrained points | |
BeginTime | Begin Time of the motion | |
EndTime | End Time of the motion | |
X0 | first control point | |
dX0 | first control tangente | |
X1 | second control point | |
dX1 | second control tangente | |
SX0 | first interpolation vector | |
SX1 | second interpolation vector |
Links
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 |
mechanicalStates | List of mechanical states to which this component is associated | BaseMechanicalState |
mstate | MechanicalState used by this component | MechanicalState<Vec3d> |
topology | link to the topology container | BaseMeshTopology |
Examples
HermiteSplineProjectiveConstraint.scn
<Node name="root" gravity="0 -9.81 0" dt="0.01" time="0" animate="0" bbox="-1 -1 -1 1 1 1">
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [HermiteSplineProjectiveConstraint] -->
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [UniformMass] -->
<RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
<VisualStyle displayFlags="showVisual showBehaviorModels showForceFields" />
<DefaultAnimationLoop/>
<EulerImplicitSolver name="cg_odesolver" printLog="false" rayleighStiffness="0" rayleighMass="0" />
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
<MechanicalObject template="Vec3" showObject="1" drawMode="1">
<Attribute type="name">
<Data value="particleDOF" />
</Attribute>
<Attribute type="position">
<Data value="0 0 0" />
</Attribute>
<Attribute type="velocity">
<Data value="0 10 0" />
</Attribute>
<Attribute type="derivX">
<Data value="0 0 0" />
</Attribute>
<Attribute type="free_position">
<Data value="0 0 0" />
</Attribute>
<Attribute type="free_velocity">
<Data value="0 0 0" />
</Attribute>
<Attribute type="rest_position">
<Data value="0 0 0" />
</Attribute>
<Attribute type="translation">
<Data value="0 0 0" />
</Attribute>
<Attribute type="rotation">
<Data value="0 0 0" />
</Attribute>
<Attribute type="scale">
<Data value="1" />
</Attribute>
</MechanicalObject>
<HermiteSplineProjectiveConstraint template="Vec3">
<Attribute type="name">
<Data value="thierry" />
</Attribute>
<Attribute type="indices">
<Data value="0" />
</Attribute>
<Attribute type="BeginTime">
<Data value="0" />
</Attribute>
<Attribute type="EndTime">
<Data value="5" />
</Attribute>
<Attribute type="X0">
<Data value="0 0 0" />
</Attribute>
<Attribute type="dX0">
<Data value="0 10 0" />
</Attribute>
<Attribute type="X1">
<Data value="5 0 0" />
</Attribute>
<Attribute type="dX1">
<Data value="0 5 0" />
</Attribute>
<Attribute type="SX0">
<Data value="1 0" />
</Attribute>
<Attribute type="SX1">
<Data value="0 2" />
</Attribute>
</HermiteSplineProjectiveConstraint>
<UniformMass >
<Attribute type="name">
<Data value="particleMass" />
</Attribute>
<Attribute type="totalMass">
<Data value="1" />
</Attribute>
</UniformMass>
</Node>
def createScene(root_node):
root = root_node.addChild('root', gravity="0 -9.81 0", dt="0.01", time="0", animate="0", bbox="-1 -1 -1 1 1 1")
root.addObject('RequiredPlugin', name="Sofa.Component.Constraint.Projective")
root.addObject('RequiredPlugin', name="Sofa.Component.LinearSolver.Iterative")
root.addObject('RequiredPlugin', name="Sofa.Component.Mass")
root.addObject('RequiredPlugin', name="Sofa.Component.ODESolver.Backward")
root.addObject('RequiredPlugin', name="Sofa.Component.StateContainer")
root.addObject('RequiredPlugin', name="Sofa.Component.Visual")
root.addObject('VisualStyle', displayFlags="showVisual showBehaviorModels showForceFields")
root.addObject('DefaultAnimationLoop', )
root.addObject('EulerImplicitSolver', name="cg_odesolver", printLog="false", rayleighStiffness="0", rayleighMass="0")
root.addObject('CGLinearSolver', iterations="25", name="linear solver", tolerance="1.0e-9", threshold="1.0e-9")
root.addObject('MechanicalObject', template="Vec3", showObject="1", drawMode="1")
root.addObject('HermiteSplineProjectiveConstraint', template="Vec3")
root.addObject('UniformMass', )