AGX Dynamics 2.41.3.0
Loading...
Searching...
No Matches
agxTerrain::TerrainProperties Class Reference

Class for containing and managing the different agxTerrain::Terrain settings. More...

#include <TerrainProperties.h>

+ Inheritance diagram for agxTerrain::TerrainProperties:

Public Member Functions

agx::Real getActivationSpeed () const
 Get the shovel speed threshold in the excavation plane of shovel deformers when static mass in the active zone is converted to dynamic mass.
 
bool getAlwaysEnableSoilFailure () const
 
agx::Real getAvalancheDecayFraction () const
 
agx::Real getAvalancheErrorThreshold () const
 
agx::Real getAvalancheMaxHeightGrowth () const
 Get the maximum allowed height transfer per time step due to avalanching.
 
bool getCreateParticles () const
 
bool getDeleteSoilParticlesOutsideBounds () const
 
bool getEnableAvalanching () const
 
bool getEnableCreateDynamicMass () const
 
bool getEnableDeformation () const
 
bool getEnableGroundCollapse () const
 
bool getEnableLockedBorders () const
 
bool getEnableSoilCompaction () const
 
agx::UInt32 getFlags () const
 
agx::Real getMaximumParticleActivationVolume () const
 
agx::Real getPenetrationForceVelocityScaling () const
 
agx::Real getSoilAggregateLockCompliance (agx::Int dof) const
 Set the compliance of the soil aggregate lock joint the local constraint dimensions to relax or increase the force feedback interaction from shovel - terrain interaction.
 
agx::Real getSoilMergeSpeedThreshold () const
 
agx::Real getSoilParticleGrowthRate () const
 
agx::Real getSoilParticleLifeTime () const
 
agx::Real getSoilParticleMergeRate () const
 
agx::Real getSoilParticleMergeThreshold () const
 
float getSoilParticleSizeScaling () const
 Get soil particle size scaling factor.
 
bool isDirty () const
 
void setActivationSpeed (agx::Real activationSpeed)
 Set the shovel speed threshold in the excavation plane when static mass in the active zone is converted to dynamic mass.
 
void setAlwaysEnableSoilFailure (bool enable)
 Set if soil wedges should always fail.
 
void setAvalancheDecayFraction (agx::Real decayFraction)
 Set the fraction of the height difference that violates the angle of repose condition that will be transferred in each time step during avalanching.
 
void setAvalancheErrorThreshold (agx::Real errorThreshold)
 Set the fractional error threshold for the height difference that will trigger avalanching in a grid point.
 
void setAvalancheMaxHeightGrowth (agx::Real maxHeightGrowth)
 Set the maximum allowed height (m) transfer per time step due to avalanching.
 
void setCreateParticles (bool enable)
 Set whether the terrain should create particles or not during shovel interactions.
 
void setDeleteSoilParticlesOutsideBounds (bool enable)
 Set if terrain should delete soil particles outside of terrain bounds.
 
void setDirty (bool isDirty)
 Set dirty flag on the TerrainProperties.
 
void setEnableAvalanching (bool enable)
 Set whether to enable avalanching in the terrain.
 
void setEnableCreateDynamicMass (bool enable)
 Sets if dynamic mass should be created during excavation.
 
void setEnableDeformation (bool enable)
 Sets if terrain deformation should be enabled.
 
void setEnableGroundCollapse (bool enable)
 Set if ground collapse should be enabled.
 
void setEnableLockedBorders (bool enable)
 Set whether to fixate the height of the borders in the terrain.
 
void setEnableSoilCompaction (bool enable)
 Set whether or not to use the soil compaction calculations in the terrain.
 
void setFlags (agx::UInt32 flags)
 Set state flags for the properties object.
 
void setMaximumParticleActivationVolume (agx::Real volume)
 Sets the maximum volume (m3) of active zone wedges that should wake particles.
 
void setPenetrationForceVelocityScaling (agx::Real penetrationForceVelocityScaling)
 Set the penetration force velocity scaling constant.
 
void setSoilAggregateLockCompliance (agx::Real compliance, agx::Int dof)
 Set the compliance of the soil aggregate lock joint the local constraint dimensions to relax or increase the force feedback interaction from shovel -terrain interaction.
 
void setSoilMergeSpeedThreshold (agx::Real speedThreshold)
 Set the absolute lower speed (m/s) threshold where soil particles are allowed to merge with the terrain.
 
