chrono::collision::ChCollisionSystemDistributed Class Reference

Description

This class scaffolds on ChCollisionSystemParallel in order to manage collision data for the system during MPI exchanges.

Maintains a mapping from a body to its shapes.

#include <ChCollisionSystemDistributed.h>

Inheritance diagram for chrono::collision::ChCollisionSystemDistributed:
Collaboration diagram for chrono::collision::ChCollisionSystemDistributed:

Public Member Functions

 ChCollisionSystemDistributed (ChParallelDataManager *dm, ChDistributedDataManager *ddm)
 
virtual void Add (ChCollisionModel *model) override
 Adds the collision model to the collision system and creates a mapping entry from the associated body to its collision shapes.
 
virtual void Remove (ChCollisionModel *model) override
 Deactivates the body in the data manager of chrono::parallel and marks the space as free.
 
virtual void GetOverlappingAABB (custom_vector< char > &active_id, real3 Amin, real3 Amax) override
 Mark bodies whose AABB is contained within the specified box.
 
- Public Member Functions inherited from chrono::collision::ChCollisionSystemParallel
 ChCollisionSystemParallel (ChParallelDataManager *dc)
 
virtual void Clear (void) override
 Clears all data instanced by this algorithm if any (like persistent contact manifolds). More...
 
virtual void Run () override
 Removes all collision models from the collision engine (custom data may be deallocated). More...
 
virtual double GetTimerCollisionBroad () const override
 Return the time (in seconds) for broadphase collision detection.
 
virtual double GetTimerCollisionNarrow () const override
 Return the time (in seconds) for narrowphase collision detection.
 
virtual void ReportContacts (ChContactContainer *mcontactcontainer) override
 After the Run() has completed, you can call this function to fill a 'contact container', that is an object inherited from class ChContactContainer. More...
 
virtual void ReportProximities (ChProximityContainer *mproximitycontainer) override
 After the Run() has completed, you can call this function to fill a 'proximity container' (container of narrow phase pairs), that is an object inherited from class ChProximityContainer. More...
 
virtual bool RayHit (const ChVector<> &from, const ChVector<> &to, ChRayhitResult &mresult) const override
 Perform a ray-hit test with all collision models. More...
 
virtual bool RayHit (const ChVector<> &from, const ChVector<> &to, ChCollisionModel *model, ChRayhitResult &mresult) const override
 Perform a ray-hit test with the specified collision model. More...
 
void SetAABB (real3 aabbmin, real3 aabbmax)
 Set and enable "active" box. More...
 
bool GetAABB (real3 &aabbmin, real3 &aabbmax)
 Get the dimensions of the "active" box. More...
 
virtual std::vector< vec2 > GetOverlappingPairs ()
 Return the pairs of IDs for overlapping contact shapes.
 
- Public Member Functions inherited from chrono::collision::ChCollisionSystem
 ChCollisionSystem (unsigned int max_objects=16000, double scene_size=500)
 
virtual void ResetTimers ()
 Reset any timers associated with collision detection.
 
void RegisterBroadphaseCallback (BroadphaseCallback *callback)
 Specify a callback object to be used each time a pair of 'near enough' collision shapes is found by the broad-phase collision step. More...
 
void RegisterNarrowphaseCallback (NarrowphaseCallback *callback)
 Specify a callback object to be used each time a collision pair is found during the narrow-phase collision detection step. More...
 
virtual void ArchiveOUT (ChArchiveOut &marchive)
 Method to allow serialization of transient data to archives.
 
virtual void ArchiveIN (ChArchiveIn &marchive)
 Method to allow de-serialization of transient data from archives.
 

Protected Attributes

ChDistributedDataManagerddm
 
- Protected Attributes inherited from chrono::collision::ChCollisionSystem
BroadphaseCallbackbroad_callback
 user callback for each near-enough pair of shapes
 
NarrowphaseCallbacknarrow_callback
 user callback for each collision pair