AGX Dynamics  2.37.2.0
agxTerrain::SoilParticleAggregate::SoilWedgeContainer Class Reference

Class that handles and creates a lumped element approximation of the soil wedge aggregate. More...

#include <SoilParticleAggregate.h>

Public Member Functions

 SoilWedgeContainer (size_t numWedges)
 Constructor. More...
 
void addNotification (agxSDK::Simulation *simulation, Terrain *terrain)
 
void calculatePartitionPlaneData (TerrainToolCollection *collection)
 Calculates all the normals used to defined the internal partition splitting of the wedge volume. More...
 
void clearParticles (size_t reserve)
 
void clearVoxelsAndParticles ()
 
void computeLockViolations ()
 Computes lock violations of the lock joints in the lumped structure. More...
 
const agx::RigidBody * getContactingWedgeBody () const
 This function returns the outermost enabled body in the lumped-element approximation of the wedge aggregate. More...
 
const agx::Vec3 & getCuttingVectorFlat () const
 
const agx::Vec3 & getCutTopVector () const
 
const agx::Vec3 & getForwardDiggingPlane () const
 
const WedgePartitionData & getPartitionData (const agx::RigidBody *partitionBody) const
 
agx::Real getTotalWedgeMass () const
 
void init (agx::RigidBody *innerBody)
 Initializes the lumped element structure of the wedge aggregate. More...
 
bool isWedgePartitionBody (const agx::RigidBody *body) const
 
void onEnableChange (bool enable)
 
const WedgePartitionData & operator[] (size_t index) const
 
WedgePartitionData & operator[] (size_t index)
 
void removeNotification (agxSDK::Simulation *simulation, Terrain *terrain)
 
void setDeformerWedgeMode ()
 Set deformer mode. More...
 
void setMaterial (agx::Material *material)
 Set the material of each of the geometries in the lumped element structure. More...
 
void setSinglePartitionMode ()
 Set single partition body mode when no splitting is occuring. More...
 
size_t size () const noexcept
 
void splitWedgeParticles (const TerrainToolCollection *collection, const SoilParticlePtrVector &soilParticles)
 Split the wedge particles into different partition elements of the wedge aggregate. More...
 
void splitWedgeVoxels (const TerrainToolCollection *collection, VoxelHashSet &voxels)
 Split the wedge voxels into different partition elements of the wedge aggregate. More...
 
void synchronizeLockJoints (TerrainToolCollection *collection)
 Update the lumped element lock joints according to partition data. More...
 
void updateCachedWedgeMomentum ()
 Updates the cached momentum in each partition for the wedge bodies. More...
 
void updatePartitionBodyMomentum (agx::RigidBody *partitionBody, agx::Real totalMass, const agx::Matrix3x3 &invWorldInertiaTensor)
 Update the a specific partition body velocity and angular velocity from updated inertia and cached momentum. More...
 

Protected Attributes

agx::Vec3 m_cuttingVectorFlat
 
agx::Vec3 m_forwardDiggingPlane
 
agx::Vec3 m_topCutVector
 
std::vector< WedgePartitionData > m_wedgePartitions
 

Detailed Description

Class that handles and creates a lumped element approximation of the soil wedge aggregate.

This is done to approximate internal shearing effects/limits of the soil aggregate during vertical movements instead of treating the whole soil wedge aggregate as a rigid object.

The wedge aggregate is split inteo different bodies according to pre-defined planes. Each body is connected with a lock joint that holds frictional limits in the plane of the lock z-direction to approximate internal soil shearing during excavation.

Note
Only a maximum of 2-soil wedges are supported at the moment.

Definition at line 250 of file SoilParticleAggregate.h.

Constructor & Destructor Documentation

◆ SoilWedgeContainer()

agxTerrain::SoilParticleAggregate::SoilWedgeContainer::SoilWedgeContainer ( size_t  numWedges)

Constructor.

Member Function Documentation

◆ addNotification()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::addNotification ( agxSDK::Simulation *  simulation,
Terrain *  terrain 
)

◆ calculatePartitionPlaneData()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::calculatePartitionPlaneData ( TerrainToolCollection *  collection)

Calculates all the normals used to defined the internal partition splitting of the wedge volume.

◆ clearParticles()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::clearParticles ( size_t  reserve)

◆ clearVoxelsAndParticles()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::clearVoxelsAndParticles ( )

◆ computeLockViolations()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::computeLockViolations ( )

Computes lock violations of the lock joints in the lumped structure.

◆ getContactingWedgeBody()

const agx::RigidBody* agxTerrain::SoilParticleAggregate::SoilWedgeContainer::getContactingWedgeBody ( ) const

This function returns the outermost enabled body in the lumped-element approximation of the wedge aggregate.

This will be used when creating terrain-aggregate contacts if applicable.

◆ getCuttingVectorFlat()

