AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxTerrain::WheelDeformationProperties Class Reference

Class containing settings for the terrain deformation algorithm by the TerrainWheel. More...

#include <WheelDeformationProperties.h>

+ Inheritance diagram for agxTerrain::WheelDeformationProperties:

Public Types

using Flags = agx::BitState< WheelDeformationFlags, agx::UInt32 >
 
enum  WheelDeformationFlags : agx::UInt32 {
  ENABLE_DEFORMATION = 1 << 0 , ENABLE_DISPLACEMENT = 1 << 1 , ENABLE_MASS_REMOVAL = 1 << 2 , BULLDOZING_SLIP_DEPENDENT = 1 << 3 ,
  SLIP_DISPLACEMENT_SLIP_DEPENDENT = 1 << 4
}
 

Public Member Functions

 WheelDeformationProperties ()
 Default constructor.
 
agx::Real getBackwardDisplacementDistScaling () const
 
agx::Real getBulldozeDisplacementAmountFactor () const
 
bool getEnableDeformation () const
 
bool getEnableDisplacement () const
 
agx::Real getForwardDisplacementDistScaling () const
 
agx::Real getForwardDisplacementWeight () const
 
agx::Real getLateralDisplacementDistScaling () const
 
bool getSlipDependenceBulldozing () const
 
bool getSlipDependenceSlipDisplacement () const
 
void setBackwardDisplacementDistScaling (agx::Real r)
 Sets the backward displacement distance for slip-based displacement.
 
void setBulldozeDisplacementAmountFactor (agx::Real r)
 Sets the maximum fraction of total removed mass used for bulldozing.
 
void setEnableDeformation (bool enable)
 Enable/disable terrain deformation (effectively, mass removal) by the TerrainWheel.
 
void setEnableDisplacement (bool enable)
 Enable/disable the displacement of removed mass to neighboring voxels.
 
void setForwardDisplacementDistScaling (agx::Real r)
 Sets the forward (bulldozing) displacement distance.
 
void setForwardDisplacementWeight (agx::Real r)
 Sets the ratio of bulldozed mass distributed forward vs.
 
void setLateralDisplacementDistScaling (agx::Real r)
 Sets the lateral displacement distance.
 
void setSlipDependenceBulldozing (bool enable)
 Enable/disable slip ratio dependence for bulldozing calculations.
 
void setSlipDependenceSlipDisplacement (bool enable)
 Enable/disable slip ratio dependence for slip-based (to the rear) displacement.
 
- 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.
 
