AGX Dynamics  2.37.2.0
agxTerrain::AggregateContactDepthModel Class Reference

Class used to calculate the contact depth in the soil aggregate <-> terrain contacts to mimic an elasto-plastic contact model. More...

#include <AggregateContactUtils.h>

Public Member Functions

 AggregateContactDepthModel ()
 Default constructor. More...
 
void DEBUG_DRAW_CONTACT_PLANE (const agx::Vec3Vector &contactPoints)
 Debug the depth meter, illustrating how far the current depth is from the maximum depth. More...
 
void DEBUG_DRAW_CONTACT_POINTS ()
 Debug draw contact history. More...
 
void DEBUG_DRAW_DEPTH_METER (const agx::Vec3 &meterDirection)
 Debug the depth meter, illustrating how far the current depth is from the maximum depth. More...
 
agx::Real getAggregateContactArea () const
 
agx::Real getCurrentDepth () const
 
agx::Real getDepthDecayFactor () const
 
agx::Real getDepthIncreaseFactor () const
 
agx::Real getMaximumContactDepth () const
 
bool hasContactHistory () const
 
void resetContactHistory ()
 Reset the contact history by erasing the current depth, contact plane and previous contact points. More...
 
void setAggregateContactArea (agx::Real area)
 Set the aggregate contact area (m3) in the model, spanned by the contact points in that interface. More...
 
void setCurrentDepth (agx::Real currentDepth)
 Update the current depth (m) of the model. More...
 
void setDebugDrawColor (const agxRender::Color &color)
 Set the color to use during debug rendering. More...
 
void setDepthDecayFactor (agx::Real depthDecayFactor)
 Set the depth decay factor of the model. More...
 
void setDepthIncreaseFactor (agx::Real depthIncreaseFactor)
 Set the depth increase factor of the model. More...
 
void setMaximumContactDepth (agx::Real maximumDepth)
 Set the maximum contact depth (m) in the model. More...
 
void trimPreviousContactPoints ()
 Trim the history of contact points. More...
 
void updateContactDepth (const agx::Vec3 &referencePoint, const agx::Vec3 &separationNormal, const agx::Vec3Vector &contactPoints, agx::Real cos_contactAngleThreshold)
 Update the depth in the model by using a reference contact point, separation normal of the excavation and the contact points of the terrain <-> aggregate contacts. More...
 

Detailed Description

Class used to calculate the contact depth in the soil aggregate <-> terrain contacts to mimic an elasto-plastic contact model.

The contact depth in the in the model by using the current separation normal, the first aggregate contact point at the cutting edge and the plane spanned by the aggregate contact point. The movement of the contact point is stored in the depth model. The depth increases when that movement of the contact point projected in the separation direction moves against the plane spanned by the aggregate contact points, artificially creating soil compression. The depth increase to a maximum value specified by the user. The updated depth is used in the aggregate contacts to generate an elastic response. When the movement in the separation direction moves away from the contact plane ( contact separation ), the depth is decreased. Both the increase and the decrease of the depth can be adjusted according to scaling factors.

Definition at line 45 of file AggregateContactUtils.h.

Constructor & Destructor Documentation

◆ AggregateContactDepthModel()

agxTerrain::AggregateContactDepthModel::AggregateContactDepthModel ( )

Default constructor.

Member Function Documentation

◆ DEBUG_DRAW_CONTACT_PLANE()

void agxTerrain::AggregateContactDepthModel::DEBUG_DRAW_CONTACT_PLANE ( const agx::Vec3Vector &  contactPoints)

Debug the depth meter, illustrating how far the current depth is from the maximum depth.

◆ DEBUG_DRAW_CONTACT_POINTS()

void agxTerrain::AggregateContactDepthModel::DEBUG_DRAW_CONTACT_POINTS ( )

Debug draw contact history.

◆ DEBUG_DRAW_DEPTH_METER()

void agxTerrain::AggregateContactDepthModel::DEBUG_DRAW_DEPTH_METER ( const agx::Vec3 &  meterDirection)

Debug the depth meter, illustrating how far the current depth is from the maximum depth.

◆ getAggregateContactArea()

