35 class TerrainMaterial;
36 class TerrainToolCollection;
75 Shovel* connectedShovel=
nullptr);
107 ExcavationSettings& getExcavationSettings(ExcavationMode mode);
137 agx::Vec3 getCuttingDirectionWorld()
const;
162 agx::Real computeCuttingEdgeLength()
const;
180 void setExcavationSettings( ExcavationMode mode, ExcavationSettings excavationSettings );
192 void setCuttingEdge(
agx::Line cuttingEdge);
197 void setCuttingDirection(
agx::Vec3 cuttingDirection);
207 void setToothMinimumRadius(
agx::Real radius);
212 void setToothMaximumRadius(
agx::Real radius);
222 void setNoMergeExtensionDistance(
agx::Real extensionDistance);
227 void setMinimumSubmergedContactLengthFraction(
agx::Real minimumSubmergedContactLengthFraction);
232 agx::Plane getCurrentSeparationPlane(
Terrain* terrain, ExcavationMode mode )
const;
237 agx::Real getMinimumSubmergedContactLengthFraction()
const;
242 agx::Real getNoMergeExtensionDistance()
const;
248 void setVerticalBladeSoilMergeDistance(
agx::Real verticalSoilBladeMergeDistance);
255 void setSecondarySeparationDeadloadLimit(
agx::Real secondarySeparationLimit );
261 agx::Real getVerticalBladeSoilMergeDistance()
const;
285 void setPenetrationDepthThreshold(
agx::Real depthThreshold);
309 agx::Real getPenetrationDepthThreshold()
const;
315 void setPenetrationForceScaling(
agx::Real penetrationForceScaling);
320 agx::Real getPenetrationForceScaling()
const;
328 void setEnableParticleFreeDeformers(
bool enable);
333 bool getEnableParticleFreeDeformers()
const;
339 void setAlwaysRemoveShovelContacts(
bool enable);
344 bool getAlwaysRemoveShovelContacts()
const;
350 void setMaxPenetrationForce(
agx::Real maxPenetrationForce);
356 agx::Real getMaxPenetrationForce()
const;
362 agx::Real getSecondarySeparationDeadloadLimit()
const;
397 void setContactRegionThreshold(
agx::Real contactRegionThreshold );
406 agx::Real getContactRegionThreshold()
const;
415 void setContactRegionVerticalLimit(
agx::Real verticalLimit );
424 agx::Real getContactRegionVerticalLimit()
const;
432 void setEnableInnerShapeCreateDynamicMass(
bool enable );
439 bool getEnableInnerShapeCreateDynamicMass()
const;
447 void setEnableParticleForceFeedback(
bool enable );
453 bool getEnableParticleForceFeedback();
460 void setEnable(
bool enable);
466 bool getEnable()
const;
475 agx::Real getParticleInclusionMultiplier()
const;
486 void setParticleInclusionMultiplier(
agx::Real radiusMultiplier );
511 void setEnable(
bool enable);
517 void setEnableCreateDynamicMass(
bool enable);
523 void setEnableForceFeedback(
bool enable);
528 bool getEnable()
const;
533 bool getEnableForceFeedback()
const;
538 bool getEnableCreateDynamicMass()
const;
552 ENABLE_CREATE_DYNAMIC_MASS = 1 << 1,
553 ENABLE_FORCE_FEEDBACK = 1 << 2,
555 using Flags = agx::BitState<StateFlags, agx::UInt32>;
566 agx::
Bool initializeCollection( TerrainToolCollection* collection,
agxSDK::Simulation* simulation );
572 void uninitializeCollection( TerrainToolCollection* collection,
agxSDK::Simulation* simulation );
578 void onPre( TerrainToolCollection* collection );
584 void onPost( TerrainToolCollection* collection );
586 bool getShovelPlanes(TerrainToolCollection* collection,
592 void removeTerrainShovelContacts(TerrainToolCollection* collection);
594 void removeTerrainShovelContactsDeformer(TerrainToolCollection* collection);
596 bool isEdgeSubmerged(const
agx::
Line& edge, const Terrain* terrain) const;
598 bool isEdgeSubmergedInSolid(const
agx::
Line& edge, const Terrain* terrain) const;
600 bool isEdgeSubmergedInHeightfield(const
agx::
Line& edge, const
agxCollide::HeightField* heightfield, const Terrain* terrain) const;
602 agx::
Real getSubmergedEdgeLength(const
agx::
Line& edge, const Terrain* terrain) const;
604 agx::
Vec3 getCuttingEdgeVelocity();
606 void correctShovelVectors();
608 void calculateDeadLoadFraction( const Terrain* terrain,
609 const ActiveZone* activeZone,
612 void setInnerContactArea(
agx::
Real contactArea );
614 void setSettingsAreDirty(
bool enable);
616 bool getSettingsAreDirty() const;
618 agx::
Real computeDefaultContactRegionThreshold() const;
620 Shovel* getConnectedShovel();
649 REMOVE_SHOVEL_CONTACTS = 1 << 1,
650 INNER_SHAPE_CREATE_DYNAMIC_MASS = 1 << 2,
651 ENABLE_PARTICLE_FREE_DEFORMATION = 1 << 3,
652 ENABLE_PARTICLE_FORCE_FEEDBACK = 1 << 4
654 using Flags = agx::BitState<StateFlags, agx::UInt32>;