const agx::Vec3& agxTerrain::SoilParticleAggregate::SoilWedgeContainer::getCuttingVectorFlat ( ) const

◆ getCutTopVector()

const agx::Vec3& agxTerrain::SoilParticleAggregate::SoilWedgeContainer::getCutTopVector ( ) const

◆ getForwardDiggingPlane()

const agx::Vec3& agxTerrain::SoilParticleAggregate::SoilWedgeContainer::getForwardDiggingPlane ( ) const

◆ getPartitionData()

const WedgePartitionData& agxTerrain::SoilParticleAggregate::SoilWedgeContainer::getPartitionData ( const agx::RigidBody *  partitionBody) const
Returns
the partition data for a specified partition body.

◆ getTotalWedgeMass()

agx::Real agxTerrain::SoilParticleAggregate::SoilWedgeContainer::getTotalWedgeMass ( ) const

◆ init()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::init ( agx::RigidBody *  innerBody)

Initializes the lumped element structure of the wedge aggregate.

Parameters
innerBody- the inner body of the shovel that will connect to the lumped elment structure of the wedge body.

◆ isWedgePartitionBody()

bool agxTerrain::SoilParticleAggregate::SoilWedgeContainer::isWedgePartitionBody ( const agx::RigidBody *  body) const
Returns
true if the specified body is a wedge partition body, false otherwise.

◆ onEnableChange()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::onEnableChange ( bool  enable)

◆ operator[]() [1/2]

const WedgePartitionData& agxTerrain::SoilParticleAggregate::SoilWedgeContainer::operator[] ( size_t  index) const
inline

Definition at line 379 of file SoilParticleAggregate.h.

◆ operator[]() [2/2]

WedgePartitionData& agxTerrain::SoilParticleAggregate::SoilWedgeContainer::operator[] ( size_t  index)
inline

Definition at line 383 of file SoilParticleAggregate.h.

◆ removeNotification()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::removeNotification ( agxSDK::Simulation *  simulation,
Terrain *  terrain 
)

◆ setDeformerWedgeMode()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::setDeformerWedgeMode ( )

Set deformer mode.

Note
Single body active with no lock joints

◆ setMaterial()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::setMaterial ( agx::Material *  material)

Set the material of each of the geometries in the lumped element structure.

◆ setSinglePartitionMode()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::setSinglePartitionMode ( )

Set single partition body mode when no splitting is occuring.

Note
Single wedge body connected with a single lock to the inner body.

◆ size()

size_t agxTerrain::SoilParticleAggregate::SoilWedgeContainer::size ( ) const
inlinenoexcept

Definition at line 387 of file SoilParticleAggregate.h.

◆ splitWedgeParticles()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::splitWedgeParticles ( const TerrainToolCollection *  collection,
const SoilParticlePtrVector &  soilParticles 
)

Split the wedge particles into different partition elements of the wedge aggregate.

Each partition holds a plane that governs the splitting delimiter for the particles.

◆ splitWedgeVoxels()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::splitWedgeVoxels ( const TerrainToolCollection *  collection,
VoxelHashSet &  voxels 
)

Split the wedge voxels into different partition elements of the wedge aggregate.

Each partition holds a plane that governs the splitting delimiter for the particles.

◆ synchronizeLockJoints()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::synchronizeLockJoints ( TerrainToolCollection *  collection)

Update the lumped element lock joints according to partition data.

◆ updateCachedWedgeMomentum()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::updateCachedWedgeMomentum ( )

Updates the cached momentum in each partition for the wedge bodies.

Note
- Should be called after post step when new velocities have been computed.

◆ updatePartitionBodyMomentum()

void agxTerrain::SoilParticleAggregate::SoilWedgeContainer::updatePartitionBodyMomentum ( agx::RigidBody *  partitionBody,
agx::Real  totalMass,
const agx::Matrix3x3 &  invWorldInertiaTensor 
)

Update the a specific partition body velocity and angular velocity from updated inertia and cached momentum.

Member Data Documentation

◆ m_cuttingVectorFlat

agx::Vec3 agxTerrain::SoilParticleAggregate::SoilWedgeContainer::m_cuttingVectorFlat
protected

Definition at line 393 of file SoilParticleAggregate.h.

◆ m_forwardDiggingPlane

agx::Vec3 agxTerrain::SoilParticleAggregate::SoilWedgeContainer::m_forwardDiggingPlane
protected

Definition at line 395 of file SoilParticleAggregate.h.

◆ m_topCutVector

agx::Vec3 agxTerrain::SoilParticleAggregate::SoilWedgeContainer::m_topCutVector
protected

Definition at line 394 of file SoilParticleAggregate.h.

◆ m_wedgePartitions

std::vector<WedgePartitionData> agxTerrain::SoilParticleAggregate::SoilWedgeContainer::m_wedgePartitions
protected

Definition at line 397 of file SoilParticleAggregate.h.


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