Interface ConstPhysicsSettings
- All Superinterfaces:
AutoCloseable,Comparable<JoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Implementing Classes:
PhysicsSettings
Read-only access to a
PhysicsSettings object. (native type: const
PhysicsSettings)-
Method Summary
Modifier and TypeMethodDescriptionbooleanTest whether objects can fall asleep.floatReturn the Baumgarte stabilization factor, the fraction of position error that is corrected in each iteration.floatReturn the maximum rotation for reusing collision results from the previous step.floatReturn the maximum translation for re-using collision results from the previous step.booleanTest whether collisions with non-active (shared) edges are checked.booleanTest whether warm starting is enabled for constraints.floatReturn the maximum angle between normals for which manifolds from different sub shapes of the same body pair will be combined.floatReturn the maximum translation of a contact point for warm starting.booleanTest whether physics simulation is deterministic.floatReturn the amount of penetration tolerated by aLinearCastcast.floatReturn the amount of translation that triggers casting forLinearCastmotion quality.floatReturn the tolerance used to determine whether 2 points are coplanar when calculating the contact manifold between 2 faces.intReturn the maximum number of in-flight body pairs.floatReturn the maximum distance to correct in a single iteration when solving position constraints.floatReturn the minimum normal speed for elastic collision.intReturn the number of solver position iterations per simulation step.intReturn the number of velocity iterations per simulation step.floatReturn the penetration slop.floatReturn the point-motion threshold, below which objects can fall asleep.floatReturn the speculative contact distance.intReturn the maximum number of step-listener batches notified by a single job.intReturn the maximum number of step listeners notified in a single batch.floatReturn the time interval before a body can fall asleep.booleanTest whether the body-pair cache is enabled.booleanTest whether island splitting is enabled.booleanTest whether manifold reduction is enabled.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getAllowSleeping
boolean getAllowSleeping()Test whether objects can fall asleep. The settings are unaffected.- Returns:
trueif sleeping is allowed, otherwisefalse
-
getBaumgarte
float getBaumgarte()Return the Baumgarte stabilization factor, the fraction of position error that is corrected in each iteration. The settings are unaffected.- Returns:
- the fraction (≥0, ≤1)
-
getBodyPairCacheCosMaxDeltaRotationDiv2
float getBodyPairCacheCosMaxDeltaRotationDiv2()Return the maximum rotation for reusing collision results from the previous step. The settings are unaffected.- Returns:
- the cosine of half the maximum rotation angle (≥0, ≤1)
-
getBodyPairCacheMaxDeltaPositionSq
float getBodyPairCacheMaxDeltaPositionSq()Return the maximum translation for re-using collision results from the previous step. The settings are unaffected.- Returns:
- the square of the maximum displacement (in square meters, ≥0)
-
getCheckActiveEdges
boolean getCheckActiveEdges()Test whether collisions with non-active (shared) edges are checked. The settings are unaffected.- Returns:
trueif checked, otherwisefalse
-
getConstraintWarmStart
boolean getConstraintWarmStart()Test whether warm starting is enabled for constraints. The settings are unaffected.- Returns:
trueif enabled, otherwisefalse
-
getContactNormalCosMaxDeltaRotation
float getContactNormalCosMaxDeltaRotation()Return the maximum angle between normals for which manifolds from different sub shapes of the same body pair will be combined. The settings are unaffected.- Returns:
- the cosine of the threshold angle (≥-1, ≤1)
-
getContactPointPreserveLambdaMaxDistSq
float getContactPointPreserveLambdaMaxDistSq()Return the maximum translation of a contact point for warm starting. The settings are unaffected.- Returns:
- the square of the threshold distance (in meters squared, ≥0)
-
getDeterministicSimulation
boolean getDeterministicSimulation()Test whether physics simulation is deterministic. The settings are unaffected.- Returns:
trueif it is deterministic, otherwisefalse
-
getLinearCastMaxPenetration
float getLinearCastMaxPenetration()Return the amount of penetration tolerated by aLinearCastcast. The settings are unaffected.- Returns:
- the penetration distance (as a fraction of the body's inner radius, ≥0)
-
getLinearCastThreshold
float getLinearCastThreshold()Return the amount of translation that triggers casting forLinearCastmotion quality. The settings are unaffected.- Returns:
- the translation distance per step (as a fraction of the body's inner radius, ≥0)
-
getManifoldTolerance
float getManifoldTolerance()Return the tolerance used to determine whether 2 points are coplanar when calculating the contact manifold between 2 faces. The settings are unaffected.- Returns:
- the distance (in meters, ≥0)
-
getMaxInFlightBodyPairs
int getMaxInFlightBodyPairs()Return the maximum number of in-flight body pairs. The settings are unaffected.- Returns:
- the limit (≥0)
-
getMaxPenetrationDistance
float getMaxPenetrationDistance()Return the maximum distance to correct in a single iteration when solving position constraints. The settings are unaffected.- Returns:
- the distance per iteration (in meters, ≥0)
-
getMinVelocityForRestitution
float getMinVelocityForRestitution()Return the minimum normal speed for elastic collision. The settings are unaffected.- Returns:
- the speed threshold (in meters per second, ≥0)
-
getNumPositionSteps
int getNumPositionSteps()Return the number of solver position iterations per simulation step. The settings are unaffected.- Returns:
- the number (≥0)
-
getNumVelocitySteps
int getNumVelocitySteps()Return the number of velocity iterations per simulation step. The settings are unaffected.- Returns:
- the number (≥0)
-
getPenetrationSlop
float getPenetrationSlop()Return the penetration slop. The settings are unaffected.- Returns:
- the slop distance (in meters)
-
getPointVelocitySleepThreshold
float getPointVelocitySleepThreshold()Return the point-motion threshold, below which objects can fall asleep. The settings are unaffected.- Returns:
- the speed threshold (in meters per second, ≥0)
-
getSpeculativeContactDistance
float getSpeculativeContactDistance()Return the speculative contact distance. The settings are unaffected.- Returns:
- the distance (in meters, ≥0)
-
getStepListenerBatchesPerJob
int getStepListenerBatchesPerJob()Return the maximum number of step-listener batches notified by a single job. The settings are unaffected.- Returns:
- the number of batches per job (>0), or
INT_MAXto serialize step listeners
-
getStepListenersBatchSize
int getStepListenersBatchSize()Return the maximum number of step listeners notified in a single batch. The settings are unaffected.- Returns:
- the number of listeners (>0)
-
getTimeBeforeSleep
float getTimeBeforeSleep()Return the time interval before a body can fall asleep. The settings are unaffected.- Returns:
- the interval (in seconds, ≥0)
-
getUseBodyPairContactCache
boolean getUseBodyPairContactCache()Test whether the body-pair cache is enabled. The settings are unaffected.- Returns:
trueif it is enabled, otherwisefalse
-
getUseLargeIslandSplitter
boolean getUseLargeIslandSplitter()Test whether island splitting is enabled. The settings are unaffected.- Returns:
trueif enabled, otherwisefalse
-
getUseManifoldReduction
boolean getUseManifoldReduction()Test whether manifold reduction is enabled. The settings are unaffected.- Returns:
trueif enabled, otherwisefalse
-