chrono::collision::ChCollisionSystemParallel Class Reference

Description

Class for collision engine based on the spatial subdivision method.

Contains both the broadphase and the narrow phase methods.

#include <ChCollisionSystemParallel.h>

Inheritance diagram for chrono::collision::ChCollisionSystemParallel:
Collaboration diagram for chrono::collision::ChCollisionSystemParallel:

Public Member Functions

 ChCollisionSystemParallel (ChParallelDataManager *dc)
 
virtual void Clear (void)
 Clears all data instanced by this algorithm if any (like persistent contact manifolds)
 
virtual void Add (ChCollisionModel *model)
 Adds a collision model to the collision engine (custom data may be allocated). More...
 
virtual void Remove (ChCollisionModel *model)
 Removes a collision model from the collision engine (custom data may be deallocated). More...
 
virtual void Run ()
 Removes all collision models from the collision engine (custom data may be deallocated). More...
 
virtual void ReportContacts (ChContactContainerBase *mcontactcontainer)
 After the Run() has completed, you can call this function to fill a 'contact container', that is an object inherited from class ChContactContainerBase. More...
 
virtual void ReportProximities (ChProximityContainerBase *mproximitycontainer)
 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 ChProximityContainerBase. More...
 
virtual bool RayHit (const ChVector<> &from, const ChVector<> &to, ChRayhitResult &mresult)
 Perform a raycast (ray-hit test with the collision models).
 
std::vector< int2 > GetOverlappingPairs ()
 
void GetOverlappingAABB (custom_vector< bool > &active_id, real3 Amin, real3 Amax)
 
void SetAABB (real3 aabbmin, real3 aabbmax)
 
bool GetAABB (real3 &aabbmin, real3 &aabbmax)
 
 ChCollisionSystemParallel (ChParallelDataManager *dc)
 
virtual void Clear (void)
 Clears all data instanced by this algorithm if any (like persistent contact manifolds)
 
virtual void Add (ChCollisionModel *model)
 Adds a collision model to the collision engine (custom data may be allocated). More...
 
virtual void Remove (ChCollisionModel *model)
 Removes a collision model from the collision engine (custom data may be deallocated). More...
 
virtual void Run ()
 Removes all collision models from the collision engine (custom data may be deallocated). More...
 
virtual void ReportContacts (ChContactContainerBase *mcontactcontainer)
 After the Run() has completed, you can call this function to fill a 'contact container', that is an object inherited from class ChContactContainerBase. More...
 
virtual void ReportProximities (ChProximityContainerBase *mproximitycontainer)
 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 ChProximityContainerBase. More...
 
virtual bool RayHit (const ChVector<> &from, const ChVector<> &to, ChRayhitResult &mresult)
 Perform a raycast (ray-hit test with the collision models).
 
std::vector< vec2 > GetOverlappingPairs ()
 
void GetOverlappingAABB (custom_vector< char > &active_id, real3 Amin, real3 Amax)
 
void SetAABB (real3 aabbmin, real3 aabbmax)
 
bool GetAABB (real3 &aabbmin, real3 &aabbmax)
 
- Public Member Functions inherited from chrono::collision::ChCollisionSystem
 ChCollisionSystem (unsigned int max_objects=16000, double scene_size=500)
 
void SetBroadPhaseCallback (ChBroadPhaseCallback *mcallback)
 Sets the user ChBroadPhaseCallback to be used to tell the near-enough pairs found during the Run() execution. More...
 
void SetNarrowPhaseCallback (ChNarrowPhaseCallback *mcallback)
 Sets the used ChNarrowPhaseCallback to be used to report the contacts found during the Run() execution. More...
 
virtual void ArchiveOUT (ChArchiveOut &marchive)
 
virtual void ArchiveIN (ChArchiveIn &marchive)
 

Friends

class chrono::ChSystemParallel
 

Additional Inherited Members

- Protected Attributes inherited from chrono::collision::ChCollisionSystem
ChBroadPhaseCallbackbroad_callback
 
