AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
TerrainFrictionModels.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx 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
26namespace 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}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
ShovelAggregateFrictionModel(agx::Frame *frame, agx::FrictionModel::SolveType solveType=agx::FrictionModel::DIRECT)
void setCachedNormalForce(int pointIndex, agx::Real normalForce)
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.
The object defining a frame of reference and providing transformations operations.
Definition agx/Frame.h:68
@ DIRECT
Normal and friction equation calculated only in the DIRECT solver.
Box friction model with oriented friction box.
A geometry contact hold contact information between two geometries.
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
Definition Geometry.h:59
agx::Real getAverageContactForce(agxCollide::GeometryContactPtrVector matches, bool print=false)
double Real
Definition Real.h:42