Interface ConstContactSettings
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
ContactSettings
Read-only access to a
ContactSettings
object. (native type: const
ContactSettings)-
Method Summary
Modifier and TypeMethodDescriptionfloat
Return the combined friction for the body pair.float
Return the combined restitution for the body pair.float
Return the scale factor for the inverse inertia of body 1.float
Return the scale factor for the inverse inertia of body 2.float
Return the scale factor for the inverse mass of body 1.float
Return the scale factor for the inverse mass of body 2.boolean
Test whether the contact should be treated as a sensor (no collision response).Copy the relative angular velocity (body 2 minus body 1).Copy the relative linear velocity (body 2 minus body 1).Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getCombinedFriction
float getCombinedFriction()Return the combined friction for the body pair. The settings are unaffected.- Returns:
- the combined friction
-
getCombinedRestitution
float getCombinedRestitution()Return the combined restitution for the body pair. The settings are unaffected.- Returns:
- the combined restitution
-
getInvInertiaScale1
float getInvInertiaScale1()Return the scale factor for the inverse inertia of body 1. The settings are unaffected.- Returns:
- the factor (0 = infinite inertia, 1 = use original inertia)
-
getInvInertiaScale2
float getInvInertiaScale2()Return the scale factor for the inverse inertia of body 2. The settings are unaffected.- Returns:
- the factor (0 = infinite inertia, 1 = use original inertia)
-
getInvMassScale1
float getInvMassScale1()Return the scale factor for the inverse mass of body 1. The settings are unaffected.- Returns:
- the factor (0 = infinite mass, 1 = use original mass)
-
getInvMassScale2
float getInvMassScale2()Return the scale factor for the inverse mass of body 2. The settings are unaffected.- Returns:
- the factor (0 = infinite mass, 1 = use original mass)
-
getIsSensor
boolean getIsSensor()Test whether the contact should be treated as a sensor (no collision response). The settings are unaffected.- Returns:
true
if treated as a sensor, otherwisefalse
-
getRelativeAngularSurfaceVelocity
Vec3 getRelativeAngularSurfaceVelocity()Copy the relative angular velocity (body 2 minus body 1). The settings are unaffected.- Returns:
- a new velocity vector (radians per second in system coordinates)
-
getRelativeLinearSurfaceVelocity
Vec3 getRelativeLinearSurfaceVelocity()Copy the relative linear velocity (body 2 minus body 1). The settings are unaffected.- Returns:
- a new velocity vector (meters per second in system coordinates)
-