void setSoilParticleGrowthRate (agx::Real growthRateFactor)
 Set the rate factor in the algorithm for growing soil particles from fluid mass and particle resizing.
 
void setSoilParticleLifeTime (agx::Real lifeTime)
 Set the lifetime (s) of created soil particles in the terrain.
 
void setSoilParticleMergeRate (agx::Real mergeRate)
 Set the merge rate for soil particles into the terrain.
 
void setSoilParticleMergeThreshold (agx::Real radiusFraction)
 Set the fraction of the particle nominal radius that will trigger instant merge of soil particles into the terrain during merging.
 
void setSoilParticleSizeScaling (float scalingFactor)
 Set soil particle size scaling factor.
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referencedoperator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 

Protected Types

using Flags = agx::BitState< StateFlags, agx::UInt32 >
 
enum  StateFlags : agx::UInt32 {
  LOCKED_BORDERS = 1 << 0 , CREATE_PATICLES = 1 << 1 , DELETE_PARTICLES_OUTSIDE_BOUNDS = 1 << 2 , ENABLE_SOIL_COMPACTION = 1 << 3 ,
  ENABLE_AVALANCHING = 1 << 4 , ENABLE_DYNAMIC_MASS = 1 << 5 , ENABLE_DEFORMATION = 1 << 6 , ENABLE_GROUND_COLLAPSE = 1 << 7 ,
  ENABLE_ALWAYS_SOIL_FAILURE = 1 << 8
}
 

Protected Member Functions

virtual ~TerrainProperties ()
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Additional Inherited Members

- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandlergetDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Class for containing and managing the different agxTerrain::Terrain settings.

Definition at line 31 of file TerrainProperties.h.

Member Typedef Documentation

◆ Flags

using agxTerrain::TerrainProperties::Flags = agx::BitState<StateFlags, agx::UInt32>
protected

Definition at line 371 of file TerrainProperties.h.

Member Enumeration Documentation

◆ StateFlags

Enumerator
LOCKED_BORDERS 
CREATE_PATICLES 
DELETE_PARTICLES_OUTSIDE_BOUNDS 
ENABLE_SOIL_COMPACTION 
ENABLE_AVALANCHING 
ENABLE_DYNAMIC_MASS 
ENABLE_DEFORMATION 
ENABLE_GROUND_COLLAPSE 
ENABLE_ALWAYS_SOIL_FAILURE 

Definition at line 359 of file TerrainProperties.h.

Constructor & Destructor Documentation

◆ ~TerrainProperties()

virtual agxTerrain::TerrainProperties::~TerrainProperties ( )
protectedvirtual

Member Function Documentation

◆ getActivationSpeed()

agx::Real agxTerrain::TerrainProperties::getActivationSpeed ( ) const

Get the shovel speed threshold in the excavation plane of shovel deformers when static mass in the active zone is converted to dynamic mass.

◆ getAlwaysEnableSoilFailure()

bool agxTerrain::TerrainProperties::getAlwaysEnableSoilFailure ( ) const
Returns
wether soil wedges should always fail.

◆ getAvalancheDecayFraction()

agx::Real agxTerrain::TerrainProperties::getAvalancheDecayFraction ( ) const
inline
Returns
the fraction of the height difference that violates the angle of repose condition that will be transferred in each time step during avalanching.

Definition at line 411 of file TerrainProperties.h.

◆ getAvalancheErrorThreshold()

agx::Real agxTerrain::TerrainProperties::getAvalancheErrorThreshold ( ) const
Returns
the the fractional error threshold for the height difference that will trigger avalanching in a grid point.
Note
- the height difference error threshold is calculated using: errorThreshold * elementSize.

◆ getAvalancheMaxHeightGrowth()

agx::Real agxTerrain::TerrainProperties::getAvalancheMaxHeightGrowth ( ) const
inline

Get the maximum allowed height transfer per time step due to avalanching.

Definition at line 404 of file TerrainProperties.h.

◆ getCreateParticles()

bool agxTerrain::TerrainProperties::getCreateParticles ( ) const
Returns
whether the terrain should create particles or not during shovel interactions.

◆ getDeleteSoilParticlesOutsideBounds()

bool agxTerrain::TerrainProperties::getDeleteSoilParticlesOutsideBounds ( ) const
inline
Returns
true if particles outside the terrain bounds should be deleted - otherwise false (default).

