/** {@inheritDoc} */ @Override default void applyInverseTransform(Transform transform) { getAngularPart().applyInverseTransform(transform); getLinearPart().applyInverseTransform(transform); } }
getAngularPart().applyInverseTransform(transform); getLinearPart().applyInverseTransform(transform);
getAngularPart().applyInverseTransform(transform); getLinearPart().applyInverseTransform(transform);
/** * Transforms this spatial inertia by the inverse of the given transform. * <p> * See the Word™ document located in the document folder of this project for more * information about the transformation rule for spatial inertia. Also see Duindam, <i>Port-Based * Modeling and Control for Efficient Bipedal Walking Robots</i>, page 40, equation (2.57) from * which the equations here were derived. * </p> */ @Override public void applyInverseTransform(Transform transform) { if (transform instanceof RigidBodyTransform) { applyInverseTransform((RigidBodyTransform) transform); } else { translation.setToZero(); translation.applyInverseTransform(transform); // Let's first apply the rotation onto the CoM and the mass moment of inertia: momentOfInertia.applyInverseTransform(transform); centerOfMassOffset.applyInverseTransform(transform); // Now we can simply apply the translation on the CoM and mass moment of inertia: MecanoTools.translateMomentOfInertia(mass, centerOfMassOffset, true, translation, momentOfInertia); centerOfMassOffset.add(translation); } }
/** * Transforms this spatial inertia by the inverse of the given transform. * <p> * See the Word™ document located in the document folder of this project for more * information about the transformation rule for spatial inertia. Also see Duindam, <i>Port-Based * Modeling and Control for Efficient Bipedal Walking Robots</i>, page 40, equation (2.57) from * which the equations here were derived. * </p> * * @param transform the transform to use on this. Not modified. */ default void applyInverseTransform(RigidBodyTransform transform) { if (transform.hasTranslation()) { // Now we can simply apply the translation on the CoM and mass moment of inertia: MecanoTools.translateMomentOfInertia(getMass(), getCenterOfMassOffset(), true, transform.getTranslationVector(), getMomentOfInertia()); getCenterOfMassOffset().sub(transform.getTranslationVector()); } if (transform.hasRotation()) { // Let's first apply the rotation onto the CoM and the mass moment of inertia: MecanoTools.inverseTransformSymmetricMatrix3D(transform.getRotationMatrix(), getMomentOfInertia()); getCenterOfMassOffset().applyInverseTransform(transform); } } }