Interface ConstMotionProperties
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Subinterfaces:
ConstSoftBodyMotionProperties
- All Known Implementing Classes:
MotionProperties
,SoftBodyMotionProperties
Read-only access to
MotionProperties
object. (native type: const
MotionProperties)-
Method Summary
Modifier and TypeMethodDescriptionCopy the net force acting on the body.Copy the net torque acting on the body.int
Return the allowed degrees of freedom.boolean
Test whether the body is allowed to fall asleep.float
Return the angular damping coefficient.Generate a vector in which the disabled angular components are set to zero and enabled ones are set to -1.Copy the angular velocity.float
Return the gravity factor.Copy the rotation that takes the inverse-inertia diagonal to local coordinates.Copy the diagonal components of the inverse inertia matrix, assuming a dynamic body.float
Return the body's inverse mass.float
Return the body's inverse mass.float
Return the linear damping coefficient.Copy the linear velocity.Copy the inverse-inertia matrix.float
Return the maximum angular speed that the body can achieve.float
Return the maximum linear speed that the body can achieve.Return the motion quality.int
Return the number of position iterations used in the solver.int
Return the number of velocity iterations used in the solver.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getAccumulatedForce
Vec3 getAccumulatedForce()Copy the net force acting on the body. The properties are unaffected.- Returns:
- a new force vector (Newtons in system coordinates)
-
getAccumulatedTorque
Vec3 getAccumulatedTorque()Copy the net torque acting on the body. The properties are unaffected.- Returns:
- a new torque vector (Newton.meters in system coordinates)
-
getAllowedDofs
int getAllowedDofs()Return the allowed degrees of freedom. The properties are unaffected.- Returns:
- logical OR of values defined in
EAllowedDofs
-
getAllowSleeping
boolean getAllowSleeping()Test whether the body is allowed to fall asleep. The properties are unaffected.- Returns:
true
if allowed, otherwisefalse
-
getAngularDamping
float getAngularDamping()Return the angular damping coefficient. The properties are unaffected.- Returns:
- the coefficient value (in units of per second, ≥0, ≤1)
-
getAngularDofsMask
UVec4 getAngularDofsMask()Generate a vector in which the disabled angular components are set to zero and enabled ones are set to -1. The properties are unaffected.- Returns:
- a new vector
-
getAngularVelocity
Vec3 getAngularVelocity()Copy the angular velocity. The properties are unaffected.- Returns:
- a new velocity vector (radians per second in system coordinates)
-
getGravityFactor
float getGravityFactor()Return the gravity factor. The properties are unaffected.- Returns:
- the factor
-
getInertiaRotation
Quat getInertiaRotation()Copy the rotation that takes the inverse-inertia diagonal to local coordinates. The properties are unaffected.- Returns:
- a new object
-
getInverseInertiaDiagonal
Vec3 getInverseInertiaDiagonal()Copy the diagonal components of the inverse inertia matrix, assuming a dynamic body. The properties are unaffected.- Returns:
- a new vector (all components ≥0)
-
getInverseMass
float getInverseMass()Return the body's inverse mass. The properties are unaffected.- Returns:
- the value (≥0)
-
getInverseMassUnchecked
float getInverseMassUnchecked()Return the body's inverse mass. The properties are unaffected.- Returns:
- the value (≥0)
-
getLinearDamping
float getLinearDamping()Return the linear damping coefficient. The properties are unaffected.- Returns:
- the coefficient value (in units of per second, ≥0, ≤1)
-
getLinearVelocity
Vec3 getLinearVelocity()Copy the linear velocity. The properties are unaffected.- Returns:
- a new velocity vector (meters per second in system coordinates)
-
getLocalSpaceInverseInertia
Mat44 getLocalSpaceInverseInertia()Copy the inverse-inertia matrix. The properties are unaffected.- Returns:
- a new object
-
getMaxAngularVelocity
float getMaxAngularVelocity()Return the maximum angular speed that the body can achieve. The properties are unaffected.- Returns:
- the speed limit (in radians per second)
-
getMaxLinearVelocity
float getMaxLinearVelocity()Return the maximum linear speed that the body can achieve. The properties are unaffected.- Returns:
- the speed limit (in meters per second)
-
getMotionQuality
EMotionQuality getMotionQuality()Return the motion quality. The properties are unaffected.- Returns:
- an enum value (not null)
-
getNumPositionStepsOverride
int getNumPositionStepsOverride()Return the number of position iterations used in the solver. The properties are unaffected.- Returns:
- the count (>0) or 0 to use number specified in the
PhysicsSettings
-
getNumVelocityStepsOverride
int getNumVelocityStepsOverride()Return the number of velocity iterations used in the solver. The properties are unaffected.- Returns:
- the count (>0) or 0 to use number specified in the
PhysicsSettings
-