Skip to main content

DynamicTreeCollisionProcessor

Responsible for performing the collision broadphase (locating potential collisions) and the narrowphase (actual collision contacts)

Implements

Index

Constructors

constructor

  • new DynamicTreeCollisionProcessor(_config: Required<{ arcade?: Required<{ contactSolveBias?: ContactSolveBias }>; bodies?: Required<{ canSleepByDefault?: boolean; defaultMass?: number; sleepBias?: number; sleepEpsilon?: number; wakeThreshold?: number }>; colliders?: Required<{ compositeStrategy?: separate | together }>; continuous?: Required<{ checkForFastBodies?: boolean; disableMinimumSpeedForFastBody?: boolean; surfaceEpsilon?: number }>; dynamicTree?: Required<{ boundsPadding?: number; velocityMultiplier?: number }>; enabled?: boolean; gravity?: Vector; realistic?: Required<{ positionIterations?: number; slop?: number; steeringFactor?: number; velocityIterations?: number; warmStart?: boolean }>; solver?: SolverStrategy; sparseHashGrid?: SparseHashGridConfig; spatialPartition?: SpatialPartitionStrategy }>): DynamicTreeCollisionProcessor
  • Parameters

    • _config: Required<{ arcade?: Required<{ contactSolveBias?: ContactSolveBias }>; bodies?: Required<{ canSleepByDefault?: boolean; defaultMass?: number; sleepBias?: number; sleepEpsilon?: number; wakeThreshold?: number }>; colliders?: Required<{ compositeStrategy?: separate | together }>; continuous?: Required<{ checkForFastBodies?: boolean; disableMinimumSpeedForFastBody?: boolean; surfaceEpsilon?: number }>; dynamicTree?: Required<{ boundsPadding?: number; velocityMultiplier?: number }>; enabled?: boolean; gravity?: Vector; realistic?: Required<{ positionIterations?: number; slop?: number; steeringFactor?: number; velocityIterations?: number; warmStart?: boolean }>; solver?: SolverStrategy; sparseHashGrid?: SparseHashGridConfig; spatialPartition?: SpatialPartitionStrategy }>

    Returns DynamicTreeCollisionProcessor

Methods

publicbroadphase

  • Detects potential collision pairs in a broadphase approach with the dynamic AABB tree strategy


    Parameters

    Returns Pair[]

publicdebug

publicgetColliders

  • Get all tracked colliders


    Returns readonly Collider[]

publicnarrowphase

  • Applies narrow phase on collision pairs to find actual area intersections Adds actual colliding pairs to stats' Frame data


    Parameters

    Returns CollisionContact[]

publicquery

  • Query the collision processor for colliders that contain the point


    Parameters

    Returns Collider[]

publicrayCast

publictrack

  • Tracks a physics body for collisions


    Parameters

    Returns void

publicuntrack

  • Untracks a physics body


    Parameters

    Returns void

publicupdate

  • Update the dynamic tree positions


    Parameters

    Returns number