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

#include <GranularContacts.h>

Public Member Functions

 GranularRigidBodyContact ()
 
 GranularRigidBodyContact (agx::Physics::ParticleGeometryContactPtr, agxSDK::Simulation *)
 
std::shared_ptr< MaterialPairgetContactMaterial () const
 
double getDepth ()
 
Vec3 getForce () const
 
Vec3 getFrictionalForce () const
 
std::shared_ptr< GranularBodygetGranularBody () const
 
Vec3 getNormal () const
 
Vec3 getNormalForce () const
 
double getNormalImpactForceMagnitude () const
 
Vec3 getPoint () const
 
std::shared_ptr< RigidBodygetRigidBody () const
 
bool isImpacting () const
 

Detailed Description

A class describing a contact point between a GranularBody and a RigidBody.

Constructor & Destructor Documentation

◆ GranularRigidBodyContact() [1/2]

MOMENTUM_NAMESPACE::GranularRigidBodyContact::GranularRigidBodyContact ( agx::Physics::ParticleGeometryContactPtr  ,
agxSDK::Simulation *   
)

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

◆ GranularRigidBodyContact() [2/2]

MOMENTUM_NAMESPACE::GranularRigidBodyContact::GranularRigidBodyContact ( )

Null-constructor.

Member Function Documentation

◆ getContactMaterial()

std::shared_ptr< MaterialPair > MOMENTUM_NAMESPACE::GranularRigidBodyContact::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::GranularRigidBodyContact::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::GranularRigidBodyContact::getForce ( ) const

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

Returns
the force of this contact

◆ getFrictionalForce()

Vec3 MOMENTUM_NAMESPACE::GranularRigidBodyContact::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

◆ getGranularBody()

std::shared_ptr< GranularBody > MOMENTUM_NAMESPACE::GranularRigidBodyContact::getGranularBody ( ) const

Get the GranularBody in the contact.

Returns
The GranularBody in the contact.

◆ getNormal()

Vec3 MOMENTUM_NAMESPACE::GranularRigidBodyContact::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::GranularRigidBodyContact::getNormalForce ( ) const

Get the normal 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::GranularRigidBodyContact::getNormalImpactForceMagnitude ( ) const

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

◆ getPoint()

Vec3 MOMENTUM_NAMESPACE::GranularRigidBodyContact::getPoint ( ) const

Get the point of the contact in the world.

In meters.

Returns
the point of the contact

◆ getRigidBody()

std::shared_ptr< RigidBody > MOMENTUM_NAMESPACE::GranularRigidBodyContact::getRigidBody ( ) const

Get the Rigid Body in the contact.

Returns
The GranularBody in the contact.

◆ isImpacting()

bool MOMENTUM_NAMESPACE::GranularRigidBodyContact::isImpacting ( ) const

Returns true/false if the contact is impacting.