/** * Gets a representative {@code String} of {@code denseMatrix64F} as follows: * * <pre> * / 0.253, 0.000, 0.000, 0.000, 0.554, -0.247 \ * | 0.000, 0.994, 0.000, -0.554, 0.000, 0.387 | * | 0.000, 0.000, 0.084, 0.247, -0.387, 0.000 | * | 0.000, -0.554, 0.247, 0.773, 0.000, 0.000 | * | 0.554, 0.000, -0.387, 0.000, 0.773, 0.000 | * \-0.247, 0.387, 0.000, 0.000, 0.000, 0.773 / * </pre> * * @param denseMatrix64F the object to get the {@code String} of. Not modified. * @return the representative {@code String}. */ public static String getDenseMatrix64FString(DenseMatrix64F denseMatrix64F) { return getDenseMatrix64FString(DEFAULT_FORMAT, denseMatrix64F); }
/** * Returns a representative for this articulated-body inertia as follows: * * <pre> * Articulated-body inertia expressed in frameName * / 0.253, 0.000, 0.000, 0.000, 0.554, -0.247 \ * | 0.000, 0.994, 0.000, -0.554, 0.000, 0.387 | * | 0.000, 0.000, 0.084, 0.247, -0.387, 0.000 | * | 0.000, -0.554, 0.247, 0.773, 0.000, 0.000 | * | 0.554, 0.000, -0.387, 0.000, 0.773, 0.000 | * \-0.247, 0.387, 0.000, 0.000, 0.000, 0.773 / * </pre> * * @return the representative string for this inertia. */ @Override public String toString() { DenseMatrix64F matrix = new DenseMatrix64F(6, 6); get(matrix); return "Articulated-body inertia expressed in " + expressedInFrame + "\n" + MecanoIOTools.getDenseMatrix64FString(matrix); } }
spatialInertia.get(inertiaMatrix); return "Spatial inertia of " + spatialInertia.getBodyFrame() + " expressed in " + spatialInertia.getReferenceFrame() + ":\n" + getDenseMatrix64FString(format, inertiaMatrix);
for (int i = 3; i < 6; i++) inertiaMatrix.set(i, i, mass); return "Spatial inertia of " + bodyFrame + " expressed in " + expressedInFrame + ":\n" + getDenseMatrix64FString(format, inertiaMatrix);