Class PrismaticJointR

Defined in Program listing for file mechanics/src/joints/PrismaticJointR.hpp

class PrismaticJointR : public NewtonEulerJointR

This class implements a prismatic joint between one or two Newton/Euler Dynamical system.

From a given axis, we construct two unit othorgonal vectors to the axis V1 and V2 such that (axis,V1,V2) is an orthogonal frame

Public Functions


Empty constructor.

The relation may be initialized later by setPoint, setAbsolute, and setBasePositions.

PrismaticJointR(SP::SiconosVector axis, bool absoluteRef, SP::NewtonEulerDS d1 = SP::NewtonEulerDS(), SP::NewtonEulerDS d2 = SP::NewtonEulerDS())

Constructor based on one or two dynamical systems and an axis.

  • d1: first DynamicalSystem linked by the joint.

  • d2: second DynamicalSystem linked by the joint, or NULL for absolute frame.

  • axis: SiconosVector of size 3 that defines the prismatic axis.

  • absoluteRef: if true, A is in the absolute frame, otherwise A is in d1 frame.

virtual ~PrismaticJointR()


virtual void computehDoF(double time, BlockVector &q0, SiconosVector &y, unsigned int axis)

Compute the vector of linear and angular positions of the free axes.

virtual void computeJachqDoF(double time, Interaction &inter, SP::BlockVector q0, SimpleMatrix &jachq, unsigned int axis)

Compute the jacobian of linear and angular DoF with respect to some q.

virtual unsigned int numberOfConstraints()

Get the number of constraints defined in the joint.


the number of constraints

virtual unsigned int numberOfDoF()

Return the number of degrees of freedom of this joint.


the number of degrees of freedom (DoF)

virtual void setBasePositions(SP::SiconosVector q1, SP::SiconosVector q2 = SP::SiconosVector())

Initialize the joint constants based on the provided base positions.

  • q1: A SiconosVector of size 7 indicating translation and orientation in inertial coordinates.

  • q2: An optional SiconosVector of size 7 indicating translation and orientation; if null, the inertial frame will be considered as the second base.

virtual DoF_Type typeOfDoF(unsigned int axis)

Return the type of a degree of freedom of this joint.


the type of the degree of freedom (DoF)