Definition at line 418 of file TerrainProperties.h.

References DELETE_PARTICLES_OUTSIDE_BOUNDS.

◆ getEnableAvalanching()

bool agxTerrain::TerrainProperties::getEnableAvalanching ( ) const
Returns
whether or not to use avalanching in the terrain.

◆ getEnableCreateDynamicMass()

bool agxTerrain::TerrainProperties::getEnableCreateDynamicMass ( ) const
inline
Returns
true if dynamic mass should be created during excavation. If false, this will prevent the creation of fluid and soil particle mass during shovel excavation; thus only solid removal will be active.

Definition at line 446 of file TerrainProperties.h.

References ENABLE_DYNAMIC_MASS.

◆ getEnableDeformation()

bool agxTerrain::TerrainProperties::getEnableDeformation ( ) const
inline
Returns
true if the terrain should be deformable. If false, no avalanching will occur, no dynamic particles will be created and the soil will not be compacted.

Definition at line 392 of file TerrainProperties.h.

References ENABLE_DEFORMATION.

◆ getEnableGroundCollapse()

bool agxTerrain::TerrainProperties::getEnableGroundCollapse ( ) const
Returns
wether ground collapse should be enable or not.

◆ getEnableLockedBorders()

bool agxTerrain::TerrainProperties::getEnableLockedBorders ( ) const
inline
Returns
whether or not to use locked borders. I.e the borders of the terrain are not allowed to change from excavation and avalanching.

Definition at line 397 of file TerrainProperties.h.

References LOCKED_BORDERS.

◆ getEnableSoilCompaction()

bool agxTerrain::TerrainProperties::getEnableSoilCompaction ( ) const
Returns
whether or not to use soil compaction calculation in the terrain.

◆ getFlags()

agx::UInt32 agxTerrain::TerrainProperties::getFlags ( ) const
Returns
the state flags for the properties object.

◆ getMaximumParticleActivationVolume()

agx::Real agxTerrain::TerrainProperties::getMaximumParticleActivationVolume ( ) const
inline
Returns
the maximum volume of active zone wedges that should wake particles.

Definition at line 432 of file TerrainProperties.h.

◆ getPenetrationForceVelocityScaling()

agx::Real agxTerrain::TerrainProperties::getPenetrationForceVelocityScaling ( ) const
inline
Returns
the penetration force velocity scaling constant. This will scale the penetration force with the shovel velocity squared in the cutting direction according to: ( 1.0 + C * v^2 ) (Default: 0.0)

Definition at line 425 of file TerrainProperties.h.

◆ getSoilAggregateLockCompliance()

agx::Real agxTerrain::TerrainProperties::getSoilAggregateLockCompliance ( agx::Int  dof) const
inline

Set the compliance of the soil aggregate lock joint the local constraint dimensions to relax or increase the force feedback interaction from shovel - terrain interaction.

Note
The z - direction(dof = 5) is perpendicular to the plane that the cutting edge and the top edge exists in, which is typically in the digging direction. dof: 0 - 2 = translational direction dof: 3 - 5 = rotational direction
Returns
the current compliance in the lock joint in the specified degree of freedom.

Definition at line 439 of file TerrainProperties.h.

◆ getSoilMergeSpeedThreshold()

agx::Real agxTerrain::TerrainProperties::getSoilMergeSpeedThreshold ( ) const
Returns
the absolute lower speed (m/s) threshold where soil particles are allowed to merge with the terrain.

◆ getSoilParticleGrowthRate()

agx::Real agxTerrain::TerrainProperties::getSoilParticleGrowthRate ( ) const
Returns
the rate factor in the algorithm that governs particle growth from fluid mass and resizing. (Default: 0.05)

◆ getSoilParticleLifeTime()

agx::Real agxTerrain::TerrainProperties::getSoilParticleLifeTime ( ) const
Returns
the lifetime (s) of the created soil particles. (Default: Infinity).

◆ getSoilParticleMergeRate()

agx::Real agxTerrain::TerrainProperties::getSoilParticleMergeRate ( ) const
Returns
the merge rate for soil particles in the terrain. The merge rate is defined as the fraction of the current particle mass that should be merged into the terrain for each second.

◆ getSoilParticleMergeThreshold()

agx::Real agxTerrain::TerrainProperties::getSoilParticleMergeThreshold ( ) const
Returns
the fraction of the particle nominal radius that will trigger instant merge of particles into the terrain during merging.

