Skip to main content

Rocky Solver SDK 2024 R2

IRockyContactIntermediateData Struct Reference

Last update: 08.07.2024

#include <rocky_contact_intermediate_data_api.hpp>

Public Member Functions

ROCKY_FUNCTIONS double3 get_home_centroid_to_contact_point_vector () const
 
ROCKY_FUNCTIONS double3 get_near_centroid_to_contact_point_vector () const
 
ROCKY_FUNCTIONS double get_friction_coefficient () const
 

Detailed Description

IRockyContactIntermediateData 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

◆ get_friction_coefficient()

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.

◆ get_home_centroid_to_contact_point_vector()

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.

◆ get_near_centroid_to_contact_point_vector()

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.