Interface ConstMassProperties
- All Superinterfaces:
AutoCloseable,Comparable<JoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Implementing Classes:
MassProperties
Read-only access to a
MassProperties object. (native type: const
MassProperties)-
Method Summary
Modifier and TypeMethodDescriptionbooleandecomposePrincipalMomentsOfInertia(Mat44 storeRotation, Vec3 storeDiagonal) Decompose the inertia tensor into a diagonal matrix and a right-handed rotation matrix.Copy the inertia tensor.floatgetMass()Return the mass.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
decomposePrincipalMomentsOfInertia
Decompose the inertia tensor into a diagonal matrix and a right-handed rotation matrix. The properties are unaffected.- Parameters:
storeRotation- storage for the rotation matrix (not null, modified)storeDiagonal- storage for the diagonal matrix (not null, modified)- Returns:
trueif successful, otherwisefalse
-
getInertia
Mat44 getInertia()Copy the inertia tensor. The properties are unaffected.- Returns:
- a new matrix (in kilogram.meters squared)
-
getMass
float getMass()Return the mass. The properties are unaffected.- Returns:
- the mass (in kilograms, ≥0)
-