If a hypothetical Lua implementation declared these functions as
noreturn for better codegen, it might also want to change the return
type to void for better compiler compatibility.
The Jolt already asserts these values, which results in crash instead
of helpful error message.
For cone joint the value out of range will now throw error instead of
silent clamp.
joltc's current CMakeLists forces itself to build as a shared library on
PC/Android. However, it builds Jolt using the current value of
BUILD_SHARED_LIBS.
We currently have BUILD_SHARED_LIBS set to ON when adding joltc, so we
end up with 2 shared libraries, which is cumbersome. We'd rather just
have a single library for Jolt. So instead, let's set BUILD_SHARED_LIBS
to off when adding the project, which will build Jolt as a static
library and joltc as a shared library (linking to the static library).
That way we just end up with a single shared library that contains both
joltc and Jolt.
- All of the mass properties have regular getters/setters
- :get/setMass
- :get/setInertia
- :get/setCenterOfMass
- You can use nil for any of the setters to set the mass property to an
"automatic" value, computed from the shape and/or other overridden
mass properties.
- If you override the mass properties, we assume you know what you're
doing and don't try to be sneaky and auto-update downstream values.
So changing the mass or center of mass doesn't auto-scale the inertia.
- If you change the shape (or enabled axes), mass data gets reset.
- You can use :resetMass to reset all 3 mass properties at once. It's
also useful if something about the underlying shape changed.