Interface ConstMassProperties
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
MassProperties
Read-only access to a
MassProperties
object. (native type: const
MassProperties)-
Method Summary
Modifier and TypeMethodDescriptionboolean
decomposePrincipalMomentsOfInertia
(Mat44 storeRotation, Vec3 storeDiagonal) Decompose the inertia tensor into a diagonal matrix and a right-handed rotation matrix.Copy the inertia tensor.float
getMass()
Return the mass.Methods inherited from interface java.lang.Comparable
compareTo
Methods 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:
true
if 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)
-