Momentum Scripting v1
Loading...
Searching...
No Matches
MOMENTUM_NAMESPACE::GranularGranularContact Class Reference

#include <GranularContacts.h>

Public Member Functions

 GranularGranularContact ()
 
 GranularGranularContact (agx::Physics::ParticlePairContactPtr, agxSDK::Simulation *)
 
std::shared_ptr< MaterialPairgetContactMaterial () const
 
double getDepth ()
 
Vec3 getForce () const
 
Vec3 getFrictionalForce () const
 
std::shared_ptr< GranularBodygetGranularBody1 () const
 
std::shared_ptr< GranularBodygetGranularBody2 () const
 
Vec3 getNormal () const
 
Vec3 getNormalForce () const
 
double getNormalImpactForceMagnitude () const
 
Vec3 getPoint () const
 
bool isImpacting () const
 

Detailed Description

A class describing a contact point between two GranularBodies.

Constructor & Destructor Documentation

◆ GranularGranularContact() [1/2]

MOMENTUM_NAMESPACE::GranularGranularContact::GranularGranularContact ( agx::Physics::ParticlePairContactPtr  ,
agxSDK::Simulation *   
)

Create a wrapper around an agx::Physics::GranularBodyPtr.

◆ GranularGranularContact() [2/2]

MOMENTUM_NAMESPACE::GranularGranularContact::GranularGranularContact ( )

Null-constructor.

Member Function Documentation

◆ getContactMaterial()

std::shared_ptr< MaterialPair > MOMENTUM_NAMESPACE::GranularGranularContact::getContactMaterial ( ) const

Get the contact material that the collision is using.

Returns
the contact material between the two objects that are colliding

◆ getDepth()

double MOMENTUM_NAMESPACE::GranularGranularContact::getDepth ( )

Get the depth of the contact in meters, describing the size of the overlap.

Returns
the depth of the contact

◆ getForce()

Vec3 MOMENTUM_NAMESPACE::GranularGranularContact::getForce ( ) const

Get the force that this contact applies to its bodies in Newton.

Returns
the force of this contact

◆ getFrictionalForce()

Vec3 MOMENTUM_NAMESPACE::GranularGranularContact::getFrictionalForce ( ) const

Get the tangential force that this contact applies to its bodies in Newton.

Along the surface of the contact

Returns
the tangential force of this contact

◆ getGranularBody1()

std::shared_ptr< GranularBody > MOMENTUM_NAMESPACE::GranularGranularContact::getGranularBody1 ( ) const

Get the first GranularBody in the contact.

Returns
The first GranularBody in the contact.

◆ getGranularBody2()

std::shared_ptr< GranularBody > MOMENTUM_NAMESPACE::GranularGranularContact::getGranularBody2 ( ) const

Get the second GranularBody in the contact.

Returns
The second GranularBody in the contact.

◆ getNormal()

Vec3 MOMENTUM_NAMESPACE::GranularGranularContact::getNormal ( ) const

Get the normal of this contact.

Orthogonal against the surface of the contact

Returns
the normal of this contact

◆ getNormalForce()

Vec3 MOMENTUM_NAMESPACE::GranularGranularContact::getNormalForce ( ) const

Get the normal force that this contact applies to its bodies in Newton.

Orthogonal against the surface of the contact

Returns
the normal force of this contact

◆ getNormalImpactForceMagnitude()

double MOMENTUM_NAMESPACE::GranularGranularContact::getNormalImpactForceMagnitude ( ) const

Returns the magnitude of the normal impact force if the contact is impacting.

◆ getPoint()

Vec3 MOMENTUM_NAMESPACE::GranularGranularContact::getPoint ( ) const

Get the point of the contact in the world.

In meters.

Returns
the point of the contact

◆ isImpacting()

bool MOMENTUM_NAMESPACE::GranularGranularContact::isImpacting ( ) const

Returns true/false if the contact is impacting.