    

 ## On this page

  

 

 # Structure IRockyContactIntermediateData

 Last update: 09.03.2026 

<a id="structIRockyContactIntermediateData"></a>

![](https://img.shields.io/badge/language-C%2B%2B-blue "C++")![](https://img.shields.io/badge/-public-brightgreen "public")

**\#include**

`<a href="structIRockyContactIntermediateData.md#structIRockyContactIntermediateData">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.

## Members

- [get\_friction\_coefficient](structIRockyContactIntermediateData.md#structIRockyContactIntermediateData_1a3efba296a1d32e115acbb7071cdbf775)
- [get\_home\_centroid\_to\_contact\_point\_vector](structIRockyContactIntermediateData.md#structIRockyContactIntermediateData_1ae7271a8689305777b1f39beb47898553)
- [get\_near\_centroid\_to\_contact\_point\_vector](structIRockyContactIntermediateData.md#structIRockyContactIntermediateData_1a00c355cde831bad36cd029544a7bbb16)

## Public functions

### Function get\_home\_centroid\_to\_contact\_point\_vector

<a id="structIRockyContactIntermediateData_1ae7271a8689305777b1f39beb47898553"></a>

![](https://img.shields.io/badge/-public-brightgreen "public")!\[\]\[const\]

```cpp
ROCKY_FUNCTIONS double3 IRockyContactIntermediateData::get_home_centroid_to_contact_point_vector() const

```

**Returns**:

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

**Return type**: ROCKY\_FUNCTIONS double3

### Function get\_near\_centroid\_to\_contact\_point\_vector

<a id="structIRockyContactIntermediateData_1a00c355cde831bad36cd029544a7bbb16"></a>

![](https://img.shields.io/badge/-public-brightgreen "public")!\[\]\[const\]

```cpp
ROCKY_FUNCTIONS double3 IRockyContactIntermediateData::get_near_centroid_to_contact_point_vector() const

```

**Returns**:

Cartesian 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.

**Return type**: ROCKY\_FUNCTIONS double3

### Function get\_friction\_coefficient

<a id="structIRockyContactIntermediateData_1a3efba296a1d32e115acbb7071cdbf775"></a>

![](https://img.shields.io/badge/-public-brightgreen "public")!\[\]\[const\]

```cpp
ROCKY_FUNCTIONS double IRockyContactIntermediateData::get_friction_coefficient() const

```

**Returns**:

The 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.

**Return type**: ROCKY\_FUNCTIONS double

\[const\]: <https://img.shields.io/badge/-const-lightblue> (const)