/** {@inheritDoc} */ @Override default void setJointAccelerationToZero() { getJointAngularAcceleration().setToZero(); }
/** {@inheritDoc} */ @Override default void setJointTwistToZero() { getJointAngularVelocity().setToZero(); }
/** {@inheritDoc} */ @Override default void setJointTauToZero() { getJointTorque().setToZero(); }
/** * Sets all the components of this spatial inertia to zero. */ @Override default void setToZero() { getMomentOfInertia().setToZero(); setMass(0.0); getCenterOfMassOffset().setToZero(); }
/** * Sets the moment of inertia to a diagonal matrix, sets the mass to the given value, and sets * the center of mass offset to zero. * <p> * Use this method if {@code expressedInFrame} has origin that coincides with the center of mass * and has its axes aligned with the principal directions of the inertia ellipsoid. * </p> * * @param bodyFrame what we are specifying the inertia of. * @param expressedInFrame the new reference frame in which this spatial inertia is expressed. * @param Ixx the moment of inertia around the x-axis. * @param Iyy the moment of inertia around the y-axis. * @param Izz the moment of inertia around the z-axis. * @param mass the new mass value. */ default void setIncludingFrame(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, double Ixx, double Iyy, double Izz, double mass) { setBodyFrame(bodyFrame); setReferenceFrame(expressedInFrame); setMomentOfInertia(Ixx, Iyy, Izz); setMass(mass); getCenterOfMassOffset().setToZero(); }
/** * Sets the moment of inertia and mass to the given ones and sets the center of mass offset. * <p> * Use this method if {@code expressedInFrame} has origin that coincides with the center of mass. * </p> * * @param bodyFrame what we are specifying the inertia of. * @param expressedInFrame the new reference frame in which this spatial inertia is expressed. * @param momentOfInertia the 3 by 3 moment of inertia matrix. Not modified. * @param mass the new mass value. */ default void setIncludingFrame(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, Matrix3DReadOnly momentOfInertia, double mass) { setBodyFrame(bodyFrame); setReferenceFrame(expressedInFrame); getMomentOfInertia().set(momentOfInertia); setMass(mass); getCenterOfMassOffset().setToZero(); }
getAngularPart().set(angularPart); else getAngularPart().setToZero(); addCrossToAngularPart(pointOfApplication, linearPart);