Interface ConstPhysicsSettings
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
PhysicsSettings
Read-only access to a
PhysicsSettings
object. (native type: const
PhysicsSettings)-
Method Summary
Modifier and TypeMethodDescriptionboolean
Test whether objects can fall asleep.float
Return the Baumgarte stabilization factor, the fraction of position error that is corrected in each iteration.float
Return the maximum rotation for reusing collision results from the previous step.float
Return the maximum translation for re-using collision results from the previous step.boolean
Test whether collisions with non-active (shared) edges are checked.boolean
Test whether warm starting is enabled for constraints.float
Return the maximum angle between normals for which manifolds from different sub shapes of the same body pair will be combined.float
Return the maximum translation of a contact point for warm starting.boolean
Test whether physics simulation is deterministic.float
Return the amount of penetration tolerated by aLinearCast
cast.float
Return the amount of translation that triggers casting forLinearCast
motion quality.float
Return the tolerance used to determine whether 2 points are coplanar when calculating the contact manifold between 2 faces.int
Return the maximum number of in-flight body pairs.float
Return the maximum distance to correct in a single iteration when solving position constraints.float
Return the minimum normal speed for elastic collision.int
Return the number of solver position iterations per simulation step.int
Return the number of velocity iterations per simulation step.float
Return the penetration slop.float
Return the point-motion threshold, below which objects can fall asleep.float
Return the speculative contact distance.int
Return the maximum number of step-listener batches notified by a single job.int
Return the maximum number of step listeners notified in a single batch.float
Return the time interval before a body can fall asleep.boolean
Test whether the body-pair cache is enabled.boolean
Test whether island splitting is enabled.boolean
Test whether manifold reduction is enabled.Methods inherited from interface java.lang.Comparable
compareTo
Methods 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:
true
if 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:
true
if checked, otherwisefalse
-
getConstraintWarmStart
boolean getConstraintWarmStart()Test whether warm starting is enabled for constraints. The settings are unaffected.- Returns:
true
if 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:
true
if it is deterministic, otherwisefalse
-
getLinearCastMaxPenetration
float getLinearCastMaxPenetration()Return the amount of penetration tolerated by aLinearCast
cast. 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 forLinearCast
motion 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_MAX
to 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:
true
if it is enabled, otherwisefalse
-
getUseLargeIslandSplitter
boolean getUseLargeIslandSplitter()Test whether island splitting is enabled. The settings are unaffected.- Returns:
true
if enabled, otherwisefalse
-
getUseManifoldReduction
boolean getUseManifoldReduction()Test whether manifold reduction is enabled. The settings are unaffected.- Returns:
true
if enabled, otherwisefalse
-