agx::Real agxTerrain::AggregateContactDepthModel::getAggregateContactArea ( ) const
Returns
the aggregate contact area (m3) between the aggregate and the terrain, spanned by the contact points in that interface.
Note
- This is updated by the contact generator that the model belongs to.

◆ getCurrentDepth()

agx::Real agxTerrain::AggregateContactDepthModel::getCurrentDepth ( ) const
Returns
the current depth (m) in the model.

◆ getDepthDecayFactor()

agx::Real agxTerrain::AggregateContactDepthModel::getDepthDecayFactor ( ) const
Returns
the depth decay factor of the model. This determines how fast the depth should decay when the movement in the separation direction moves away from the contact plane ( contact separation ). ( Default: 2.0 )

◆ getDepthIncreaseFactor()

agx::Real agxTerrain::AggregateContactDepthModel::getDepthIncreaseFactor ( ) const
Returns
the depth increase factor of the model. This determines how fast the depth should increase when the movement in the separation direction moves towards the contact plane ( contact ). ( Default: 1.0 )

◆ getMaximumContactDepth()

agx::Real agxTerrain::AggregateContactDepthModel::getMaximumContactDepth ( ) const
Returns
the maximum depth (m) in the model. ( Default: 1.0 )

◆ hasContactHistory()

bool agxTerrain::AggregateContactDepthModel::hasContactHistory ( ) const
Returns
true if the contact model has a contact history, false otherwise.

◆ resetContactHistory()

void agxTerrain::AggregateContactDepthModel::resetContactHistory ( )

Reset the contact history by erasing the current depth, contact plane and previous contact points.

◆ setAggregateContactArea()

void agxTerrain::AggregateContactDepthModel::setAggregateContactArea ( agx::Real  area)

Set the aggregate contact area (m3) in the model, spanned by the contact points in that interface.

Note
- This is updated by the contact generator that the model belongs to.
Parameters
area- the specified area to set to the model.

◆ setCurrentDepth()

void agxTerrain::AggregateContactDepthModel::setCurrentDepth ( agx::Real  currentDepth)

Update the current depth (m) of the model.

Parameters
currentDepth- the current depth that the model should have

◆ setDebugDrawColor()

void agxTerrain::AggregateContactDepthModel::setDebugDrawColor ( const agxRender::Color &  color)

Set the color to use during debug rendering.

◆ setDepthDecayFactor()

void agxTerrain::AggregateContactDepthModel::setDepthDecayFactor ( agx::Real  depthDecayFactor)

Set the depth decay factor of the model.

This determines how fast the depth should decay when the movement in the separation direction moves away from the contact plane ( contact separation ). ( Default: 2.0 )

Parameters
depthDecayFactor- the specified depth decay factor.

◆ setDepthIncreaseFactor()

void agxTerrain::AggregateContactDepthModel::setDepthIncreaseFactor ( agx::Real  depthIncreaseFactor)

Set the depth increase factor of the model.

This determines how fast the depth should increase when the movement in the separation direction moves towards the contact plane ( contact ). ( Default: 2.0 )

Parameters
depthIncreaseFactor- the specified depth decay factor.

◆ setMaximumContactDepth()

void agxTerrain::AggregateContactDepthModel::setMaximumContactDepth ( agx::Real  maximumDepth)

Set the maximum contact depth (m) in the model.

( Default: 1.0 )

Parameters
maximumDepth- The maximum depth of the model.

◆ trimPreviousContactPoints()

void agxTerrain::AggregateContactDepthModel::trimPreviousContactPoints ( )

Trim the history of contact points.

◆ updateContactDepth()

void agxTerrain::AggregateContactDepthModel::updateContactDepth ( const agx::Vec3 &  referencePoint,
const agx::Vec3 &  separationNormal,
const agx::Vec3Vector &  contactPoints,
agx::Real  cos_contactAngleThreshold 
)

Update the depth in the model by using a reference contact point, separation normal of the excavation and the contact points of the terrain <-> aggregate contacts.

Parameters
referencePoint-
separationNormal- The separation normal of the digging direction.
contactPoints- The contact points in the aggregate <-> terrain contact.
cos_contactAngleThreshold- cosine of the lower threshold angle between the separation normal and the contact plane normal where depth should start to accumulate.

The documentation for this class was generated from the following file: