AGX Dynamics  2.37.2.0
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 }
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.
agx::Real getAverageContactForce(agxCollide::GeometryContactPtrVector matches, bool print=false)
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes...
Definition: Geometry.h:59
Normal and friction equation calculated only in the DIRECT solver.
Definition: FrictionModel.h:58
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
Vector containing &#39;raw&#39; data.
Definition: Vector.h:245
Box friction model with oriented friction box.
void setCachedNormalForce(int pointIndex, agx::Real normalForce)
A geometry contact hold contact information between two geometries.
ShovelAggregateFrictionModel(agx::Frame *frame, agx::FrictionModel::SolveType solveType=agx::FrictionModel::DIRECT)
The object defining a frame of reference and providing transformations operations.
Definition: Frame.h:67
double Real
Definition: Real.h:42