siconos.mechanics.collision.base#
Module documentation
- class siconos.mechanics.collision.base.nullDeleter(*args, **kwargs)[source]#
Bases:
object
- Using a shared_ptr to hold a pointer to a statically allocated
object use create<type>SPtr(<type> &x) cf http://www.boost.org/doc/
- class siconos.mechanics.collision.base.SiconosContactor(*args)[source]#
Bases:
object
Class to hold the shape assigned to a body, and to associate each shape with an offset and collision group.
- class siconos.mechanics.collision.base.ContactR[source]#
Bases:
NewtonEuler3DR
constructor
- computeh(time, q0, y)[source]#
to compute the output y = h(t,q,z) of the Relation
- Parameters:
time (float) – current time value
q – coordinates of the dynamical systems involved in the relation
y (
SiconosVector
) – the resulting vector
- updateContactPoints(pos1, pos2, normal)[source]#
Update this contact point information.
- Parameters:
pos1 (
SiconosVector
) – Position on ds1 in ds1 frame.pos2 (
SiconosVector
) – Position on ds2 in ds2 frame (or world frame if ds2=null).normal (
SiconosVector
) – Normal in ds2 frame (or world frame if ds2=null).
- class siconos.mechanics.collision.base.RigidBodyDS(*args)[source]#
Bases:
NewtonEulerDS
Overload 1: Default constructor
Overload 2: constructor from a minimum set of data
- Parameters:
position (
SiconosVector
) – initial coordinates of this DynamicalSystemtwist (
SiconosVector
) – initial twist of this DynamicalSystemmass (float) – the mass
inertia (
SiconosMatrix
) – the inertia matrix
- contactors()[source]#
Access the contactor set associated with this body.
- Return type:
SiconosContactorSet
- Returns:
A SP::SiconosContactorSet
- class siconos.mechanics.collision.base.Contact5DR[source]#
Bases:
NewtonEuler5DR
constructor
- computeh(time, q0, y)[source]#
to compute the output y = h(t,q) of the Relation
- Parameters:
time (float) – current time value
q – coordinates of the dynamical systems involved in the relation
y (
SiconosVector
) – the resulting vector
- updateContactPoints(pos1, pos2, normal)[source]#
Update this contact point information.
- Parameters:
pos1 (
SiconosVector
) – Position on ds1 in ds1 frame.pos2 (
SiconosVector
) – Position on ds2 in ds2 frame (or world frame if ds2=null).normal (
SiconosVector
) – Normal in ds2 frame (or world frame if ds2=null).
- class siconos.mechanics.collision.base.RigidBody2dDS(*args)[source]#
Bases:
LagrangianLinearTIDS
Overload 1: default constructor
Overload 2: constructor from initial state and all matrix operators.
- Parameters:
q0 (
SiconosVector
) – initial coordinatesv0 (
SiconosVector
) – initial velocityM (
SiconosMatrix
) – mass matrixK (
SiconosMatrix
) – stiffness matrixC (
SiconosMatrix
) – damping matrix
Overload 3: constructor from initial state and mass matrix only. Leads to \(M\dot v = F_{ext}(t,z) + p\) .
- Parameters:
q0 (
SiconosVector
) – initial coordinatesv0 (
SiconosVector
) – initial velocityM (
SiconosMatrix
) – mass matrix
- contactors()[source]#
- Return type:
SiconosContactorSet
- Returns:
the contactor set associated with this body
- class siconos.mechanics.collision.base.SiconosCollisionQueryResult[source]#
Bases:
object
Holds one result of a line segment intersection query against the graph of body contactors maintained by a SiconosCollisionManager
- property distance#
Distance from reference point (start of line segment or query center)
- property body#
Body owning the contactor that was intersected, may be null for static contactors.
- property shape#
The shape that was intersected.
- property contactor#
The contactor that was intersected.
- property point#
Closest point on contactor in world coordinates.