Jolt Physics
A multi core friendly Game Physics Engine
|
Test BroadPhase implementation that does not do anything to speed up the operations. Can be used as a reference implementation. More...
#include <BroadPhaseBruteForce.h>
Additional Inherited Members | |
Public Types inherited from BroadPhase | |
using | AddState = void * |
Handle used during adding bodies to the broadphase. | |
Protected Attributes inherited from BroadPhase | |
BodyManager * | mBodyManager = nullptr |
Link to the body manager that manages the bodies in this broadphase. | |
Test BroadPhase implementation that does not do anything to speed up the operations. Can be used as a reference implementation.
|
overridevirtual |
Finalize adding bodies to the broadphase, supply the return value of AddBodiesPrepare in inAddState. Please ensure that the ioBodies array passed to AddBodiesPrepare is unmodified and passed again to this function.
Implements BroadPhase.
|
overridevirtual |
Cast a box and add any hits to ioCollector.
Implements BroadPhaseQuery.
|
overridevirtual |
Same as BroadPhaseQuery::CastAABox but can be implemented in a way to take no broad phase locks.
Implements BroadPhase.
|
overridevirtual |
Cast a ray and add any hits to ioCollector.
Implements BroadPhaseQuery.
|
overridevirtual |
Get bodies intersecting with inBox and any hits to ioCollector.
Implements BroadPhaseQuery.
|
overridevirtual |
Get bodies intersecting with an oriented box and any hits to ioCollector.
Implements BroadPhaseQuery.
|
overridevirtual |
Get bodies intersecting with a point and any hits to ioCollector.
Implements BroadPhaseQuery.
|
overridevirtual |
Get bodies intersecting with a sphere and any hits to ioCollector.
Implements BroadPhaseQuery.
|
overridevirtual |
Find all colliding pairs between dynamic bodies Note that this function is very specifically tailored for the PhysicsSystem::Update function, hence it is not part of the BroadPhaseQuery interface. One of the assumptions it can make is that no locking is needed during the query as it will only be called during a very particular part of the update.
ioActiveBodies | is a list of bodies for which we need to find colliding pairs (this function can change the order of the ioActiveBodies array). This can be a subset of the set of active bodies in the system. |
inNumActiveBodies | is the size of the ioActiveBodies array. |
inSpeculativeContactDistance | Distance at which speculative contact points will be created. |
inObjectVsBroadPhaseLayerFilter | is the filter that determines if an object can collide with a broadphase layer. |
inObjectLayerPairFilter | is the filter that determines if two objects can collide. |
ioPairCollector | receives callbacks for every body pair found. |
Implements BroadPhase.
|
overridevirtual |
Get the bounding box of all objects in the broadphase.
Implements BroadPhase.
|
overridevirtual |
Call whenever the aabb of a body changes (can change order of ioBodies array) inTakeLock should be false if we're between LockModifications/UnlockModificiations in which case care needs to be taken to not call this between UpdatePrepare/UpdateFinalize
Implements BroadPhase.
|
overridevirtual |
Call whenever the layer (and optionally the aabb as well) of a body changes (can change order of ioBodies array)
Implements BroadPhase.
Remove inNumber bodies in ioBodies from the broadphase. ioBodies may be shuffled around by this function.
Implements BroadPhase.