◆ getSoilParticleSizeScaling()

float agxTerrain::TerrainProperties::getSoilParticleSizeScaling ( ) const

Get soil particle size scaling factor.

◆ isDirty()

bool agxTerrain::TerrainProperties::isDirty ( ) const
Returns
whether the TerainProperties is dirty.

◆ setActivationSpeed()

void agxTerrain::TerrainProperties::setActivationSpeed ( agx::Real  activationSpeed)

Set the shovel speed threshold in the excavation plane when static mass in the active zone is converted to dynamic mass.

Parameters
activationSpeed- the specified speed threshold where static mass is converted to dynamic mass in the active zone. (Default: 0.1 m/s)

◆ setAlwaysEnableSoilFailure()

void agxTerrain::TerrainProperties::setAlwaysEnableSoilFailure ( bool  enable)

Set if soil wedges should always fail.

Parameters
enable- True if soil wedges should always fail, false otherwise.

◆ setAvalancheDecayFraction()

void agxTerrain::TerrainProperties::setAvalancheDecayFraction ( agx::Real  decayFraction)

Set the fraction of the height difference that violates the angle of repose condition that will be transferred in each time step during avalanching.

Parameters
decayFraction- The fraction of the height difference that violates the angle of repose that will be transferred. (Default: 0.1)

◆ setAvalancheErrorThreshold()

void agxTerrain::TerrainProperties::setAvalancheErrorThreshold ( agx::Real  errorThreshold)

Set the fractional error threshold for the height difference that will trigger avalanching in a grid point.

Parameters
errorThreshold- the fractional error threshold that will determine if a height difference will trigger avalanching. (Default: 1E-4)
Note
- the height difference error threshold is calculated using: errorThreshold / elementSize.

◆ setAvalancheMaxHeightGrowth()

void agxTerrain::TerrainProperties::setAvalancheMaxHeightGrowth ( agx::Real  maxHeightGrowth)

Set the maximum allowed height (m) transfer per time step due to avalanching.

Parameters
maxHeightGrowth- The maximum height allowed during a height (m) transfer. (Default: infinity)

◆ setCreateParticles()

void agxTerrain::TerrainProperties::setCreateParticles ( bool  enable)

Set whether the terrain should create particles or not during shovel interactions.

Parameters
enable- true if particles should be created from excavation - false otherwise.

◆ setDeleteSoilParticlesOutsideBounds()

void agxTerrain::TerrainProperties::setDeleteSoilParticlesOutsideBounds ( bool  enable)

Set if terrain should delete soil particles outside of terrain bounds.

Parameters
enable- true if particle should be deleted when outside terrain bounds - false otherwise.

◆ setDirty()

void agxTerrain::TerrainProperties::setDirty ( bool  isDirty)

Set dirty flag on the TerrainProperties.

Parameters
isDirty- set whether the properties should be marked as dirty or not.

◆ setEnableAvalanching()

void agxTerrain::TerrainProperties::setEnableAvalanching ( bool  enable)

Set whether to enable avalanching in the terrain.

Parameters
enable- true if avalanching should be enabled - false otherwise.

◆ setEnableCreateDynamicMass()

void agxTerrain::TerrainProperties::setEnableCreateDynamicMass ( bool  enable)

Sets if dynamic mass should be created during excavation.

Setting this to false will prevent the creation of fluid and soil particle mass during shovel excavation; thus only solid removal will be active.

Parameters
enable- True if dynamic mass should be created during excavation, false otherwise ( Default: True )

◆ setEnableDeformation()

void agxTerrain::TerrainProperties::setEnableDeformation ( bool  enable)

Sets if terrain deformation should be enabled.

Setting this to false will prevent the creation of fluid and soil particle mass and prevent both avalanching and compaction of the terrain.

Parameters
enable- True if terrain deformations should occur, false otherwise (Default: True)

◆ setEnableGroundCollapse()

void agxTerrain::TerrainProperties::setEnableGroundCollapse ( bool  enable)

Set if ground collapse should be enabled.

Parameters
enable- True if ground collapse should be enabled, false otherwise.

◆ setEnableLockedBorders()

void agxTerrain::TerrainProperties::setEnableLockedBorders ( bool  enable)

Set whether to fixate the height of the borders in the terrain.

I.e the borders of the terrain are not allowed to change from excavation and avalanching.

