Project Chrono: chrono::ChContactContainerNSC::ReportContactCallbackNSC Class Reference

Public Member Functions | List of all members
chrono::ChContactContainerNSC::ReportContactCallbackNSC Class Referenceabstract

## Description

Class to be used as a NSC-specific 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. It also tells the offset of the contact (first component, normal) in the vector of lagrangian multipliers, if this info is not needed, you can just use ChContactContainer::ReportContactCallback

`#include <ChContactContainerNSC.h>`

## Public Member Functions
virtual bool | OnReportContact (const ChVector3d &pA, const ChVector3d &pB, const ChMatrix33<> &plane_coord, const double &distance, const double &eff_radius, const ChVector3d &react_forces, const ChVector3d &react_torques, ChContactable *contactobjA, ChContactable *contactobjB, const int offset)=0
| Callback used to report contact points already added to the container.

## Member Function Documentation

## ◆ OnReportContact()

virtual bool chrono::ChContactContainerNSC::ReportContactCallbackNSC::OnReportContact | ( | const ChVector3d & | pA,
|  | const ChVector3d & | pB,
|  | const ChMatrix33<> & | plane_coord,
|  | const double & | distance,
|  | const double & | eff_radius,
|  | const ChVector3d & | react_forces,
|  | const ChVector3d & | react_torques,
|  | ChContactable * | contactobjA,
|  | ChContactable * | contactobjB,
|  | const int | offset )
| pure virtual

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

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

Parameters

  pA | contact pA
  pB | contact pB
  plane_coord | contact plane coordsystem (A column 'X' is contact normal)
  distance | contact distance
  eff_radius | effective radius of curvature at contact
  react_forces | react.forces (if already computed). In coordsystem 'plane_coord'
  react_torques | react.torques, if rolling friction (if already computed).
  contactobjA | model A (note: some containers may not support it and could be nullptr)
  contactobjB | model B (note: some containers may not support it and could be nullptr)
  offset | offset of the first constraint (the normal component) in the vector of lagrangian multipliers, if already book-keeped

The documentation for this class was generated from the following file:

- D:/W/B/src/chrono-9.0.1/src/chrono/physics/ChContactContainerNSC.h