|
AGXDynamics
2.31.1.0
|
Class for containing and managing the different agxTerrain::Terrain settings. More...
#include <TerrainProperties.h>
Inheritance diagram for agxTerrain::TerrainProperties:Public Member Functions | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () 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. More... | |
| bool | getCreateParticles () const |
| agx::Real | getDeformerActivationSpeed () 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. More... | |
| bool | getDeleteSoilParticlesOutsideBounds () const |
| bool | getEnableAvalanching () const |
| bool | getEnableCreateDynamicMass () const |
| bool | getEnableLockedBorders () const |
| bool | getEnableSoilCompaction () const |
| agx::Real | getMaximumParticleActivationVolume () const |
| agx::Real | getPenetrationForceVelocityScaling () const |
| int | getReferenceCount () 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. More... | |
| agx::Real | getSoilMergeSpeedThreshold () const |
| agx::Real | getSoilParticleGrowthRate () const |
| agx::Real | getSoilParticleLifeTime () const |
| agx::Real | getSoilParticleMergeRate () const |
| agx::Real | getSoilParticleMergeThreshold () const |
| float | getSoilParticleSizeScaling () |
| Get soil particle size scaling factor. More... | |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isDirty () const |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| 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. More... | |
| void | setAvalancheErrorThreshold (agx::Real errorThreshold) |
| Set the fractional error threshold for the height difference that will trigger avalanching in a grid point. More... | |
| void | setAvalancheMaxHeightGrowth (agx::Real maxHeightGrowth) |
| Set the maximum allowed height (m) transfer per time step due to avalanching. More... | |
| void | setCreateParticles (bool enable) |
| Set whether the terrain should create particles or not during shovel interactions. More... | |
| void | setDeformerActivationSpeed (agx::Real activationSpeed) |
| Set the shovel speed threshold in the excavation plane of shovel deformers when static mass in the active zone is converted to dynamic mass. More... | |
| void | setDeleteSoilParticlesOutsideBounds (bool enable) |
| Set if terrain should delete soil particles outside of terrain bounds. More... | |
| void | setDirty (bool isDirty) |
| Set dirty flag on the TerrainProperties. More... | |
| void | setEnableAvalanching (bool enable) |
| Set whether to enable avalanching in the terrain. More... | |
| void | setEnableCreateDynamicMass (bool enable) |
| Sets if dynamic mass should be created during excavation. More... | |
| void | setEnableLockedBorders (bool enable) |
| Set whether to fixate the height of the borders in the terrain. More... | |
| void | setEnableSoilCompaction (bool enable) |
| Set whether or not to use the soil compaction calculations in the terrain. More... | |
| void | setMaximumParticleActivationVolume (agx::Real volume) |
| Sets the maximum volume (m3) of active zone wedges that should wake particles. More... | |
| void | setPenetrationForceVelocityScaling (agx::Real penetrationForceVelocityScaling) |
| Set the penetration force velocity scaling constant. More... | |
| 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. More... | |
| void | setSoilMergeSpeedThreshold (agx::Real speedThreshold) |
| Set the absolute lower speed (m/s) threshold where soil particles are allowed to merge with the terrain. More... | |
| void | setSoilParticleGrowthRate (agx::Real growthRateFactor) |
| Set the rate factor in the algorithm for growing soil particles from fluid mass and particle resizing. More... | |
| void | setSoilParticleLifeTime (agx::Real lifeTime) |
| Set the lifetime (s) of created soil particles in the terrain. More... | |
| void | setSoilParticleMergeRate (agx::Real mergeRate) |
| Set the merge rate for soil particles into the terrain. More... | |
| 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. More... | |
| void | setSoilParticleSizeScaling (float scalingFactor) |
| Set soil particle size scaling factor. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Static Public Member Functions | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
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 } |
Protected Member Functions | |
| virtual | ~TerrainProperties () |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Class for containing and managing the different agxTerrain::Terrain settings.
Definition at line 31 of file TerrainProperties.h.
|
protected |
Definition at line 316 of file TerrainProperties.h.
|
protected |
| Enumerator | |
|---|---|
| LOCKED_BORDERS | |
| CREATE_PATICLES | |
| DELETE_PARTICLES_OUTSIDE_BOUNDS | |
| ENABLE_SOIL_COMPACTION | |
| ENABLE_AVALANCHING | |
| ENABLE_DYNAMIC_MASS | |
Definition at line 307 of file TerrainProperties.h.
|
protectedvirtual |
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
protectedinherited |
|
inline |
Definition at line 353 of file TerrainProperties.h.
| agx::Real agxTerrain::TerrainProperties::getAvalancheErrorThreshold | ( | ) | const |
|
inline |
Get the maximum allowed height transfer per time step due to avalanching.
Definition at line 346 of file TerrainProperties.h.
| bool agxTerrain::TerrainProperties::getCreateParticles | ( | ) | const |
| agx::Real agxTerrain::TerrainProperties::getDeformerActivationSpeed | ( | ) | 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.
|
staticprotectedinherited |
|
inline |
Definition at line 360 of file TerrainProperties.h.
| bool agxTerrain::TerrainProperties::getEnableAvalanching | ( | ) | const |
|
inline |
Definition at line 388 of file TerrainProperties.h.
|
inline |
Definition at line 339 of file TerrainProperties.h.
| bool agxTerrain::TerrainProperties::getEnableSoilCompaction | ( | ) | const |
|
inline |
Definition at line 374 of file TerrainProperties.h.
|
inline |
Definition at line 367 of file TerrainProperties.h.
|
inherited |
|
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.
Definition at line 381 of file TerrainProperties.h.
| agx::Real agxTerrain::TerrainProperties::getSoilMergeSpeedThreshold | ( | ) | const |
| agx::Real agxTerrain::TerrainProperties::getSoilParticleGrowthRate | ( | ) | const |
| agx::Real agxTerrain::TerrainProperties::getSoilParticleLifeTime | ( | ) | const |
| agx::Real agxTerrain::TerrainProperties::getSoilParticleMergeRate | ( | ) | const |
| agx::Real agxTerrain::TerrainProperties::getSoilParticleMergeThreshold | ( | ) | const |
| float agxTerrain::TerrainProperties::getSoilParticleSizeScaling | ( | ) |
Get soil particle size scaling factor.
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
| bool agxTerrain::TerrainProperties::isDirty | ( | ) | const |
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
Referenced by agxData::Val< UInt >::Val().
Set the fraction of the height difference that violates the angle of repose condition that will be transferred in each time step during avalanching.
| decayFraction | - The fraction of the height difference that violates the angle of repose that will be transferred. (Default: 0.1) |
Set the fractional error threshold for the height difference that will trigger avalanching in a grid point.
| errorThreshold | - the fractional error threshold that will determine if a height difference will trigger avalanching. (Default: 1E-4) |
Set the maximum allowed height (m) transfer per time step due to avalanching.
| maxHeightGrowth | - The maximum height allowed during a height (m) transfer. (Default: infinity) |
| void agxTerrain::TerrainProperties::setCreateParticles | ( | bool | enable | ) |
Set whether the terrain should create particles or not during shovel interactions.
| enable | - true if particles should be created from excavation - false otherwise. |
Set the shovel speed threshold in the excavation plane of shovel deformers when static mass in the active zone is converted to dynamic mass.
| activationSpeed | - the specified speed threshold where static mass is converted to dynamic mass in the deformer active zone. (Default: 0.1 m/s) |
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
| void agxTerrain::TerrainProperties::setDeleteSoilParticlesOutsideBounds | ( | bool | enable | ) |
Set if terrain should delete soil particles outside of terrain bounds.
| enable | - true if particle should be deleted when outside terrain bounds - false otherwise. |
| void agxTerrain::TerrainProperties::setDirty | ( | bool | isDirty | ) |
Set dirty flag on the TerrainProperties.
| isDirty | - set whether the properties should be marked as dirty or not. |
| void agxTerrain::TerrainProperties::setEnableAvalanching | ( | bool | enable | ) |
Set whether to enable avalanching in the terrain.
| enable | - true if avalanching should be enabled - false otherwise. |
| 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.
| enable | - True if dynamic mass should be created during excavation, false otherwise ( Default: True ) |
| 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.
| enable | - true if borders should be locked - false otherwise. |
| void agxTerrain::TerrainProperties::setEnableSoilCompaction | ( | bool | enable | ) |
Set whether or not to use the soil compaction calculations in the terrain.
| enable | - true if compaction should be calculated in the terrain - false otherwise. |
Sets the maximum volume (m3) of active zone wedges that should wake particles.
| volume | - the maximum volume of active zone wedges that should wake particles. ( Default:Infinity ) |
| 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 )
| penetrationForceVelocityScaling | - The coefficient for scaling the penetration force with the shovel velocity in the cutting direction (Default: 0.0) |
| 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.
| compliance | - the compliance to set in the specified degree of freedom |
| dof | - Target dof for the change of compliance |
Set the absolute lower speed (m/s) threshold where soil particles are allowed to merge with the terrain.
| speedThreshold | - The lower speed threshold where soil particles are allowed to merge with the terrain. ( Default: 4 ) |
Set the rate factor in the algorithm for growing soil particles from fluid mass and particle resizing.
| growthRateFactor | - the rate factor in the algorithm that governs particle growth from fluid mass and resizing. (Default: 0.125) |
Set the lifetime (s) of created soil particles in the terrain.
The particle will be deleted after existing for the specified lifetime.
| lifeTime | - The lifetime of created particles. ( Default: Infinity ) |
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.
| mergeRate | - the fraction of the current particle mass that should be merged into the terrain for each second. ( Default: 9) |
Set the fraction of the particle nominal radius that will trigger instant merge of soil particles into the terrain during merging.
| radiusFraction | - the fraction of the particle nominal radius that will trigger instant merge for a particle. (Default: 0.4) |
| 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
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
staticinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.