MULTIBODY SIMULATION SOFTWARE - API documentation

chrono::collision::ChCollisionSystem Class Reference

#include <CHcCollisionSystem.h>

Inheritance diagram for chrono::collision::ChCollisionSystem:

Inheritance graph
[legend]
Collaboration diagram for chrono::collision::ChCollisionSystem:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChCollisionSystem (unsigned int max_objects=16000, double scene_size=500)
virtual void SetContactContainer (ChContactContainerBase *mc)
virtual
ChContactContainerBase
GetContactContainer ()
virtual void Clear (void)=0
virtual void Add (ChCollisionModel *model)=0
virtual void Remove (ChCollisionModel *model)=0
virtual void Run ()=0
void SetBroadPhaseCallback (ChBroadPhaseCallback *mcallback)
void SetNarrowPhaseCallback (ChNarrowPhaseCallback *mcallback)
virtual bool RayHit (const ChVector<> &from, const ChVector<> &to, ChRayhitResult &mresult)=0

Protected Attributes

ChContactContainerBasecontact_container
ChBroadPhaseCallbackbroad_callback
ChNarrowPhaseCallbacknarrow_callback

Classes

struct  ChRayhitResult
 This will be used to recover results from RayHit() raycasting. More...


Detailed Description

Base class for generic collision engine. Most methods are 'pure virtual': they need to be implemented by child classes.

Member Function Documentation

virtual void chrono::collision::ChCollisionSystem::Clear ( void   )  [pure virtual]

Clears all data instanced by this algorithm if any (like persistent contact manifolds)

Implemented in chrono::collision::ChCollisionSystemBullet, and chrono::collision::ChCollisionSystemGPU.

virtual void chrono::collision::ChCollisionSystem::Add ( ChCollisionModel model  )  [pure virtual]

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

Implemented in chrono::collision::ChCollisionSystemBullet, and chrono::collision::ChCollisionSystemGPU.

virtual void chrono::collision::ChCollisionSystem::Remove ( ChCollisionModel model  )  [pure virtual]

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

Implemented in chrono::collision::ChCollisionSystemBullet, and chrono::collision::ChCollisionSystemGPU.

virtual void chrono::collision::ChCollisionSystem::Run (  )  [pure virtual]

Removes all collision models from the collision engine (custom data may be deallocated). RUN THE ALGORITHM and finds the contacts. This is the most important function - it will be called at each simulation step.

Implemented in chrono::collision::ChCollisionSystemBullet, and chrono::collision::ChCollisionSystemGPU.

void chrono::collision::ChCollisionSystem::SetBroadPhaseCallback ( ChBroadPhaseCallback mcallback  ) 

Sets the user ChBroadPhaseCallback to be used to tell the near-enough pairs found during the Run() execution. It will be executed for near enough pair of bodies.

void chrono::collision::ChCollisionSystem::SetNarrowPhaseCallback ( ChNarrowPhaseCallback mcallback  ) 

Sets the used ChNarrowPhaseCallback to be used to report the contacts found during the Run() execution. It will be executed for each contact point.

virtual bool chrono::collision::ChCollisionSystem::RayHit ( const ChVector<> &  from,
const ChVector<> &  to,
ChRayhitResult mresult 
) [pure virtual]

Perform a ray-hit test with the collision models.


CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on 17 Jul 2009 by Doxygen