35 class TerrainMaterial;
36 class TerrainToolCollection;
102 ExcavationSettings& getExcavationSettings(ExcavationMode mode);
132 agx::Vec3 getCuttingDirectionWorld()
const;
157 agx::Real computeCuttingEdgeLength()
const;
175 void setExcavationSettings( ExcavationMode mode, ExcavationSettings excavationSettings );
187 void setCuttingEdge(
agx::Line cuttingEdge);
192 void setCuttingDirection(
agx::Vec3 cuttingDirection);
202 void setToothMinimumRadius(
agx::Real radius);
207 void setToothMaximumRadius(
agx::Real radius);
217 void setNoMergeExtensionDistance(
agx::Real extensionDistance);
222 void setMinimumSubmergedContactLengthFraction(
agx::Real minimumSubmergedContactLengthFraction);
227 agx::Plane getCurrentSeparationPlane(
Terrain* terrain, ExcavationMode mode )
const;
232 agx::Real getMinimumSubmergedContactLengthFraction()
const;
237 agx::Real getNoMergeExtensionDistance()
const;
243 void setVerticalBladeSoilMergeDistance(
agx::Real verticalSoilBladeMergeDistance);
250 void setSecondarySeparationDeadloadLimit(
agx::Real secondarySeparationLimit );
256 agx::Real getVerticalBladeSoilMergeDistance()
const;
280 void setPenetrationDepthThreshold(
agx::Real depthThreshold);
304 agx::Real getPenetrationDepthThreshold()
const;
310 void setPenetrationForceScaling(
agx::Real penetrationForceScaling);
315 agx::Real getPenetrationForceScaling()
const;
323 void setEnableParticleFreeDeformers(
bool enable);
328 bool getEnableParticleFreeDeformers()
const;
334 void setAlwaysRemoveShovelContacts(
bool enable);
339 bool getAlwaysRemoveShovelContacts()
const;
345 void setMaxPenetrationForce(
agx::Real maxPenetrationForce);
351 agx::Real getMaxPenetrationForce()
const;
357 agx::Real getSecondarySeparationDeadloadLimit()
const;
391 void setBottomContactThreshold(
agx::Real bottomContactThreshold );
397 agx::Real getBottomContactThreshold()
const;
405 void setEnableInnerShapeCreateDynamicMass(
bool enable );
412 bool getEnableInnerShapeCreateDynamicMass()
const;
419 void setEnable(
bool enable);
425 bool getEnable()
const;
450 void setEnable(
bool enable);
456 void setEnableCreateDynamicMass(
bool enable);
462 void setEnableForceFeedback(
bool enable);
467 bool getEnable()
const;
472 bool getEnableForceFeedback()
const;
477 bool getEnableCreateDynamicMass()
const;
491 ENABLE_CREATE_DYNAMIC_MASS = 1 << 1,
492 ENABLE_FORCE_FEEDBACK = 1 << 2,
494 using Flags = agx::BitState<StateFlags, agx::UInt32>;
505 agx::
Bool initializeCollection( TerrainToolCollection* collection,
agxSDK::Simulation* simulation );
511 void uninitializeCollection( TerrainToolCollection* collection,
agxSDK::Simulation* simulation );
517 void onPre( TerrainToolCollection* collection );
523 void onPost( TerrainToolCollection* collection );
525 bool getShovelPlanes(TerrainToolCollection* collection,
531 void removeTerrainShovelContacts(TerrainToolCollection* collection);
533 void removeTerrainShovelContactsDeformer(TerrainToolCollection* collection);
535 bool isEdgeSubmerged(const
agx::
Line& edge, const Terrain* terrain) const;
537 bool isEdgeSubmergedInSolid(const
agx::
Line& edge, const Terrain* terrain) const;
539 bool isEdgeSubmergedInHeightfield(const
agx::
Line& edge, const
agxCollide::HeightField* heightfield, const Terrain* terrain) const;
541 agx::
Real getSubmergedEdgeLength(const
agx::
Line& edge, const Terrain* terrain) const;
543 agx::
Vec3 getCuttingEdgeVelocity();
545 void correctShovelVectors();
547 void calculateDeadLoadFraction( const Terrain* terrain,
548 const ActiveZone* activeZone,
551 void setInnerContactArea(
agx::
Real contactArea );
553 void setSettingsAreDirty(
bool enable);
555 bool getSettingsAreDirty() const;
557 agx::
Real computeDefaultBottomContactThreshold() const;
586 REMOVE_SHOVEL_CONTACTS = 1 << 1,
588 INNER_SHAPE_CREATE_DYNAMIC_MASS = 1 << 2,
590 ENABLE_PARTICLE_FREE_DEFORMATION = 1 << 3,
593 using Flags = agx::BitState<StateFlags, agx::UInt32>;