ReactPhysics3D: reactphysics3d::BroadPhaseSystem Class Reference

| ReactPhysics3D v0.10.2 C++ Physics engine library

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

This class represents the broad-phase collision detection. More...

`#include <include/reactphysics3d/systems/BroadPhaseSystem.h>`

## Public Member Functions
| BroadPhaseSystem (CollisionDetectionSystem &collisionDetection, ColliderComponents &collidersComponents, TransformComponents &transformComponents, RigidBodyComponents &rigidBodyComponents)
| Constructor.
| ~BroadPhaseSystem ()=default
| Destructor.
| BroadPhaseSystem (const BroadPhaseSystem &algorithm)=delete
| Deleted copy-constructor.
BroadPhaseSystem & | operator= (const BroadPhaseSystem &algorithm)=delete
| Deleted assignment operator.
void | addCollider (Collider *collider, const AABB &aabb)
| Add a collider into the broad-phase collision detection.
void | removeCollider (Collider *collider)
| Remove a collider from the broad-phase collision detection.
void | updateCollider (Entity colliderEntity)
| Update the broad-phase state of a single collider.
void | updateColliders ()
| Update the broad-phase state of all the enabled colliders.
void | addMovedCollider (int broadPhaseID, Collider *collider)
| Add a collider in the array of colliders that have moved in the last simulation step and that need to be tested again for broad-phase overlapping.
void | removeMovedCollider (int broadPhaseID)
| Remove a collider from the array of colliders that have moved in the last simulation step and that need to be tested again for broad-phase overlapping.
void | computeOverlappingPairs (MemoryManager &memoryManager, Array< Pair< int32, int32 > > &overlappingNodes)
| Compute all the overlapping pairs of collision shapes.
Collider * | getColliderForBroadPhaseId (int broadPhaseId) const
| Return the collider corresponding to the broad-phase node id in parameter.
bool | testOverlappingShapes (int32 shape1BroadPhaseId, int32 shape2BroadPhaseId) const
| Return true if the two broad-phase collision shapes are overlapping.
const AABB & | getFatAABB (int broadPhaseId) const
| Return the fat AABB of a given broad-phase shape.
void | raycast (const Ray &ray, RaycastTest &raycastTest, unsigned short raycastWithCategoryMaskBits) const
| Ray casting method.

## Detailed Description

This class represents the broad-phase collision detection.

The goal of the broad-phase collision detection is to compute the pairs of colliders that have their AABBs overlapping. Only those pairs of bodies will be tested later for collision during the narrow-phase collision detection. A dynamic AABB tree data structure is used for fast broad-phase collision detection.

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

- include/reactphysics3d/systems/BroadPhaseSystem.h
- src/systems/BroadPhaseSystem.cpp