chrono::ChReportContactCallback Class Referenceabstract

Description

Class to be used as a callback interface for some user defined action to be taken for each contact (already added to the container, maybe with already computed forces).

The user should implement an inherited class and implement a custom ReportContactCallback() function.

#include <ChContactContainerBase.h>

Inheritance diagram for chrono::ChReportContactCallback:

Public Member Functions

virtual bool ReportContactCallback (const ChVector<> &pA, const ChVector<> &pB, const ChMatrix33<> &plane_coord, const double &distance, const ChVector<> &react_forces, const ChVector<> &react_torques, ChContactable *contactobjA, ChContactable *contactobjB)=0
 Callback, used to report contact points already added to the container. More...
 

Member Function Documentation

virtual bool chrono::ChReportContactCallback::ReportContactCallback ( const ChVector<> &  pA,
const ChVector<> &  pB,
const ChMatrix33<> &  plane_coord,
const double &  distance,
const ChVector<> &  react_forces,
const ChVector<> &  react_torques,
ChContactable contactobjA,
ChContactable contactobjB 
)
pure virtual

Callback, used to report contact points already added to the container.

This must be implemented by a child class of ChReportContactCallback. If returns false, the contact scanning will be stopped.

Parameters
pAget contact pA
pBget contact pB
plane_coordget contact plane coordsystem (A column 'X' is contact normal)
distanceget contact distance
react_forcesget react.forces (if already computed). In coordsystem 'plane_coord'
react_torquesget react.torques, if rolling friction (if already computed).
contactobjAget model A (note: some containers may not support it and could be zero!)
contactobjBget model B (note: some containers may not support it and could be zero!)