AGX Dynamics  2.38.0.2
TerrainFrictionModels.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
19 #include <agx/config/AGX_USE_AGXTERRAIN.h>
21 #include <agxCollide/Contacts.h>
22 #include <array>
23 
24 
25 
26 namespace agxTerrain
27 {
35  {
36  public:
39 
40  virtual void initialize( const agx::Physics::GeometryContactPtr geometryContact,
41  size_t pointIndex,
42  agx::Real dt,
43  agx::RangeReal& ret_boundU,
44  agx::RangeReal& ret_boundV ) const override;
45 
46  void setCachedNormalForce( int pointIndex, agx::Real normalForce );
47  void onPre();
48  void clear();
49 
50  private:
51  // Shovel contacts always contains up to 4 points. They all
52  // appear in the same order.
53  std::array<agx::Real, 4> m_cachedNormalForce;
54  mutable size_t m_currentPointIndex;
55  };
56 
58 }
agxTerrain::ShovelAggregateFrictionModel::setCachedNormalForce
void setCachedNormalForce(int pointIndex, agx::Real normalForce)
agxTerrain::ShovelAggregateFrictionModel::clear
void clear()
agx::Real
double Real
Definition: Real.h:42
agxTerrain
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
Definition: Geometry.h:58
agx::FrictionModel::DIRECT
@ DIRECT
Normal and friction equation calculated only in the DIRECT solver.
Definition: FrictionModel.h:58
agx::VectorPOD< GeometryContact * >
agx::FrictionModel::SolveType
SolveType
Definition: FrictionModel.h:55
agx::Physics::GeometryContactPtr
A geometry contact hold contact information between two geometries.
Definition: GeometryContactEntity.h:224
agxTerrain::getAverageContactForce
agx::Real getAverageContactForce(agxCollide::GeometryContactPtrVector matches, bool print=false)
OrientedFrictionModels.h
agxTerrain::ShovelAggregateFrictionModel::~ShovelAggregateFrictionModel
~ShovelAggregateFrictionModel()
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
agxTerrain::ShovelAggregateFrictionModel::ShovelAggregateFrictionModel
ShovelAggregateFrictionModel(agx::Frame *frame, agx::FrictionModel::SolveType solveType=agx::FrictionModel::DIRECT)
agx::OrientedBoxFrictionModel
Box friction model with oriented friction box.
Definition: OrientedFrictionModels.h:98
Contacts.h
agxTerrain::ShovelAggregateFrictionModel::initialize
virtual void initialize(const agx::Physics::GeometryContactPtr geometryContact, size_t pointIndex, agx::Real dt, agx::RangeReal &ret_boundU, agx::RangeReal &ret_boundV) const override
Initializes the bounds, i.e., max force for the tangential equations.
agxTerrain::ShovelAggregateFrictionModel::onPre
void onPre()
agxTerrain::ShovelAggregateFrictionModel
Definition: TerrainFrictionModels.h:34
agx::Range< Real >
agx::Frame
The object defining a frame of reference and providing transformations operations.
Definition: Frame.h:67