AGX Dynamics 2.40.1.5
Loading...
Searching...
No Matches
ShovelAggregateContactUtils.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. 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 <agxTerrain/export.h>
20#include <agx/Material.h>
22#include <agxTerrain/Shovel.h>
23
24
25
26namespace agxTerrain
27{
44 agx::Real contactArea,
46 Terrain* terrain,
47 Shovel* shovel,
48 agx::Vec3Vector& points);
49
62 agx::Real contactArea,
63 const agx::RealVector& weights,
64 Terrain* terrain,
65 Shovel* shovel );
66
77 agx::Real contactArea,
78 const agx::ContactMaterial* sourceMaterial,
79 agx::Real excavationStiffnessMultiplier);
80
82 agx::Real contactArea,
83 Shovel* shovel);
84
85
91
99
107
113 agx::ContactMaterial* contactMaterial,
114 Shovel* shovel,
115 agx::Real bodyMass,
116 agx::Real contactVelocity,
117 agx::Real contactGravity,
118 agx::Real contactArea,
119 agx::Real elasticRestLength,
120 size_t numContacts );
121
127 const agx::Vec3& normal,
128 const agx::Vec3& point,
129 const agx::RigidBody* rb1,
130 const agx::RigidBody* rb2 );
131
138 agxSDK::Simulation* simulation,
139 const agx::Vec3& position );
140
145 agxTerrain::Shovel* shovel2,
146 agx::ContactMaterial* contactMaterial = nullptr,
147 bool debugRenderContacts=false,
148 agx::Real size = 0.1);
149
150}
#define AGXTERRAIN_EXPORT
The geometry representation used by the collision detection engine.
Definition: Geometry.h:92
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:130
Shovel object used to interact with a terrain via an active zone that converts solid terrain to dynam...
Definition: Shovel.h:63
ExcavationMode
Enum for describing the different excavation modes of a shovel:
Definition: Shovel.h:117
A terrain model based a 3D grid model with overlapping height field that can be deformed by interacti...
Definition: Terrain.h:88
This class store the combine material properties between two agx::Material's.
Definition: Material.h:516
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition: Material.h:376
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:52
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
Definition: Geometry.h:59
AGXTERRAIN_EXPORT void setShovelAggregateContactMaterialFromParticles(agx::ContactMaterial *shovelAggregateCM, agx::Real contactArea, Shovel *shovel)
agxCollide::LocalGeometryContactVector AGXTERRAIN_EXPORT computeAggregatePairContacts(agxTerrain::Shovel *shovel1, agxTerrain::Shovel *shovel2, agx::ContactMaterial *contactMaterial=nullptr, bool debugRenderContacts=false, agx::Real size=0.1)
Computes the contact set between two aggregate in the cut top plane of shovel one.
agx::Real AGXTERRAIN_EXPORT estimateContactDepth(agx::ContactMaterial *contactMaterial, Shovel *shovel, agx::Real bodyMass, agx::Real contactVelocity, agx::Real contactGravity, agx::Real contactArea, agx::Real elasticRestLength, size_t numContacts)
Utility method for estimating the contact depth of a shovel <-> aggregate contact from contact veloci...
AGXTERRAIN_EXPORT void setShovelAggregateContactMaterialProperties(agx::ContactMaterial *shovelAggregateCM, agx::Real contactArea, const agx::RealVector &weights, Terrain *terrain, Shovel *shovel)
Set the shovel-aggregate contact material properties from a source contact material that should eithe...
AGXTERRAIN_EXPORT agx::Material * findShovelMaterial(agxTerrain::Shovel *shovel)
Find the agx::Material on the first contact valid contact geometry in the specified shovel.
AGXTERRAIN_EXPORT void setShovelExplicitShovelContactMaterial(agx::ContactMaterial *shovelAggregateCM, agx::Real contactArea, const agx::ContactMaterial *sourceMaterial, agx::Real excavationStiffnessMultiplier)
Set the shovel-aggregate contact material properties from a source contact material that should be a ...
AGXTERRAIN_EXPORT bool isValidContactGeometry(agxCollide::Geometry *geometry)
Checks if the specified geometry is valid for creating aggregate contacts against.
AGXTERRAIN_EXPORT agxCollide::Geometry * getFirstContactValidGeometry(const agx::RigidBody *shovelBody)
Get first contact valid geometry in the shovel rigid body for contact.
agx::Vec3 AGXTERRAIN_EXPORT calculateGravityVector(agxSDK::Simulation *simulation, const agx::Vec3 &position)
Utility method for calculating the gravity vector given a point.
agx::Real AGXTERRAIN_EXPORT calculateGv(const agx::Vec3 &normal, const agx::Vec3 &point, const agx::RigidBody *rb1, const agx::RigidBody *rb2)
Utility method for calculating the relative velocity of two bodies in a contact normal direction.
AGXTERRAIN_EXPORT bool setupShovelAggregateContactMaterial(agx::ContactMaterial *shovelAggregateCM, agx::Real contactArea, Shovel::ExcavationMode mode, Terrain *terrain, Shovel *shovel, agx::Vec3Vector &points)
Configure the contact material that is to be used in shovel-aggregate contacts.
double Real
Definition: Real.h:42