diff --git a/src/main/java/com/github/stephengold/joltjni/MassProperties.java b/src/main/java/com/github/stephengold/joltjni/MassProperties.java index 6aae8240..7ee72c9b 100644 --- a/src/main/java/com/github/stephengold/joltjni/MassProperties.java +++ b/src/main/java/com/github/stephengold/joltjni/MassProperties.java @@ -99,21 +99,27 @@ public void scaleToMass(float mass) { * Alter the inertia tensor. (native attribute: mIntertia) * * @param inertia the desired value (not null, unaffected, default=zero) + * @return the modified properties (for chaining) */ - public void setInertia(Mat44Arg inertia) { + public MassProperties setInertia(Mat44Arg inertia) { long propertiesVa = va(); long matrixVa = inertia.va(); setInertia(propertiesVa, matrixVa); + + return this; } /** * Alter the mass. (native attribute: mMass) * * @param mass the desired mass (in kilograms, ≥0, default=0) + * @return the modified properties (for chaining) */ - public void setMass(float mass) { + public MassProperties setMass(float mass) { long propertiesVa = va(); setMass(propertiesVa, mass); + + return this; } /**