/** * Sets the angular acceleration of this joint. * <p> * This method is ineffective for joints that cannot rotate. * </p> * <p> * As for configuration setters, the common implementation here is to project the given angular * acceleration onto the motion subspace of this joint such that not all the components of the given * acceleration may necessarily be used. * </p> * * @param jointAngularAcceleration the new angular acceleration for this joint. Unused if this joint * cannot rotate. Not modified. * @throws ReferenceFrameMismatchException if the given vector is not expressed in * {@code frameAfterJoint}. */ default void setJointAngularAcceleration(FrameVector3DReadOnly jointAngularAcceleration) { jointAngularAcceleration.checkReferenceFrameMatch(getFrameAfterJoint()); setJointAngularAcceleration((Vector3DReadOnly) jointAngularAcceleration); }
/** * Sets this joint current acceleration to the given spatial acceleration. * <p> * As for configuration setters, the common implementation here is to project the given acceleration * onto the motion subspace of this joint such that not all the components of the given spatial * acceleration may necessarily be used. * </p> * * @param jointAcceleration the new acceleration for this joint. Not modified. * @throws ReferenceFrameMismatchException if the given spatial acceleration does not have the * following frames: * <ul> * <li>{@code bodyFrame} is {@code afterJointFrame}. * <li>{@code baseFrame} is {@code beforeJointFrame}. * <li>{@code expressedInFrame} is {@code afterJointFrame}. * </ul> */ default void setJointAcceleration(SpatialAccelerationReadOnly jointAcceleration) { jointAcceleration.checkBodyFrameMatch(getFrameAfterJoint()); jointAcceleration.checkBaseFrameMatch(getFrameBeforeJoint()); jointAcceleration.checkExpressedInFrameMatch(getFrameAfterJoint()); setJointAngularAcceleration((Vector3DReadOnly) jointAcceleration.getAngularPart()); setJointLinearAcceleration((Vector3DReadOnly) jointAcceleration.getLinearPart()); }
break; case ACCELERATION: joint.setJointAngularAcceleration(EuclidCoreRandomTools.nextVector3D(random)); joint.setJointLinearAcceleration(EuclidCoreRandomTools.nextVector3D(random)); break;