chrono::ChContactContainer::ReportContactCallback 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).

It can be used to report or post-process contacts.

#include <ChContactContainer.h>

Inheritance diagram for chrono::ChContactContainer::ReportContactCallback:

Public Member Functions

virtual bool OnReportContact (const ChVector<> &pA, const ChVector<> &pB, const ChMatrix33<> &plane_coord, const double &distance, const double &eff_radius, 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::ChContactContainer::ReportContactCallback::OnReportContact ( const ChVector<> &  pA,
const ChVector<> &  pB,
const ChMatrix33<> &  plane_coord,
const double &  distance,
const double &  eff_radius,
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.

If it returns false, the contact scanning will be stopped.

Parameters
pAcontact pA
pBcontact pB
plane_coordcontact plane coordsystem (A column 'X' is contact normal)
distancecontact distance
eff_radiuseffective radius of curvature at contact
react_forcesreact.forces (if already computed). In coordsystem 'plane_coord'
react_torquesreact.torques, if rolling friction (if already computed).
contactobjAmodel A (note: some containers may not support it and could be nullptr)
contactobjBmodel B (note: some containers may not support it and could be nullptr)