31 class AdvancedShovelSettings;
240 void store(
agxStream::OutputArchive& out) const;
241 void restore(
agxStream::InputArchive& in);
244 void restorePreShovelRefactor(
agxStream::InputArchive& in, const
agx::Line& cuttingEdge,
bool& enabled);
252 bool isDirty()
const {
return m_dirty; };
253 void setDirty(
bool enable ) { m_dirty = enable; }
259 enum CommonFlags :
agx::UInt32
261 ENABLE_PARTICLE_FREE_DEFORMATION = 1 << 0,
262 ENABLE_GENERATE_TEETH_GEOMETRY = 1 << 1,
263 ENABLE_CUSTOM_TEETH_GEOMETRY = 1 << 3,
264 ENABLE_EXCAVATION_AT_TEETH_EDGE = 1 << 4
266 using CommonBitState = agx::BitState<CommonFlags, agx::UInt32>;
268 CommonBitState m_flags;
271 struct TeethProperties
279 TeethProperties m_teethProps;
283 struct SoilPenetrationParameters
290 SoilPenetrationParameters m_soilPenetrationParameters;
291 agx::Real m_verticalSoilBladeMergeDistance;
729 REMOVE_SHOVEL_CONTACTS = 1 << 0,
730 INNER_SHAPE_CREATE_DYNAMIC_MASS = 1 << 1,
731 ENABLE_PARTICLE_FREE_DEFORMATION = 1 << 2,
732 ENABLE_PARTICLE_FORCE_FEEDBACK = 1 << 3,
733 SET_ZERO_AGGREGATE_VELOCITY = 1 << 4,
734 USE_CUSTOM_FRICTION_MODELS = 1 << 5,
735 CLAMP_AGGREGATE_VELOCITY_TO_PARTICLES = 1 << 6,
736 SET_AGGREGATE_VELOCITY_TO_SHOVEL = 1 << 7,
737 SET_NON_HOLONOMIC_CONTACTS = 1 << 8,
738 CUSTOM_PATCH_PARTITIONING = 1 << 9,
739 DISABLE_PRIMARY_WEDGE_AGGREGATES = 1 << 10,
740 INNER_SHAPE_STRICT_PARTICLE_INCLUSION = 1 << 11,
741 DISABLE_SHOVEL_SIDE_CONTACTS = 1 << 12,
742 ENABLE_CUSTOM_FORWARD_VECTOR = 1 << 13,
743 ENABLE_CUSTOM_BOTTOM_VECTOR = 1 << 14,
744 DISABLE_TEETH_SHAPE = 1 << 15,
746 using AdvancedBitState = agx::BitState<AdvancedFlags, agx::UInt32>;
747 AdvancedBitState m_advancedFlags;
750 agx::Real m_minimumSubmergedContactLengthFraction;
751 agx::Real m_secondarySeparationDeadLoadLimit;
755 agx::Real m_excavationStiffnessMultiplier;
761 bool m_shouldUpdateContactPatches;
773 ShovelDebugRenderSettings();
775 void setRenderForbiddenBounds(
bool enable );
776 bool getEnableRenderForbiddenBounds()
const;
778 void setEnableRenderAggregateContactArea(
bool enable );
779 bool getEnableRenderAggregateContactArea()
const;
781 void setEnableRenderAggregateContacts(
bool enable );
782 bool getEnableRenderAggregateContacts()
const;
784 void setEnableRenderContactPatches(
bool enable );
785 bool getEnableRenderContactPatches()
const;
787 void setEnableRenderInnerParticles(
bool enable );
788 bool getEnableRenderInnerParticles()
const;
790 void setEnableRenderWedgeParticles(
bool enable );
791 bool getEnableRenderWedgeParticles()
const;
793 void setEnableRenderWedgeVoxels(
bool enable );
794 bool getEnableRenderWedgeVoxels()
const;
796 void setEnableRenderExcludedInnerParticles(
bool enable );
797 bool getEnableRenderExcludedInnerParticles()
const;
799 void setEnableRenderContactPartitioning(
bool enable );
800 bool getEnableRenderContactPartitioning()
const;
802 void setEnableRenderSideWallContactPartitioning(
bool enable );
803 bool getEnableRenderSideWallContactPartitioning()
const;
805 void setRenderWedgeLocks(
bool enable );
806 bool getRenderWedgeLocks()
const;
808 void setParticleScalingFactor(
agx::Real scalingFactor );
809 agx::Real getParticleScalingFactor()
const;
811 void setRenderActiveZone(
bool enable );
812 bool getRenderActiveZone()
const;
814 void setRenderSoilWedges(
bool enable );
815 bool getRenderSoilWedges()
const;
817 void setRenderInnerShapeAlgorithm(
bool enable );
818 bool getRenderInnerShapeAlgorithm()
const;
820 void setRenderContactPatchIntersectionTest(
bool enable );
821 bool getRenderContactPatchIntersectionTest()
const;
823 void setContactRenderSize(
agx::Real size );
826 void setRenderTeeth(
bool enable );
827 bool getRenderTeeth()
const;
829 void setRenderShovelPrimaryVectors(
bool enable );
830 bool getRenderShovelPrimaryVectors()
const;
832 void setRenderShovelDeformerVectors(
bool enable );
833 bool getRenderShovelDeformerVectors()
const;
835 void setRenderInnerShapes(
bool enable );
836 bool getRenderInnerShapes()
const;
838 void setRenderBottomPlateAlgorithm(
bool enable );
839 bool getRenderBottomPlateAlgorithm()
const;
841 void setRenderInnerPlaneAlgorithm(
bool enable );
842 bool getRenderInnerPlaneAlgorithm()
const;
844 void setRenderShovelDeadloadParticles(
bool enable );
845 bool getRenderShovelDeadloadParticles()
const;
847 void setRenderSecondarySeparation(
bool enable );
848 bool getRenderSecondarySeparation()
const;
850 void setRenderParticleContactsConvexHull(
bool enable );
851 bool getRenderParticleContactsConvexHull()
const;
853 void setRenderSoilWedgeVelocities(
bool enable);
854 bool getRenderSoilWedgeVelocities()
const;
859 RENDER_FORBIDDEN_BOUNDS = 1 << 0,
860 RENDER_AGGREGATE_CONTACTS = 1 << 1,
861 RENDER_AGGREGATE_CONTACT_AREA = 1 << 2,
862 RENDER_AGGREGATE_CONTACT_PARTITIONING = 1 << 3,
863 RENDER_AGGREGATE_SIDE_CONTACT_PARTITIONING = 1 << 4,
864 RENDER_INNER_SHAPE_PARTICLES = 1 << 5,
865 RENDER_WEDGE_SHAPE_PARTICLES = 1 << 6,
866 RENDER_EXCLUDED_INNER_SHAPE_PARTICLES = 1 << 7,
867 RENDER_CONTACT_PATCHES = 1 << 8,
868 RENDER_WEDGE_LOCKS = 1 << 9,
869 RENDER_SOIL_WEDGES = 1 << 10,
870 RENDER_ACTIVE_ZONE = 1 << 11,
871 RENDER_INNER_SHAPE_ALGORITHM = 1 << 12,
872 RENDER_CONTACT_PATCH_INTERSECTION_TEST = 1 << 13,
873 RENDER_SHOVEL_TEETH = 1 << 14,
874 RENDER_SHOVEL_PRIMARY_VECTORS = 1 << 15,
875 RENDER_SHOVEL_DEFORMER_VECTORS = 1 << 16,
876 RENDER_SHOVEL_INNER_SHAPES = 1 << 17,
877 RENDER_BOTTOM_PLANE_ALGORITHM = 1 << 18,
878 RENDER_INNER_PLANE_ALGORITHM = 1 << 19,
879 RENDER_SHOVEL_DEADLOAD_PARTICLES = 1 << 20,
880 RENDER_SHOVEL_SECONDARY_SEPARATION = 1 << 21,
881 RENDER_WEDGE_VOXELS = 1 << 22,
882 RENDER_PARTICLE_CONTACTS_CONVEX_HULL = 1 << 23,
883 RENDER_WEDGE_VELOCITIES = 1 << 24
885 using RenderState = agx::BitState<AdvancedFlags, agx::UInt32>;
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXTERRAIN_EXPORT
Class for writing serialized data in binary format to a stream.
void setUseZeroAggregateVelocity(bool enable)
Set whenever the innerbody aggregate should have zero velocity before solve step as opposed to using ...
void setEnableInnerShapeCreateDynamicMass(bool enable)
Set if inner shape alone should always create dynamic mass.
bool getEnableTeethVolume() const
Checks whether the teeth volume feature is enabled.
void setEnableCustomPartitioning(bool enable)
Set whenever custom contact partitions should be used or not.
void setCustomBottomVector(const agx::Vec3 &bottomVector)
Sets the custom bottom plate direction vector.
void setCustomContactPatchAngleTresholds(const agx::RealVector &angleThresholds)
Specify cutsom contact patches by givin custom angle thresholds.
void setEnableCustomBottomVector(bool enable)
Enables or disables the use of a custom bottom vector.
agx::Real getContactSamplingAngleCutoff() const
void setCustomForwardVector(const agx::Vec3 &forwardVector)
Sets the custom forward vector.
void setAlwaysRemoveShovelContacts(bool enable)
Set to true/false if shovel <-> terrain contacts should always be removed.
AdvancedShovelSettings()
Constructor for serialization.
bool getEnableCustomForwardVector() const
Checks whether a custom forward vector is enabled.
agx::Bool getNonHolonomicContacts() const
agx::Real getMinimumSubmergedContactLengthFraction() const
Get the minimum submerged cutting edge length fraction [0-1] that generates submerged cutting.
void setEnableTeethVolume(bool enable)
Enables or disables the teeth volume feature.
agx::Bool getClampAggregateVelocityToParticles() const
void setSecondarySeparationDeadloadLimit(agx::Real secondarySeparationLimit)
Sets the dead-load limit where secondary separation will start to activate where the forward directio...
bool getEnableInnerShapeCreateDynamicMass() const
Get if inner shape alone should always create dynamic mass.
bool getAlwaysRemoveShovelContacts() const
agx::Bool getDisablePrimaryWedgeAggregates() const
void setAggregateVelocityToShovel(bool enable)
Set if the inner shape aggregate velocity should explicitly be set to the shovel velocity.
void setUseCustomFrictionModel(bool enable)
void setDisablePrimaryWedgeAggregates(bool enable)
Set if we should disabled wedge aggregates for primary excavation.
bool getShouldUpdateContactPatches() const
void setParticleInclusionMultiplier(agx::Real radiusMultiplier)
Set the radius multiplier for extending the inclusion bound with particle radius during post-excavati...
void setContactRegionVerticalLimit(agx::Real verticalLimit)
Set the maximum vertical distance from the shovel bottom plane where regular geometry contacts betwee...
agx::Bool getEnableCustomPartitioning() const
agx::Real getContactRegionVerticalLimit() const
bool getUseZeroAggregateVelocity() const
agx::Real getSecondarySeparationDeadloadLimit() const
void setEnableParticleForceFeedback(bool enable)
Set whenever the excavation force feedback during PRIMARY excavation should be generated from particl...
agx::UInt getNumContactPatches() const
Get the number of contact patches that will be created inside the shovel to generate shovel <-> aggre...
agx::Real getCustomExcavationStiffnessMultiplier() const
agx::Real getContactRegionThreshold() const
Get the starting distance threshold from the shovel planes where regular geometry contacts between th...
void setNonHolonomicContacts(bool enable)
Set if shovel <-> aggregate contacts should be set to use non-holonomic constraints,...
agx::RealVector getCustomContactPatchAngleThresholds() const
Specify cutsom contact patches by givin custom angle thresholds.
void setClampAggregateVelocityToParticles(bool enable)
Set if the inner shape aggregate velocity should clamped to the total soil particle velocity.
bool getEnableParticleForceFeedback()
agx::Real getParticleInclusionMultiplier() const
agx::Vec3 getCustomForwardVector() const
void setDisableShovelSideContacts(bool enable)
Set if shovel <-> aggregate side contacts should be disabled.
void restore(agxStream::InputArchive &in)
void setEnableInnerShapeMidpointInclusion(bool enable)
Set if we limit the particle inner shape inclusion to the particle midpoint.
void setNoMergeExtensionDistance(agx::Real extensionDistance)
Set the extension outside the shovel bounding box where soil particle merging is forbidden.
bool getDisableShovelSideContacts() const
void setContactRegionThreshold(agx::Real contactRegionThreshold)
Set the starting distance threshold from the shovel planes where regular geometry contacts between th...
void setShouldUpdateContactPatches(bool shouldUpdate)
Set if we should update contact patches of the shovel, this is set when the shovel contact patch sett...
void setDirty(bool enable)
void setEnableCustomForwardVector(bool enable)
Enables or disables the use of a custom forward vector.
agx::Vec3 getCustomBottomVector() const
void setNumContactPatchSamplingPoints(agx::UInt numSamples)
Set the number of sampling points used when tracing the shovel outline during creation of contact pat...
agx::Real getNoMergeExtensionDistance() const
Get the margin outside the shovel bonding box where soil particle merging is forbidden.
void setCustomExcavationStiffnessMultiplier(agx::Real excavationStiffnessMultiplier)
Set the custom excavation stiffness multiplier, which is used to multiply the Young's modulus of the ...
void setMinimumSubmergedContactLengthFraction(agx::Real minimumSubmergedContactLengthFraction)
Set the minimum submerged cutting edge length fraction [0-1] that generates submerged cutting.
agx::Bool getEnableInnerShapeMidpointInclusion() const
AdvancedShovelSettings(const agx::Line &cuttingEdge)
Constructor of advanced shovel settings from the necessary initial info from a shovel.
agx::UInt getNumContactPatchSamplingPoints() const
bool getUseCustomFrictionModel() const
void store(agxStream::OutputArchive &out) const
void setContactSamplingAngleCutoff(agx::Real angleCutoff)
Set the angle cutoff from the cutting edge when the contact sampling inside the shovel will stop.
agx::Bool getAggregateVelocityToShovel() const
void setNumContactPatches(agx::UInt numContactPatches)
Set number of contact patches that will be created inside the shovel to generate shovel <-> aggregate...
bool getEnableCustomBottomVector() const
Checks whether a custom bottom vector is enabled.
void setPenetrationDepthThreshold(agx::Real depthThreshold)
Set the vertical penetration depth threshold for when the shovel tooth for penetration resistance sho...
agx::Real getPenetrationDepthThreshold() const
Get the vertical penetration depth threshold for when the shovel tooth for penetration resistance sho...
void setToothMaximumRadius(agx::Real radius)
agx::Vec3 getToothDirection() const
bool getEnableCustomTeethGeometry() const
Get whenever custom tooth geometry dimensions should be used instead of automatically generating a te...
agx::Real getVerticalBladeSoilMergeDistance() const
Get the vertical distance under the blade cutting edge that the soil is allowed to instantly merge up...
agx::Real getMaxPenetrationForce() const
Set the maximum limit on penetration force (N) that the terrain will generate on this shovel.
void setMaxPenetrationForce(agx::Real maxPenetrationForce)
Set a maximum limit on penetration force (N) that the terrain will generate on this shovel.
void setEnableGenerateTeethGeometry(bool enable)
Set whenever a teeth geometry should be generated between the cutting edge and the teeth edge from th...
void setNumberOfTeeth(agx::UInt count)
agx::Real getToothMinimumRadius() const
bool getEnableGenerateTeethGeometry() const
agx::UInt getNumberOfTeeth() const
agx::Vec3 getCustomTeethGeometryHalfVec() const
Get the custom tooth geometry box half vector dimensions to be used when generating a custom teeth ge...
void setToothDirection(const agx::Vec3 &toothDirection)
Set the tooth direction of the shovel.
void setToothLength(agx::Real length)
void setToothMinimumRadius(agx::Real radius)
agx::Real getToothMaximumRadius() const
void setVerticalBladeSoilMergeDistance(agx::Real verticalSoilBladeMergeDistance)
Sets the vertical distance under the blade cutting edge that the soil is allowed to instantly merge u...
ShovelSettings(const agx::Line &cuttingEdge, const agx::Vec3 &toothDirection, agx::Real toothLength)
void setCustomTeethGeometryHalfVec(const agx::Vec3 &halfVec)
Set the custom tooth geometry box half vector dimensions to be used when generating a custom teeth ge...
void setEnableExcavationAtTeethEdge(bool enable)
Set whenever a excavation at the teeth edge should be enabled so that digging starts at the teeth edg...
void setEnableParticleFreeDeformers(bool enable)
Set true/false if the shovel deformers should make particle free deformations.
agx::Real getPenetrationForceScaling() const
void setEnableCustomTeethGeometry(bool enable)
Set whenever custom tooth geometry dimensions should be used instead of automatically generating a te...
agx::Real getToothLength() const
void setPenetrationForceScaling(agx::Real penetrationForceScaling)
Set the linear scaling coefficient for the penetration force (Default: 1.0)
bool getEnableParticleFreeDeformers() const
bool getEnableExcavationAtTeethEdge() const
Base class providing referencing counted objects.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
agx::ref_ptr< AdvancedShovelSettings > AdvancedShovelSettingsRef
The agx namespace contains the dynamics/math part of the AGX Dynamics API.