Referenced & operator= (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.
 

Public Attributes

 AGXTERRAIN_TERRAINWHEEL_STORE_RESTORE_INTERFACE
 

Protected Member Functions

bool getEnableMassRemoval () const
 
void setEnableMassRemoval (bool enable)
 Enable/disable the mass removal from the terrain.
 
- 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 DeleteHandler * getDeleteHandler ()
 
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 containing settings for the terrain deformation algorithm by the TerrainWheel.

The algorithm calculates mass removal based on the geometric wheel-terrain overlap. This is stored in an internal NodeVector struct, containing the surface vertex indices and the amount of removed occupancy. It is possible to analyze this via the TerrainWheel::getContactPatch method.

The displacement algorithm is divided into bulldozing (forward and lateral directions) and slip-based displacement (to the rear). The mass is equally distributed to the neighbouring voxels. A bulldozing factor is used to divide the removed mass into the different displacement modes. Another weight is used to determine how much goes to the forward vs lateral bulldozing directions.

The spatial reach for the displacement is determined by different scale modifiers, which are applied as follows:

  • Forward bulldozing voxels are included in the forward direction within a distance of radius * forward modifier
  • lateral bulldozing voxels are included in the lateral direction within a distance of width * lateral modifier
  • Rear slip-based displacement voxels are included in the forward direction within a distance of radius * rear modifier

Default values: Deformation: enabled Displacement: enabled Mass removal: enabled Slip dependence in bulldozing: disabled Slip dependence in slip-based displacement: enabled Forward displacement weight: 0.5 Forward displacement distance scale modifier: 0.5 Lateral displacement distance scale modifier: 0.5 Bulldozing amount factor: 0.5 Rear displacement distance scale modifier: 0.5

Definition at line 65 of file WheelDeformationProperties.h.

Member Typedef Documentation

◆ Flags

Member Enumeration Documentation

◆ WheelDeformationFlags

Enumerator
ENABLE_DEFORMATION 
ENABLE_DISPLACEMENT 
ENABLE_MASS_REMOVAL 
BULLDOZING_SLIP_DEPENDENT 
SLIP_DISPLACEMENT_SLIP_DEPENDENT 

Definition at line 197 of file WheelDeformationProperties.h.

Constructor & Destructor Documentation

◆ WheelDeformationProperties()

agxTerrain::WheelDeformationProperties::WheelDeformationProperties ( )

Default constructor.

Member Function Documentation

◆ getBackwardDisplacementDistScaling()

agx::Real agxTerrain::WheelDeformationProperties::getBackwardDisplacementDistScaling ( ) const
Returns
Scaling factor for slip-based (rearward) displacement distance (multiplied by wheel radius).

◆ getBulldozeDisplacementAmountFactor()

agx::Real agxTerrain::WheelDeformationProperties::getBulldozeDisplacementAmountFactor ( ) const
Returns
The fraction [0, 1] of the total removed mass allocated to bulldozing (forward and lateral). The remaining (1 - factor) is used for slip displacement.

◆ getEnableDeformation()

bool agxTerrain::WheelDeformationProperties::getEnableDeformation ( ) const
Returns
True if terrain deformation (both displacement and mass removal) by the TerrainWheel is enabled.
Note
This is a prerequisite for any displacement or mass removal to occur.

◆ getEnableDisplacement()

bool agxTerrain::WheelDeformationProperties::getEnableDisplacement ( ) const
Returns
True if the displacement of removed mass to neighboring voxels is enabled.

◆ getEnableMassRemoval()

bool agxTerrain::WheelDeformationProperties::getEnableMassRemoval ( ) const
protected
Returns
True if mass removal from the terrain based on wheel overlap is enabled.

◆ getForwardDisplacementDistScaling()

agx::Real agxTerrain::WheelDeformationProperties::getForwardDisplacementDistScaling ( ) const
Returns
Scaling factor for forward displacement distance (multiplied by wheel radius). Used in forward bulldozing.

◆ getForwardDisplacementWeight()

agx::Real agxTerrain::WheelDeformationProperties::getForwardDisplacementWeight ( ) const
Returns
The weight [0, 1] determining how much of the bulldozed mass is distributed forward vs. laterally.

◆ getLateralDisplacementDistScaling()

agx::Real agxTerrain::WheelDeformationProperties::getLateralDisplacementDistScaling ( ) const
Returns
Scaling factor for lateral displacement distance (multiplied by wheel width).

◆ getSlipDependenceBulldozing()

bool agxTerrain::WheelDeformationProperties::getSlipDependenceBulldozing ( ) const
Returns
True if bulldozing displacement (front and lateral directions) depends on the wheel slip ratio.

◆ getSlipDependenceSlipDisplacement()

bool agxTerrain::WheelDeformationProperties::getSlipDependenceSlipDisplacement ( ) const
Returns
True if slip-based displacement (to the rear) depends on wheel slip ratio.

◆ setBackwardDisplacementDistScaling()

void agxTerrain::WheelDeformationProperties::setBackwardDisplacementDistScaling ( agx::Real  r)

Sets the backward displacement distance for slip-based displacement.

Parameters
r- Multiplier for wheel radius to determine the search distance for voxels.

◆ setBulldozeDisplacementAmountFactor()

void agxTerrain::WheelDeformationProperties::setBulldozeDisplacementAmountFactor ( agx::Real  r)

Sets the maximum fraction of total removed mass used for bulldozing.

The remaining fraction (1 - r) is allocated to slip displacement (rearward).

Parameters
r- Fraction in range [0, 1].

◆ setEnableDeformation()

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

Enable/disable terrain deformation (effectively, mass removal) by the TerrainWheel.

Deformation must be enabled for displacement to neighbouring columns to occur.

Parameters
enable- True to enable deformation, false otherwise.

◆ setEnableDisplacement()

void agxTerrain::WheelDeformationProperties::setEnableDisplacement ( bool  enable)

Enable/disable the displacement of removed mass to neighboring voxels.

Note
Deformation must be enabled for displacement to occur.
Parameters
enable- True to displace mass.

◆ setEnableMassRemoval()

void agxTerrain::WheelDeformationProperties::setEnableMassRemoval ( bool  enable)
protected

Enable/disable the mass removal from the terrain.

Parameters
enableTrue to allow mass removal from the terrain based on wheel overlap.

◆ setForwardDisplacementDistScaling()

void agxTerrain::WheelDeformationProperties::setForwardDisplacementDistScaling ( agx::Real  r)

Sets the forward (bulldozing) displacement distance.

Parameters
r- Multiplier for wheel radius to determine the search distance for voxels.

◆ setForwardDisplacementWeight()

void agxTerrain::WheelDeformationProperties::setForwardDisplacementWeight ( agx::Real  r)

Sets the ratio of bulldozed mass distributed forward vs.

laterally.

Parameters
r- Weight factor [0, 1]. Higher values increase forward displacement.

◆ setLateralDisplacementDistScaling()

void agxTerrain::WheelDeformationProperties::setLateralDisplacementDistScaling ( agx::Real  r)

Sets the lateral displacement distance.

Parameters
r- Multiplier for wheel width to determine the search distance for voxels.

◆ setSlipDependenceBulldozing()

void agxTerrain::WheelDeformationProperties::setSlipDependenceBulldozing ( bool  enable)

Enable/disable slip ratio dependence for bulldozing calculations.

◆ setSlipDependenceSlipDisplacement()

void agxTerrain::WheelDeformationProperties::setSlipDependenceSlipDisplacement ( bool  enable)

Enable/disable slip ratio dependence for slip-based (to the rear) displacement.

Member Data Documentation

◆ AGXTERRAIN_TERRAINWHEEL_STORE_RESTORE_INTERFACE

agxTerrain::WheelDeformationProperties::AGXTERRAIN_TERRAINWHEEL_STORE_RESTORE_INTERFACE

Definition at line 207 of file WheelDeformationProperties.h.


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