|
AGX Dynamics 2.42.3.1
|
Class that contains information about a terrain contact between an external object and the terrain geometry. More...
#include <TerrainContact.h>
Inheritance diagram for agxTerrain::TerrainContact:Classes | |
| struct | SurfaceForce |
| Struct holding information about a surface force of the Terrain contact. More... | |
Public Types | |
| typedef agx::Vector< SurfaceForce > | SurfaceForceVector |
Public Member Functions | |
| TerrainContact () | |
| Internal method. | |
| TerrainContact (const agxCollide::Geometry *geometry, const TerrainIndexToDepthTable terrainIndicesToDepth, const agx::Real area, const agx::Real meanGridDepth, const agx::Real currentContactTime, const agx::Bound3 contactBound) | |
| Internal method. | |
| agx::Real | calculateTotalForce () const |
| agx::Real | getArea () const |
| Get the contact area. | |
| agx::Bound3 | getContactBound () const |
| The 3D bound spanned by the contact points of the colliding geometry. | |
| agx::Vec3 | getContactMidPoint () const |
| agx::Real | getCurrentContactTime () const |
| Get the time that the colliding geometry has been in contact with the terrain. | |
| const TerrainIndexToDepthTable & | getDepthTable () const |
| Get the table which holds information about the contact depth at each terrain index in the contact area. | |
| const agxCollide::Geometry * | getGeometry () const |
| Get the geometry colliding with the terrain. | |
| agx::Real | getMaxSurfaceForce () const |
| Get the maximum force of the Terrain contact from the associated contact points. | |
| agx::Real | getMeanGridDepth () const |
| Get the mean depth of the intersected grid points in the TerrainContact. | |
| agx::Real | getSurfaceForce () const |
| Get the total surface force of the Terrain contact from all the contact points. | |
| const SurfaceForceVector & | getSurfacePointForces () const |
| Get the surface point forces active in the Terrain contact. | |
| agx::Real | getSurfaceStress () const |
| Get the average surface stress of the contact which is calculated using the approximated contact area and the total surface force of the contact. | |
| agx::Real | getSurfaceStressInIndex (const agx::Vec2i &terrainIndex) const |
| Get the specific contact stress in a terrain index in the contact by scaling the average stress with the depth in the specific index. | |
| void | setContactArea (agx::Real area) |
| Internal method. | |
| void | setSurfaceForce (agx::Real surfaceForce) |
| Internal method. | |
| void | setSurfacePointForces (const SurfaceForceVector &pointForces) |
| Internal method. | |
| void | setSurfaceStress (agx::Real surfaceStress) |
| Internal method. | |
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. | |
Protected Member Functions | |
| virtual | ~TerrainContact () |
| Reference counted object - protected destructor. | |
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 |
Class that contains information about a terrain contact between an external object and the terrain geometry.
The contact contains an estimated area calculated from grid points intersecting the colliding geometry as well as mean stress calculated from estimated area and contact forces. Stress distribution can also be estimated by scaling the surface stress with the depth in each grid point.
This data container is used primarily in soil compaction calculation.
Definition at line 40 of file TerrainContact.h.
Definition at line 52 of file TerrainContact.h.
| agxTerrain::TerrainContact::TerrainContact | ( | ) |
Internal method.
Default constructor
| agxTerrain::TerrainContact::TerrainContact | ( | const agxCollide::Geometry * | geometry, |
| const TerrainIndexToDepthTable | terrainIndicesToDepth, | ||
| const agx::Real | area, | ||
| const agx::Real | meanGridDepth, | ||
| const agx::Real | currentContactTime, | ||
| const agx::Bound3 | contactBound | ||
| ) |
Internal method.
Construct a Terrain contact with specified arguments.
|
protectedvirtual |
Reference counted object - protected destructor.
| agx::Real agxTerrain::TerrainContact::calculateTotalForce | ( | ) | const |
| agx::Real agxTerrain::TerrainContact::getArea | ( | ) | const |
Get the contact area.
The contact area is approximated by doing intersection tests between the colliding geometry and the terrain in grid points close to the contact points. All the grid points which intersect the collider are used when calculating the total area which is given by: number_of_grid_points * gridElementArea.
| agx::Bound3 agxTerrain::TerrainContact::getContactBound | ( | ) | const |
The 3D bound spanned by the contact points of the colliding geometry.
| agx::Vec3 agxTerrain::TerrainContact::getContactMidPoint | ( | ) | const |
| agx::Real agxTerrain::TerrainContact::getCurrentContactTime | ( | ) | const |
Get the time that the colliding geometry has been in contact with the terrain.
Mainly used in compression calculation in order to include compression rate relaxation.
| const TerrainIndexToDepthTable & agxTerrain::TerrainContact::getDepthTable | ( | ) | const |
Get the table which holds information about the contact depth at each terrain index in the contact area.
| const agxCollide::Geometry * agxTerrain::TerrainContact::getGeometry | ( | ) | const |
Get the geometry colliding with the terrain.
| agx::Real agxTerrain::TerrainContact::getMaxSurfaceForce | ( | ) | const |
| agx::Real agxTerrain::TerrainContact::getMeanGridDepth | ( | ) | const |
Get the mean depth of the intersected grid points in the TerrainContact.
| agx::Real agxTerrain::TerrainContact::getSurfaceForce | ( | ) | const |
| const SurfaceForceVector & agxTerrain::TerrainContact::getSurfacePointForces | ( | ) | const |
| agx::Real agxTerrain::TerrainContact::getSurfaceStress | ( | ) | const |
Get the average surface stress of the contact which is calculated using the approximated contact area and the total surface force of the contact.
| agx::Real agxTerrain::TerrainContact::getSurfaceStressInIndex | ( | const agx::Vec2i & | terrainIndex | ) | const |
Get the specific contact stress in a terrain index in the contact by scaling the average stress with the depth in the specific index.
| void agxTerrain::TerrainContact::setContactArea | ( | agx::Real | area | ) |
Internal method.
Set the contact area of the contact.
| area | - The surface area of the contact. |
| void agxTerrain::TerrainContact::setSurfaceForce | ( | agx::Real | surfaceForce | ) |
Internal method.
Set the surface force of the contact.
| surfaceForce | - The surface force to set on the contact |
| void agxTerrain::TerrainContact::setSurfacePointForces | ( | const SurfaceForceVector & | pointForces | ) |
Internal method.
Set the surface point forces of the contact.
| pointForces | - The point forces to set on the contact. |
| void agxTerrain::TerrainContact::setSurfaceStress | ( | agx::Real | surfaceStress | ) |
Internal method.
Set the surface stress of the contact.
| surfaceStress | - The surface stress to set. |