    

 ## On this page

  

 

 # IRockyContactIntermediateData Struct Reference

 Last update: 16.07.2025 

`#include <<a class="el" href="rocky__contact__intermediate__data__api_8hpp_source.xhtml">rocky_contact_intermediate_data_api.hpp</a>>`

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

ROCKY\_FUNCTIONS double3 [get\_home\_centroid\_to\_contact\_point\_vector](#ae7271a8689305777b1f39beb47898553) () const ROCKY\_FUNCTIONS double3 [get\_near\_centroid\_to\_contact\_point\_vector](#a00c355cde831bad36cd029544a7bbb16) () const ROCKY\_FUNCTIONS double [get\_friction\_coefficient](#a3efba296a1d32e115acbb7071cdbf775) () const <a id="details" name="details"></a>## Detailed Description

`<a class="el" href="structIRockyContactIntermediateData.xhtml">IRockyContactIntermediateData</a>` is an interface to access some useful property values related to the contact that can be needed during the calculation steps of a custom contact model, i.e. calculation of the normal and tangential forces, and calculation of the impact energy.



## Member Function Documentation

<a id="a3efba296a1d32e115acbb7071cdbf775" name="a3efba296a1d32e115acbb7071cdbf775"></a>## [◆ ](#a3efba296a1d32e115acbb7071cdbf775)get\_friction\_coefficient()

 ROCKY\_FUNCTIONS double IRockyContactIntermediateData::get\_friction\_coefficient  ( )  const

ReturnsThe coefficient of friction, which is the ratio of the frictional force resisting the motion of the two surfaces in contact to the normal force pressing the two surfaces together. The coefficient of friction is equal to the dynamic or static friction coefficient defined for the corresponding material interaction, depending on the existence or not of sliding at the contact. Since the sliding condition must be specified by a module in `ROCKY_PLUGIN_TANGENTIAL_FORCE_ON_CONTACTS`, this method must be called after that hook. If called before that point, the returned value is undetermined. 



<a id="ae7271a8689305777b1f39beb47898553" name="ae7271a8689305777b1f39beb47898553"></a>## [◆ ](#ae7271a8689305777b1f39beb47898553)get\_home\_centroid\_to\_contact\_point\_vector()

 ROCKY\_FUNCTIONS double3 IRockyContactIntermediateData::get\_home\_centroid\_to\_contact\_point\_vector  ( )  const

ReturnsCartesian coordinates of the vector that joins the home particle centroid to the contact point. 



<a id="a00c355cde831bad36cd029544a7bbb16" name="a00c355cde831bad36cd029544a7bbb16"></a>## [◆ ](#a00c355cde831bad36cd029544a7bbb16)get\_near\_centroid\_to\_contact\_point\_vector()

 ROCKY\_FUNCTIONS double3 IRockyContactIntermediateData::get\_near\_centroid\_to\_contact\_point\_vector  ( )  const

ReturnsCartesian coordinates of the vector that joins the near particle centroid to the contact point. If the near entity is a triangle instead of a particle, a zero vector will be returned.