ChNarrowPhaseCallbacknarrow_callback
 

Member Function Documentation

void chrono::collision::ChCollisionSystemParallel::Add ( ChCollisionModel model)
virtual

Adds a collision model to the collision engine (custom data may be allocated).

Implements chrono::collision::ChCollisionSystem.

virtual void chrono::collision::ChCollisionSystemParallel::Add ( ChCollisionModel model)
virtual

Adds a collision model to the collision engine (custom data may be allocated).

Implements chrono::collision::ChCollisionSystem.

void chrono::collision::ChCollisionSystemParallel::Remove ( ChCollisionModel model)
virtual

Removes a collision model from the collision engine (custom data may be deallocated).

Implements chrono::collision::ChCollisionSystem.

virtual void chrono::collision::ChCollisionSystemParallel::Remove ( ChCollisionModel model)
virtual

Removes a collision model from the collision engine (custom data may be deallocated).

Implements chrono::collision::ChCollisionSystem.

virtual void chrono::collision::ChCollisionSystemParallel::ReportContacts ( ChContactContainerBase mcontactcontainer)
virtual

After the Run() has completed, you can call this function to fill a 'contact container', that is an object inherited from class ChContactContainerBase.

For instance ChSystem, after each Run() collision detection, calls this method multiple times for all contact containers in the system, The basic behavior of the implementation is the following: collision system will call in sequence the functions BeginAddContact(), AddContact() (x n times), EndAddContact() of the contact container. But if a special container (say, GPU enabled) is passed, a more rapid buffer copy might be performed)

Implements chrono::collision::ChCollisionSystem.

virtual void chrono::collision::ChCollisionSystemParallel::ReportContacts ( ChContactContainerBase mcontactcontainer)
virtual

After the Run() has completed, you can call this function to fill a 'contact container', that is an object inherited from class ChContactContainerBase.

For instance ChSystem, after each Run() collision detection, calls this method multiple times for all contact containers in the system, The basic behavior of the implementation is the following: collision system will call in sequence the functions BeginAddContact(), AddContact() (x n times), EndAddContact() of the contact container. But if a special container (say, GPU enabled) is passed, a more rapid buffer copy might be performed)

Implements chrono::collision::ChCollisionSystem.

virtual void chrono::collision::ChCollisionSystemParallel::ReportProximities ( ChProximityContainerBase mproximitycontainer)
virtual

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 ChProximityContainerBase.

For instance ChSystem, after each Run() collision detection, calls this method multiple times for all proximity containers in the system, The basic behavior of the implementation is the following: collision system will call in sequence the functions BeginAddProximities(), AddProximity() (x n times), EndAddProximities() of the proximity container. But if a special container (say, GPU enabled) is passed, a more rapid buffer copy might be performed)

Implements chrono::collision::ChCollisionSystem.

virtual void chrono::collision::ChCollisionSystemParallel::ReportProximities ( ChProximityContainerBase mproximitycontainer)
virtual

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 ChProximityContainerBase.

For instance ChSystem, after each Run() collision detection, calls this method multiple times for all proximity containers in the system, The basic behavior of the implementation is the following: collision system will call in sequence the functions BeginAddProximities(), AddProximity() (x n times), EndAddProximities() of the proximity container. But if a special container (say, GPU enabled) is passed, a more rapid buffer copy might be performed)

Implements chrono::collision::ChCollisionSystem.

void chrono::collision::ChCollisionSystemParallel::Run ( )
virtual

Removes all collision models from the collision engine (custom data may be deallocated).

Run the algorithm and finds all the contacts. (Contacts will be managed by the Bullet persistent contact cache).

Implements chrono::collision::ChCollisionSystem.

virtual void chrono::collision::ChCollisionSystemParallel::Run ( )
virtual

Removes all collision models from the collision engine (custom data may be deallocated).

Run the algorithm and finds all the contacts. (Contacts will be managed by the Bullet persistent contact cache).

Implements chrono::collision::ChCollisionSystem.