ReactPhysics3D: reactphysics3d::OverlappingPairs Class Reference

| ReactPhysics3D v0.10.2 C++ Physics engine library

Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | List of all members
reactphysics3d::OverlappingPairs Class Reference

This class contains pairs of two colliders that are overlapping during the broad-phase collision detection. More...

`#include <include/reactphysics3d/engine/OverlappingPairs.h>`

## Classes
struct | ConcaveOverlappingPair
| An overlapping pair between a convex collider and a concave collider. More...
struct | ConvexOverlappingPair
| An overlapping pair between two convex colliders. More...
struct | OverlappingPair
| A base overlapping pair. More...

## Public Member Functions
| OverlappingPairs (MemoryManager &memoryManager, ColliderComponents &colliderComponents, BodyComponents &bodyComponents, RigidBodyComponents &rigidBodyComponents, Set< bodypair > &noCollisionPairs, CollisionDispatch &collisionDispatch)
| Constructor.
| ~OverlappingPairs ()
| Destructor.
| OverlappingPairs (const OverlappingPairs &pair)=delete
| Deleted copy-constructor.
OverlappingPairs & | operator= (const OverlappingPairs &pair)=delete
| Deleted assignment operator.
void | enablePair (uint64 pairId)
| Enable an overlapping pair (because at least one body of the pair is awaken or not static anymore)
void | disablePair (uint64 pairId)
| Disable an overlapping pair (because both bodies of the pair are disabled)
void | enableConvexPairWithIndex (uint64 pairIndex)
| Enable a convex overlapping pair.
void | disableConvexPairWithIndex (uint64 pairIndex)
| Disable a convex overlapping pair (because both bodies of the pair are disabled)
void | enableConcavePairWithIndex (uint64 pairIndex)
| Enable a concave overlapping pair.
void | disableConcavePairWithIndex (uint64 pairIndex)
| Disable a concave overlapping pair (because both bodies of the pair are disabled)
bool | isPairDisabled (uint64 pairId) const
| Return true if a given pair is disabled (both bodies of the pair are disabled)
uint64 | addPair (uint32 collider1Index, uint32 collider2Index, bool isConvexVsConvex)
| Add an overlapping pair.
void | removePair (uint64 pairId)
| Remove an overlapping pair.
void | removeConvexPairWithIndex (uint64 pairIndex, bool removeFromColliders=true)
| Remove a convex pair at a given index.
void | removeConcavePairWithIndex (uint64 pairIndex, bool removeFromColliders=true)
void | clearObsoleteLastFrameCollisionInfos ()
| Delete all the obsolete last frame collision info.
void | updateCollidingInPreviousFrame ()
| Set the collidingInPreviousFrame value with the collidinginCurrentFrame value for each pair.
void | setNeedToTestOverlap (uint64 pairId, bool needToTestOverlap)
| Set if we need to test a given pair for overlap.
OverlappingPair * | getOverlappingPair (uint64 pairId)
| Return a reference to an overlapping pair.

## Static Public Member Functions
static bodypair | computeBodiesIndexPair (Entity body1Entity, Entity body2Entity)
| Return the pair of bodies index of the pair.

## Detailed Description

This class contains pairs of two colliders that are overlapping during the broad-phase collision detection.

A pair is created when the two colliders start to overlap and is destroyed when they do not overlap anymore. Each contains a contact manifold that store all the contact points between the two bodies.

Once the two bodies of an overlapping pair are disabled (sleeping or static), we put the overlapping pair to the array of disabled pairs. We keep it so that we can awake the other body if one body is destroyed and we can also correclty track the lost contacts between bodies even after they go to sleep.

The documentation for this class was generated from the following files:

- include/reactphysics3d/engine/OverlappingPairs.h
- src/engine/OverlappingPairs.cpp