File mechanics/src/collision/RigidBody2dDS.hpp

Go to the source code of this file

Definition of an abstract 3D rigid body above NewtonEulerDS.

class RigidBody2dDS : public LagrangianDS, public std::enable_shared_from_this<RigidBody2dDS>

Public Functions

RigidBody2dDS(SP::SiconosVector position, SP::SiconosVector velocity, SP::SiconosMatrix mass = SP::SimpleMatrix())
RigidBody2dDS(SP::SiconosVector position, SP::SiconosVector velocity, double mass, double inertia)
virtual ~RigidBody2dDS()

visitors hook

bool allowSelfCollide()

Return the value of the _allowSelfCollide flag.

virtual SP::SiconosVector base_position()

Make the base position of the contactors equal to the DS q vector.


a SP::SiconosVector

SP::SiconosContactorSet contactors() const

Access the contactor set associated with this body.


A SP::SiconosContactorSet

double scalarMass()
void setAllowSelfCollide(bool x)

Set the value of the _allowSelfCollide flag.

void setContactors(SP::SiconosContactorSet c)

Provide a set of contactors to the body.

  • c: A SP::SiconosContactorSet

void setUseContactorInertia(bool use)
bool useContactorInertia()

Protected Functions


serialization hooks

Protected Attributes

bool _allowSelfCollide

If false, bodies connected to this body by a joint will not collide.

See also NewtonEulerJointR::_allowSelfCollide

SP::SiconosContactorSet _contactors
double _scalarMass

a scalar mass in the case of RigidBody2dDS

bool _useContactorInertia