Parameters
enable- true if borders should be locked - false otherwise.

◆ setEnableSoilCompaction()

void agxTerrain::TerrainProperties::setEnableSoilCompaction ( bool  enable)

Set whether or not to use the soil compaction calculations in the terrain.

Parameters
enable- true if compaction should be calculated in the terrain - false otherwise.

◆ setFlags()

void agxTerrain::TerrainProperties::setFlags ( agx::UInt32  flags)

Set state flags for the properties object.

Parameters
flags- the state flags integer to be set on the object.

◆ setMaximumParticleActivationVolume()

void agxTerrain::TerrainProperties::setMaximumParticleActivationVolume ( agx::Real  volume)

Sets the maximum volume (m3) of active zone wedges that should wake particles.

Parameters
volume- the maximum volume of active zone wedges that should wake particles. ( Default:Infinity )

◆ setPenetrationForceVelocityScaling()

void agxTerrain::TerrainProperties::setPenetrationForceVelocityScaling ( agx::Real  penetrationForceVelocityScaling)

Set the penetration force velocity scaling constant.

This will scale the penetration force with the shovel velocity squared in the cutting direction according to: ( 1.0 + C * v^2 )

Parameters
penetrationForceVelocityScaling- The coefficient for scaling the penetration force with the shovel velocity in the cutting direction (Default: 0.0)

◆ setSoilAggregateLockCompliance()

void agxTerrain::TerrainProperties::setSoilAggregateLockCompliance ( agx::Real  compliance,
agx::Int  dof 
)

Set the compliance of the soil aggregate lock joint the local constraint dimensions to relax or increase the force feedback interaction from shovel -terrain interaction.

Note
The z-direction (dof = 5) is perpendicular to the plane that the cutting edge and the top edge exists in, which is typically in the digging direction. dof: 0-2 = translational direction dof: 3-5 = rotational direction
Parameters
compliance- the compliance to set in the specified degree of freedom
dof- Target dof for the change of compliance

◆ setSoilMergeSpeedThreshold()

void agxTerrain::TerrainProperties::setSoilMergeSpeedThreshold ( agx::Real  speedThreshold)

Set the absolute lower speed (m/s) threshold where soil particles are allowed to merge with the terrain.

Parameters
speedThreshold- The lower speed threshold where soil particles are allowed to merge with the terrain. ( Default: 4 )

◆ setSoilParticleGrowthRate()

void agxTerrain::TerrainProperties::setSoilParticleGrowthRate ( agx::Real  growthRateFactor)

Set the rate factor in the algorithm for growing soil particles from fluid mass and particle resizing.

Parameters
growthRateFactor- the rate factor in the algorithm that governs particle growth from fluid mass and resizing. (Default: 0.125)

◆ setSoilParticleLifeTime()

void agxTerrain::TerrainProperties::setSoilParticleLifeTime ( agx::Real  lifeTime)

Set the lifetime (s) of created soil particles in the terrain.

The particle will be deleted after existing for the specified lifetime.

Parameters
lifeTime- The lifetime of created particles. ( Default: Infinity )

◆ setSoilParticleMergeRate()

void agxTerrain::TerrainProperties::setSoilParticleMergeRate ( agx::Real  mergeRate)

Set the merge rate for soil particles into the terrain.

The merge rate is defined as the fraction of the current particle mass that should be merged into the terrain for each second.

Parameters
mergeRate- the fraction of the current particle mass that should be merged into the terrain for each second. ( Default: 9)

◆ setSoilParticleMergeThreshold()

void agxTerrain::TerrainProperties::setSoilParticleMergeThreshold ( agx::Real  radiusFraction)

Set the fraction of the particle nominal radius that will trigger instant merge of soil particles into the terrain during merging.

Parameters
radiusFraction- the fraction of the particle nominal radius that will trigger instant merge for a particle. (Default: 0.4)
Note
- radiusFractionvalue must be in the interval (0, 1.0] to be valid ( zero excluded ).

◆ setSoilParticleSizeScaling()

void agxTerrain::TerrainProperties::setSoilParticleSizeScaling ( float  scalingFactor)

Set soil particle size scaling factor.

The soil particle size scaling factor scales the nominal radius that the algorithm will aim for during the dynamic resizing of particles that occur during terrain interaction. This is used to alter the desired number of soil particles in the terrain. Default value: 1.0


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