|
AGX Dynamics 2.41.0.0
|
Shovel object used to interact with a terrain via an active zone that converts solid terrain to dynamic terrain which can be moved by the shovel rigid body. More...
#include <Shovel.h>
Inheritance diagram for agxTerrain::Shovel:Classes | |
| class | ExcavationSettings |
| Class containing the settings for the different ExcavationModes for a shovel. More... | |
| struct | SoilPenetrationParameters |
| struct | TeethSettings |
Public Types | |
| enum class | ExcavationMode : agx::UInt32 { PRIMARY = 0 , DEFORM_BACK = 1 , DEFORM_RIGHT = 2 , DEFORM_LEFT = 3 } |
| Enum for describing the different excavation modes of a shovel: More... | |
Public Types inherited from agx::Component | |
| typedef Event2< Component *, Object * > | ObjectEvent |
| Event when adding removing child objects. | |
| typedef Callback1< Object * > | TraverseCallback |
Public Types inherited from agx::Object | |
| typedef agx::observer_ptr< const Event > | EventConstObserver |
| typedef agx::ref_ptr< const Event > | EventConstRef |
| typedef agx::observer_ptr< Event > | EventObserver |
| typedef agx::Vector< EventObserver > | EventObserverVector |
| typedef agx::VectorPOD< Event * > | EventPtrVector |
| typedef agx::ref_ptr< Event > | EventRef |
| typedef agx::Vector< EventRef > | EventRefVector |
Public Member Functions | |
| Shovel (agx::RigidBody *shovelBody, const agx::Line &topEdge, const agx::Line &cuttingEdge, const agx::Line &teethEdge, ShovelDebugRenderSettings *settings=nullptr) | |
| Alternative basic constructor that takes a teeth location edge instead of direction in local space to construct teeth direction and length. | |
| Shovel (agx::RigidBody *shovelBody, const agx::Line &topEdge, const agx::Line &cuttingEdge, const agx::Vec3 &toothDirection=agx::Vec3(0, 0, 0), agx::Real toothLength=0.15, ShovelDebugRenderSettings *settings=nullptr) | |
| Basic constructor. | |
| bool | collisionGeometriesAreInsideTerrain (Terrain *terrain) const |
| Check if any of the collision geometries are inside terrain bounds. | |
| agx::Real | computeCuttingEdgeLength () const |
| Terrain * | getActiveTerrain () const |
| PrimaryActiveZone * | getActiveZone () const |
| AdvancedShovelSettings * | getAdvancedSettings () |
| AdvancedShovelSettings * | getAdvancedSettings () const |
| AggregateContactGenerator * | getAggregateContactGenerator () const |
| agx::Material * | getAggregateMaterial () const |
| agx::Real | getAggregateTerrainContactArea (Shovel::ExcavationMode excavationMode) const |
| Get the aggregate <-> terrain contact area given an excavation mode and a shovel. | |
| agx::Real | getAggregateTerrainContactDepth (Shovel::ExcavationMode excavationMode) const |
| agx::Vec3 | getAggregateTerrainContactForce (Shovel::ExcavationMode excavationMode) const |
| Get the terrain <-> aggregate contact force for the given excavation mode. | |
| agxCollide::GeometryContactPtrVector | getAggregateTerrainContacts (Shovel::ExcavationMode excavationMode) const |
| Get the aggregate <-> terrain geometry contacts with the shovel given an excavation mode. | |
| agx::Vec3 | getAggregateTerrainNormalForce (Shovel::ExcavationMode excavationMode) const |
| Get the terrain <-> aggregate normal force for the given excavation mode. | |
| agx::Vec3 | getAggregateTerrainTangentialForce (Shovel::ExcavationMode excavationMode) const |
| Get the terrain <-> aggregate tangential force for the given excavation mode. | |
| agx::Vec3 | getBottomPlateDirection () const |
| agx::Vec3 | getBottomPlateDirectionWorld () const |
| Shovel * | getConnectedShovel () |
| agx::Vec3 | getContactForce () const |
| Given geometry contacts exists and the solver has solved them - calculates total shovel contact force between the shovel and it's active terrain. | |
| agx::Plane | getCurrentSeparationPlane (ExcavationMode mode) const |
| agx::Vec3 | getCuttingDirection () const |
| agx::Vec3 | getCuttingDirectionWorld () const |
| const agx::Line & | getCuttingEdge () const |
| agx::Line | getCuttingEdgeWorld () const |
| const agx::Plane & | getCutTopPlane () const |
| agx::Plane | getCutTopPlaneWorld () const |
| agx::Real | getDeadLoadFraction () const |
| Get the last computed dead load fraction of the shovel, i.e how much of it's inner volume that is filled with dynamic soil. | |
| agx::Vec3 | getDeformationContactForce () const |
| Given geometry contacts exists and the solver has solved them - calculates total contact force between the terrain deformation soil aggregate and the shovel. | |
| DeformController * | getDeformController () const |
| agx::Real | getDynamicMass () const |
| bool | getEnable () const |
| Access the state enable flag. | |
| bool | getEnableForTerrain (Terrain *terrain) const |
| agx::Vec3 | getExcavationModeContactForce (Shovel::ExcavationMode excavationMode) const |
| Calculates total contact force between the soil aggregate associated with the specified excavation mode in the shovel. | |
| ExcavationSettings & | getExcavationSettings (ExcavationMode mode) |
| const agx::Vector< agxCollide::BoundingAABB > & | getForbiddenBounds () |
| Get the shovels forbidden bounds. | |
| agx::Real | getInnerContactArea () const |
| Get the last computed inner contact area of the shovel, i.e the estimated cross-section area of the inner volume that is filled with dynamic soil. | |
| agx::Real | getInnerParticleVolume () const |
| agx::Real | getInnerSoilBulkVolume () const |
| Get the last computed dead load bulk volume of the shovel, i.e the inner volume that is filled with dynamic soil. | |
| agx::Real | getInnerSoilMass () const |
| SoilParticleVector | getInnerSoilParticles () const |
| agx::Real | getInnerVolume () const |
| size_t | getMaximumNumberOfContactPoints () |
| size_t | getNumberOfActiveContactPoints () |
| agx::Frame * | getParentFrame () const |
| bool | getPenetrationForce (agx::Vec3 &force, agx::Vec3 &torque) const |
| The result includes the active force and torque from the penetration resistance from the active terrain on the shovel if the shovel is digging in the terrain. | |
| SoilPenetrationResistance * | getPenetrationResistance () const |
| agx::RigidBody * | getRigidBody () const |
| agx::Vec3 | getSecondaryForwardVector () const |
| agx::Vec3 | getSecondaryForwardVectorWorld () const |
| agx::Real | getSecondarySeparationAngle () const |
| agx::Vec3 | getSeparationContactForce () const |
| Given geometry contacts exists and the solver has solved them - calculates total contact force between the terrain soil particle aggregate and the shovel. | |
| agx::Vec3 | getSeparationFrictionForce () const |
| Given geometry contacts exists and the solver has solved them - calculates total contact friction force between the terrain soil particle aggregate and the given shovel. | |
| agx::Vec3 | getSeparationNormalForce () const |
| Given geometry contacts exists and the solver has solved them - calculates total contact normal force between the terrain soil particle aggregate and the shovel. | |
| agx::Plane | getSeparationPlatePlane () const |
| ShovelSettings * | getSettings () |
| const ShovelSettings * | getSettings () const |
| agx::ContactMaterial * | getShovelAggregateContactMaterial (Shovel::ExcavationMode mode=Shovel::ExcavationMode::PRIMARY) const |
| Get the explicitly set contact material in a shovel-aggregate contact corresponding to a specified excavation mode for the shovel. | |
| agxCollide::GeometryContactPtrVector | getShovelAggregateContacts (Shovel::ExcavationMode excavationMode) const |
| Get the shovel <-> aggregate contacts with the soil particle aggregate for the given excavation mode. | |
| ShovelAggregateContactMaterialContainer * | getShovelTerrainContactMaterialContainer () const |
| agx::Real | getSoilAggregateMass (Shovel::ExcavationMode excavationMode) const |
| Returns the total soil aggregate mass in the shovel for the specific excavation mode. | |
| SoilParticleAggregate * | getSoilParticleAggregate () const |
| bool | getSoilPenetrationModel (agxTerrain::SoilPenetrationResistance::PenetrationModel &model) const |
| Get the soil penetration model used for the shovel. | |
| agx::Line | getTeethEdge () const |
| agx::Line | getTeethEdgeWorld () const |
| agx::Plane | getTeethSeparationPlane () const |
| const agx::Plane & | getTeethTopPlane () const |
| agx::Vec3 | getToothDirectionWorld () const |
| agx::Vec3 | getToothOrCuttingDirection () const |
| agx::Vec3 | getToothOrCuttingDirectionWorld () const |
| const agx::Line & | getTopEdge () const |
| agx::Line | getTopEdgeWorld () const |
| agx::Real | getTotalSoilBulkVolume (agx::Real packingFraction=0.67) const |
| Returns the total bulk volume moved by the shovel, both in the inner shapes and in the soil wedges in front of the shovel during excavation in m3. | |
| agx::Real | getTotalSoilMass () const |
| SoilParticleVector | getTotalSoilParticles () const |
| const agxCollide::GeometryRefVector & | getVoxelCollisionGeometries () const |
| const agx::RigidBody * | getWedgeAggregate (Shovel::ExcavationMode excavationMode) const |
| bool | isActive () const |
| bool | isDigging () const |
| Check if the shovel is currently in digging mode with a terrain, i.e if the cutting edge is submerged. | |
| virtual bool | isValid () const override |
| void | setConnectedShovel (Shovel *shovel) |
| void | setCuttingEdge (agx::Line cuttingEdge) |
| Set the cutting edge in local space. | |
| void | setCutTopPlane (agx::Plane cutTopPlane) |
| Set the cutting plane in local space. | |
| void | setEnable (bool enable) |
| Change state enable of this shovel. | |
| void | setEnableForTerrain (Terrain *terrain, bool enable) |
| Set if the shovel is enabled for the particular terrain. | |
| void | setEnableShovelTerrainGeometryContacts (Terrain *terrain, bool enable) |
| Set if regular geometry contacts should be created between the shovel geometries and the associated terrain geometry. | |
| void | setExcavationSettings (ExcavationMode mode, ExcavationSettings excavationSettings) |
| Set a settings object for an ExcavationMode of the shovel. | |
| bool | setShovelAggregateContactMaterial (agx::ContactMaterial *contactMaterial, Shovel::ExcavationMode mode=Shovel::ExcavationMode::PRIMARY) |
| Explicitly set contact material properties in a shovel-aggregate contact for a specific excavation mode for the shovel. | |
| bool | setSoilPenetrationModel (agxTerrain::SoilPenetrationResistance::PenetrationModel model) |
| Set the soil penetration model used for the shovel. | |
| void | setTeethEdge (agx::Line teethEdge) |
| Set the teeth edge in local space. | |
| void | setTopEdge (agx::Line topEdge) |
| Set the top edge in local space. | |
Public Member Functions inherited from agxSDK::TerrainToolInstance | |
| void | addEventListener (agxSDK::StepEventListener *listener) |
| Add a StepEventListener which follows the shovel - ie added and removed from a simulation at the same time as the shovel is added/removed from the simulation. | |
| agxSDK::Simulation * | getSimulation () const |
| virtual bool | isValid () const =0 |
| bool | removeEventListener (agxSDK::StepEventListener *listener) |
| Remove an added StepEventListener from the shovel. | |
Public Member Functions inherited from agx::Component | |
| Component (const agx::Name &name=agx::Name(), agx::Model *model=agx::Component::ClassModel(), agx::Device *device=nullptr) | |
| virtual void | addObject (agx::Object *object, bool assignContext=true) |
| Add an object to the component. | |
| virtual String | autoComplete (const String &partialName, StringVector &matchingNames) const |
| virtual void | buildNavigationTree (agxJson::Value &eNode) const override |
| void | configure (Model *model) |
| virtual void | configure (TiXmlElement *eComponent) override |
| agx::Device * | getDevice () |
| template<typename T > | |
| T * | getDevice () |
| const agx::Device * | getDevice () const |
| template<typename T > | |
| const T * | getDevice () const |
| size_t | getNumObjects (const agx::Name &name) const |
| agx::Object * | getObject (const agx::Name &name, agx::Model *model, size_t index=0) |
| const agx::Object * | getObject (const agx::Name &name, agx::Model *model, size_t index=0) const |
| agx::Object * | getObject (const agx::Name &name, size_t index=0) |
| template<typename T > | |
| T * | getObject (const agx::Name &name, size_t index=0) |
| const agx::Object * | getObject (const agx::Name &name, size_t index=0) const |
| template<typename T > | |
| const T * | getObject (const agx::Name &name, size_t index=0) const |
| const agx::ObjectRefVector & | getObjects () const |
| template<typename T > | |
| void | getObjects (agx::ObjectPtrVector &result, bool recursive=false) const |
| void | getObjects (agx::ObjectPtrVector &result, const agx::Model *model, bool recursive=false) const |
| virtual Object * | getResourceImpl (const Path &path, agx::Model *model) override |
| virtual void | printSubtree () const override |
| void | printSubtree (std::ostream &stream, int depth=0) const |
| virtual void | rebind () override |
| void | removeAllObjects () |
| Remove all components. | |
| virtual void | removeObject (agx::Object *object) |
| Remove an object from the component. | |
| void | removeObject (const agx::Name &name, size_t index=0) |
| Remove an object with a specified name (and optional index) from the component. | |
| virtual void | snapshot (TiXmlNode *eParent, const String &directory) const override |
| void | traverse (ComponentVisitor *) |
| void | traverse (const TraverseCallback &callback) |
Public Member Functions inherited from agx::Object | |
| Object (const Name &name=Name(), Model *model=Object::ClassModel()) | |
| void | addListener (EventListener *listener) |
| virtual void | buildNavigationTree (agxJson::Value &eNode) const |
| virtual void | configure (TiXmlElement *) |
| agx::String | fullName () const |
| agx::String | fullPath () const |
| agx::String | fullPath (const agx::Object *root) const |
| template<typename T > | |
| T * | getAutoScopedResource (const agx::Path &path) |
| template<typename T > | |
| const T * | getAutoScopedResource (const agx::Path &path) const |
| agx::Object * | getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) |
| const agx::Object * | getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) const |
| agx::Object * | getContext () |
| template<typename T > | |
| T * | getContext () |
| const agx::Object * | getContext () const |
| template<typename T > | |
| const T * | getContext () const |
| agx::UInt32 | getId () const |
| const agx::Name & | getImplementationName () const |
| agx::Model * | getModel () |
| const agx::Model * | getModel () const |
| const agx::Name & | getName () const |
| agx::Object * | getNextSibling () |
| const agx::Object * | getNextSibling () const |
| agx::Path | getPath () const |
| agx::Path | getPath (const agx::Object *root) const |
| template<typename T > | |
| T * | getResource (const agx::Path &path) |
| template<typename T > | |
| const T * | getResource (const agx::Path &path) const |
| agx::Object * | getResource (const agx::Path &path, agx::Model *model=nullptr) |
| const agx::Object * | getResource (const agx::Path &path, agx::Model *model=nullptr) const |
| virtual agx::Object * | getResourceImpl (const agx::Path &path, agx::Model *model) |
| agx::Object * | getRootContext () |
| const agx::Object * | getRootContext () const |
| bool | hasListener (EventListener *listener) |
| bool | hasParent (const agx::Object *node) const |
| bool | isUnique () const |
| virtual void | printSubtree () const |
| virtual void | rebind () |
| void | removeListener (EventListener *listener) |
| virtual void | save (TiXmlElement *) const |
| virtual void | setContext (agx::Object *context) |
| void | setId (UInt32 id) |
| void | setModel (agx::Model *model) |
| Set the object model (handled automatically). | |
| void | setName (const agx::Name &name) |
| Set the name of the object. | |
| virtual void | snapshot (TiXmlNode *, const String &) const |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
Public Member Functions inherited from agxStream::Serializable | |
| virtual | ~Serializable () |
| Destructor for normal C++ use but hidden from SWIG bindings. | |
| virtual const char * | getClassName () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. | |
| virtual StorageAgent * | getStorageAgent () const =0 |
| agx::Uuid | getUuid () const |
| bool | isFinished () const |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. | |
Static Public Member Functions | |
| static Shovel * | find (const agxSDK::Simulation *simulation, const agx::Name &name) |
| Find first shovel with given name. | |
| static Shovel * | find (const agxSDK::Simulation *simulation, const agx::Uuid &uuid) |
| Find shovel with given UUID. | |
| static ShovelPtrVector | findAll (const agxSDK::Simulation *simulation) |
| Finds all shovels in the given simulation. | |
Static Public Member Functions inherited from agx::Component | |
| static Component * | _load (TiXmlElement *eComponent, Device *device) |
| static agx::Model * | ClassModel () |
| static Component * | load (const Path &path, const Name &implementation, Device *device, const Path &_namespace=Path()) |
| static Component * | load (const String &path, const Path &_namespace=Path()) |
| static Component * | load (const String &path, Device *device, const Path &_namespace=Path()) |
| static Component * | load (TiXmlElement *eComponent, Device *device) |
Static Public Member Functions inherited from agx::Object | |
| static agx::Model * | ClassModel () |
| static agx::String | generateName (const agx::String &bindPath) |
| static const HashSet< Object * > & | getActiveObjects () |
| static bool | getEnableRebind () |
| Should rebinding be allowed? Right now a global setting. | |
| static Object * | load (const String &path, Device *device, const String &type, const String &attribute, const String &value) |
| template<typename T > | |
| static T * | load (const String &path, Device *device, const String &type, const String &attribute, const String &value) |
| static Object * | load (const String &path, Device *device, const String &type="", size_t instance=0) |
| template<typename T > | |
| static T * | load (const String &path, Device *device, const String &type="", size_t instance=0) |
| static void | load (const String &path, Device *device, ObjectPtrVector &loadedObjects) |
| static Object * | load (TiXmlElement *eObject, Device *device) |
| template<typename T > | |
| static T * | load (TiXmlElement *eObject, Device *device) |
| static TiXmlDocument | openDocument (const String &path) |
| static void | setEnableRebind (bool flag) |
| Sets if rebinding of objects should be allowed (Right now a global setting). | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Public Member Functions inherited from agxStream::Serializable | |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. | |
Protected Member Functions | |
| Shovel () | |
| Default constructor used in serialization. | |
| virtual | ~Shovel () |
| Reference counted object - protected destructor. | |
| virtual void | addNotification () override |
| Add notification when a shovel is added to a simulation. | |
| void | calculateDeadLoadFraction () |
| Calculates and store the current deadload fraction of the shovel. | |
| void | calculateForbiddenBounds () |
| Calculate the shovels forbidden bounds around all the active zones. | |
| void | checkContactMaterials () |
| void | clearActiveZoneWedges () const |
| Clear the active zone wedges of the primary active zones and deformers. | |
| agx::Real | computeDefaultContactRegionThreshold () const |
| agx::Frame * | createParentFrame () |
| agxSDK::TerrainManager * | getTerrainManager () |
| TerrainPtrVec | getTerrainsInSimulation () |
| void | initalizeContactMaterialsForExistingTerrains (agxSDK::Simulation *simulation) |
| Initialize contact materials when added to simulation. | |
| void | initSoilAggregate () |
| virtual void | last () override |
| Callback to be executed at the end of the time step Shovel and Terrain step events are synchronized via the TerrainManager. | |
| virtual void | post () override |
| Executes post-step events for agxTerrain::Shovel in the simulation. | |
| virtual void | pre () override |
| Executes pre-step events for agxTerrain::Shovel in the simulation. | |
| virtual void | preCollide () override |
| Executes pre-collide events for agxTerrain::Shovel in the simulation. | |
| virtual void | removeNotification () override |
| Remove notification when this shovel is removed from a simulation. | |
| void | setAggregateMaterial (agx::Material *material) |
| Set the common material used by the SoilParticleAggregates inside the primary active zone and deformers. | |
| bool | shovelHasParticles () const |
Protected Member Functions inherited from agxSDK::TerrainToolInstance | |
| TerrainToolInstance () | |
| Default constructor. | |
| virtual | ~TerrainToolInstance () |
| Reference counted object - protected destructor. | |
| virtual void | addNotification () |
| virtual void | last () |
| virtual void | post () |
| virtual void | pre () |
| virtual void | preCollide () |
| virtual void | removeNotification () |
Protected Member Functions inherited from agx::Component | |
| virtual | ~Component () |
| String | expandAutoCompletionMatch (const String &query, const StringVector &matchingNames) const |
| void | setDevice (Device *device) |
Protected Member Functions inherited from agx::Object | |
| virtual | ~Object () |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Member Functions inherited from agxStream::Serializable | |
| Serializable () | |
| Default constructor. | |
| Serializable (const Serializable &other) | |
| Copy constructor. | |
| void | generateUuid () |
Static Protected Member Functions | |
| static agx::UInt | excavationModeToDeformerCollectionIndex (Shovel::ExcavationMode excavationMode) |
| Cast from excavation mode enum to deformer collection index. | |
Static Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. | |
Additional Inherited Members | |
Public Attributes inherited from agx::Component | |
| ObjectEvent | addObjectEvent |
| ObjectEvent | removeObjectEvent |
Shovel object used to interact with a terrain via an active zone that converts solid terrain to dynamic terrain which can be moved by the shovel rigid body.
A shovel object consists of a rigid body, two edges and a cutting direction. A convex inner shape is created between the two edges, the top edge and the cutting edge, and the attached rigid body. When the cutting edge intersects a terrain surface an active zone is created in the cutting direction inside the terrain, which then converts solid mass into dynamic mass. The shovel receives feedback forces through a rigid body aggregate constructed from the intertia of the soil particles in the active zone.
The shovel has 4 modes for deforming terrain: PRIMARY, DEFORM_BACK, DEFORM_LEFT and DEFORM_RIGHT. See the Shovel::ExcavationMode enum for details.
|
strong |
Enum for describing the different excavation modes of a shovel:
| agxTerrain::Shovel::Shovel | ( | agx::RigidBody * | shovelBody, |
| const agx::Line & | topEdge, | ||
| const agx::Line & | cuttingEdge, | ||
| const agx::Vec3 & | toothDirection = agx::Vec3(0, 0, 0), |
||
| agx::Real | toothLength = 0.15, |
||
| ShovelDebugRenderSettings * | settings = nullptr |
||
| ) |
Basic constructor.
| shovelBody | - The base body of the shovel. |
| topEdge | - The top edge of the active zone, specified in the LOCAL shovelBody frame that will be created in front of the shovel. |
| cuttingEdge | - The lowest edge on the shovel, specified in the LOCAL shovelBody frame that serves as the cutting edge of the active zone. |
| toothDirection | - The direction of the shovel teeth along which the penetration resistance will be active. It also determines where the the teeth edge, which is the tip of the teeth, will be located where soil excavation starts. |
| toothLength | - The length of the shovel teeth which together with the teeth direction will influence where the teeth edge will be placed. Soil excavation starts at the teeth edge. |
| agxTerrain::Shovel::Shovel | ( | agx::RigidBody * | shovelBody, |
| const agx::Line & | topEdge, | ||
| const agx::Line & | cuttingEdge, | ||
| const agx::Line & | teethEdge, | ||
| ShovelDebugRenderSettings * | settings = nullptr |
||
| ) |
Alternative basic constructor that takes a teeth location edge instead of direction in local space to construct teeth direction and length.
| shovelBody | - The base body of the shovel. |
| topEdge | - The top edge of the active zone, specified in the LOCAL shovelBody frame that will be created in front of the shovel. |
| cuttingEdge | - The lowest edge on the shovel, specified in the LOCAL shovelBody frame that serves as the cutting edge of the active zone. |
| teethEdge | - The edge of the teeth, specified in the LOCAL shovelBody frame, that will be used to compute teeth properties such as tooth direction and length. |
|
protected |
Default constructor used in serialization.
|
protectedvirtual |
Reference counted object - protected destructor.
|
overrideprotectedvirtual |
Add notification when a shovel is added to a simulation.
Reimplemented from agxSDK::TerrainToolInstance.
|
protected |
Calculates and store the current deadload fraction of the shovel.
|
protected |
Calculate the shovels forbidden bounds around all the active zones.
|
protected |
|
protected |
Clear the active zone wedges of the primary active zones and deformers.
| bool agxTerrain::Shovel::collisionGeometriesAreInsideTerrain | ( | Terrain * | terrain | ) | const |
Check if any of the collision geometries are inside terrain bounds.
| agx::Real agxTerrain::Shovel::computeCuttingEdgeLength | ( | ) | const |
|
protected |
|
protected |
|
staticprotected |
Cast from excavation mode enum to deformer collection index.
|
static |
Find first shovel with given name.
| simulation | - simulation the shovel is part of |
| name | - name of the shovel |
|
static |
Find shovel with given UUID.
| simulation | - simulation the shovel is part of |
| uuid | - UUID of the shovel |
|
static |
Finds all shovels in the given simulation.
| simulation | - simulation with shovels. |
| Terrain * agxTerrain::Shovel::getActiveTerrain | ( | ) | const |
| PrimaryActiveZone * agxTerrain::Shovel::getActiveZone | ( | ) | const |
| AdvancedShovelSettings * agxTerrain::Shovel::getAdvancedSettings | ( | ) |
| AdvancedShovelSettings * agxTerrain::Shovel::getAdvancedSettings | ( | ) | const |
| AggregateContactGenerator * agxTerrain::Shovel::getAggregateContactGenerator | ( | ) | const |
| agx::Material * agxTerrain::Shovel::getAggregateMaterial | ( | ) | const |
| agx::Real agxTerrain::Shovel::getAggregateTerrainContactArea | ( | Shovel::ExcavationMode | excavationMode | ) | const |
Get the aggregate <-> terrain contact area given an excavation mode and a shovel.
| excavationMode | - the excavation mode that the aggregate belongs too ( PRIMARY, DEFORM_BACK, DEFORM_RIGHT, DEFORM_LEFT ) |
| agx::Real agxTerrain::Shovel::getAggregateTerrainContactDepth | ( | Shovel::ExcavationMode | excavationMode | ) | const |
| agx::Vec3 agxTerrain::Shovel::getAggregateTerrainContactForce | ( | Shovel::ExcavationMode | excavationMode | ) | const |
Get the terrain <-> aggregate contact force for the given excavation mode.
| excavationMode | - the excavation mode that the aggregate belongs too ( PRIMARY, DEFORM_BACK, DEFORM_RIGHT, DEFORM_LEFT ) |
| agxCollide::GeometryContactPtrVector agxTerrain::Shovel::getAggregateTerrainContacts | ( | Shovel::ExcavationMode | excavationMode | ) | const |
Get the aggregate <-> terrain geometry contacts with the shovel given an excavation mode.
| excavationMode | - the excavation mode that the aggregate belongs too ( PRIMARY, DEFORM_BACK, DEFORM_RIGHT, DEFORM_LEFT ) |
| agx::Vec3 agxTerrain::Shovel::getAggregateTerrainNormalForce | ( | Shovel::ExcavationMode | excavationMode | ) | const |
Get the terrain <-> aggregate normal force for the given excavation mode.
| excavationMode | - the excavation mode that the aggregate belongs too ( PRIMARY, DEFORM_BACK, DEFORM_RIGHT, DEFORM_LEFT ) |
| agx::Vec3 agxTerrain::Shovel::getAggregateTerrainTangentialForce | ( | Shovel::ExcavationMode | excavationMode | ) | const |
Get the terrain <-> aggregate tangential force for the given excavation mode.
| excavationMode | - the excavation mode that the aggregate belongs too ( PRIMARY, DEFORM_BACK, DEFORM_RIGHT, DEFORM_LEFT ) |
| agx::Vec3 agxTerrain::Shovel::getBottomPlateDirection | ( | ) | const |
| agx::Vec3 agxTerrain::Shovel::getBottomPlateDirectionWorld | ( | ) | const |
| Shovel * agxTerrain::Shovel::getConnectedShovel | ( | ) |
| agx::Vec3 agxTerrain::Shovel::getContactForce | ( | ) | const |
Given geometry contacts exists and the solver has solved them - calculates total shovel contact force between the shovel and it's active terrain.
This is the contact force that prevents the shovel from falling through the terrain when not in excavation mode, where contact feedback is generated from the soil aggregates.
| agx::Plane agxTerrain::Shovel::getCurrentSeparationPlane | ( | ExcavationMode | mode | ) | const |
| agx::Vec3 agxTerrain::Shovel::getCuttingDirection | ( | ) | const |
| agx::Vec3 agxTerrain::Shovel::getCuttingDirectionWorld | ( | ) | const |
| const agx::Line & agxTerrain::Shovel::getCuttingEdge | ( | ) | const |
| agx::Line agxTerrain::Shovel::getCuttingEdgeWorld | ( | ) | const |
| const agx::Plane & agxTerrain::Shovel::getCutTopPlane | ( | ) | const |
| agx::Plane agxTerrain::Shovel::getCutTopPlaneWorld | ( | ) | const |
| agx::Real agxTerrain::Shovel::getDeadLoadFraction | ( | ) | const |
Get the last computed dead load fraction of the shovel, i.e how much of it's inner volume that is filled with dynamic soil.
The dead load fraction ranges from 0.0 (empty), to 1.0 (full).
| agx::Vec3 agxTerrain::Shovel::getDeformationContactForce | ( | ) | const |
Given geometry contacts exists and the solver has solved them - calculates total contact force between the terrain deformation soil aggregate and the shovel.
This represents the deformation force that is required to move soil via shovel deformation instead of excavation, i.e not excavation or digging. Examples of this would be side movement and backwards grading of the soil.
| DeformController * agxTerrain::Shovel::getDeformController | ( | ) | const |
| agx::Real agxTerrain::Shovel::getDynamicMass | ( | ) | const |
| bool agxTerrain::Shovel::getEnable | ( | ) | const |
Access the state enable flag.
| bool agxTerrain::Shovel::getEnableForTerrain | ( | Terrain * | terrain | ) | const |
| agx::Vec3 agxTerrain::Shovel::getExcavationModeContactForce | ( | Shovel::ExcavationMode | excavationMode | ) | const |
Calculates total contact force between the soil aggregate associated with the specified excavation mode in the shovel.
This represents the deformation force that is required to move soil via shovel deformation instead of excavation, i.e not excavation or digging. Examples of this would be side movement and backwards grading of the soil.
| excavationMode | - the excavation mode that the specified soil aggregate belongs to |
| ExcavationSettings & agxTerrain::Shovel::getExcavationSettings | ( | ExcavationMode | mode | ) |
| const agx::Vector< agxCollide::BoundingAABB > & agxTerrain::Shovel::getForbiddenBounds | ( | ) |
Get the shovels forbidden bounds.
| agx::Real agxTerrain::Shovel::getInnerContactArea | ( | ) | const |
Get the last computed inner contact area of the shovel, i.e the estimated cross-section area of the inner volume that is filled with dynamic soil.
| agx::Real agxTerrain::Shovel::getInnerParticleVolume | ( | ) | const |
| agx::Real agxTerrain::Shovel::getInnerSoilBulkVolume | ( | ) | const |
Get the last computed dead load bulk volume of the shovel, i.e the inner volume that is filled with dynamic soil.
This is the particle volume inside the shovel divied by the packing fraction of the soil (0.67).
| agx::Real agxTerrain::Shovel::getInnerSoilMass | ( | ) | const |
| SoilParticleVector agxTerrain::Shovel::getInnerSoilParticles | ( | ) | const |
| agx::Real agxTerrain::Shovel::getInnerVolume | ( | ) | const |
| size_t agxTerrain::Shovel::getMaximumNumberOfContactPoints | ( | ) |
| size_t agxTerrain::Shovel::getNumberOfActiveContactPoints | ( | ) |
| agx::Frame * agxTerrain::Shovel::getParentFrame | ( | ) | const |
The result includes the active force and torque from the penetration resistance from the active terrain on the shovel if the shovel is digging in the terrain.
| force | - the penetration force out parameter |
| torque | - the penetration torque out parameter |
force and torque - otherwise false | SoilPenetrationResistance * agxTerrain::Shovel::getPenetrationResistance | ( | ) | const |
| agx::RigidBody * agxTerrain::Shovel::getRigidBody | ( | ) | const |
| agx::Vec3 agxTerrain::Shovel::getSecondaryForwardVector | ( | ) | const |
| agx::Vec3 agxTerrain::Shovel::getSecondaryForwardVectorWorld | ( | ) | const |
| agx::Real agxTerrain::Shovel::getSecondarySeparationAngle | ( | ) | const |
| agx::Vec3 agxTerrain::Shovel::getSeparationContactForce | ( | ) | const |
Given geometry contacts exists and the solver has solved them - calculates total contact force between the terrain soil particle aggregate and the shovel.
This represents the separation force that is required to move the excavated soil in the shovel active zone.
| agx::Vec3 agxTerrain::Shovel::getSeparationFrictionForce | ( | ) | const |
Given geometry contacts exists and the solver has solved them - calculates total contact friction force between the terrain soil particle aggregate and the given shovel.
| agx::Vec3 agxTerrain::Shovel::getSeparationNormalForce | ( | ) | const |
Given geometry contacts exists and the solver has solved them - calculates total contact normal force between the terrain soil particle aggregate and the shovel.
| agx::Plane agxTerrain::Shovel::getSeparationPlatePlane | ( | ) | const |
| ShovelSettings * agxTerrain::Shovel::getSettings | ( | ) |
| const ShovelSettings * agxTerrain::Shovel::getSettings | ( | ) | const |
| agx::ContactMaterial * agxTerrain::Shovel::getShovelAggregateContactMaterial | ( | Shovel::ExcavationMode | mode = Shovel::ExcavationMode::PRIMARY | ) | const |
Get the explicitly set contact material in a shovel-aggregate contact corresponding to a specified excavation mode for the shovel.
This overrides the shovel-terrain contact material properties that are used in the default case.
| mode | - The specified excavation mode that corresponds to the aggregate. |
| agxCollide::GeometryContactPtrVector agxTerrain::Shovel::getShovelAggregateContacts | ( | Shovel::ExcavationMode | excavationMode | ) | const |
Get the shovel <-> aggregate contacts with the soil particle aggregate for the given excavation mode.
| excavationMode | - the excavation mode that the soil aggregate belongs too ( PRIMARY, DEFORM_BACK, DEFORM_RIGHT, DEFORM_LEFT ) |
| ShovelAggregateContactMaterialContainer * agxTerrain::Shovel::getShovelTerrainContactMaterialContainer | ( | ) | const |
| agx::Real agxTerrain::Shovel::getSoilAggregateMass | ( | Shovel::ExcavationMode | excavationMode | ) | const |
Returns the total soil aggregate mass in the shovel for the specific excavation mode.
This function can be used to extract the active mass that the shovel is trying to displace in the failure zones during digging and deformation.
| excavationMode | - The excavation mode of the aggregate that will be used to extract the mass. |
| SoilParticleAggregate * agxTerrain::Shovel::getSoilParticleAggregate | ( | ) | const |
| bool agxTerrain::Shovel::getSoilPenetrationModel | ( | agxTerrain::SoilPenetrationResistance::PenetrationModel & | model | ) | const |
Get the soil penetration model used for the shovel.
Available models are:
| model | - The output variable where the penetration model that is used will be put, if successful. |
| agx::Line agxTerrain::Shovel::getTeethEdge | ( | ) | const |
| agx::Line agxTerrain::Shovel::getTeethEdgeWorld | ( | ) | const |
| agx::Plane agxTerrain::Shovel::getTeethSeparationPlane | ( | ) | const |
| const agx::Plane & agxTerrain::Shovel::getTeethTopPlane | ( | ) | const |
|
protected |
|
protected |
| agx::Vec3 agxTerrain::Shovel::getToothDirectionWorld | ( | ) | const |
| agx::Vec3 agxTerrain::Shovel::getToothOrCuttingDirection | ( | ) | const |
| agx::Vec3 agxTerrain::Shovel::getToothOrCuttingDirectionWorld | ( | ) | const |
| const agx::Line & agxTerrain::Shovel::getTopEdge | ( | ) | const |
| agx::Line agxTerrain::Shovel::getTopEdgeWorld | ( | ) | const |
Returns the total bulk volume moved by the shovel, both in the inner shapes and in the soil wedges in front of the shovel during excavation in m3.
This includes both particles and voxels for solid and fluid mass.
| packingFraction | - the packing fraction used for computing the bulk volume for the soil particles in the inner and wedge shapes. (Default: 0.67) |
| agx::Real agxTerrain::Shovel::getTotalSoilMass | ( | ) | const |
| SoilParticleVector agxTerrain::Shovel::getTotalSoilParticles | ( | ) | const |
| const agxCollide::GeometryRefVector & agxTerrain::Shovel::getVoxelCollisionGeometries | ( | ) | const |
| const agx::RigidBody * agxTerrain::Shovel::getWedgeAggregate | ( | Shovel::ExcavationMode | excavationMode | ) | const |
|
protected |
Initialize contact materials when added to simulation.
|
protected |
| bool agxTerrain::Shovel::isActive | ( | ) | const |
| bool agxTerrain::Shovel::isDigging | ( | ) | const |
Check if the shovel is currently in digging mode with a terrain, i.e if the cutting edge is submerged.
|
overridevirtual |
Implements agxSDK::TerrainToolInstance.
|
overrideprotectedvirtual |
Callback to be executed at the end of the time step Shovel and Terrain step events are synchronized via the TerrainManager.
Reimplemented from agxSDK::TerrainToolInstance.
|
overrideprotectedvirtual |
Executes post-step events for agxTerrain::Shovel in the simulation.
Shovel and Terrain step events are synchronized via the TerrainManager.
Reimplemented from agxSDK::TerrainToolInstance.
|
overrideprotectedvirtual |
Executes pre-step events for agxTerrain::Shovel in the simulation.
Shovel and Terrain step events are synchronized via the TerrainManager. In the pre step we:
Reimplemented from agxSDK::TerrainToolInstance.
|
overrideprotectedvirtual |
Executes pre-collide events for agxTerrain::Shovel in the simulation.
Shovel and Terrain step events are synchronized via the TerrainManager. In the preCollide step, we:
Reimplemented from agxSDK::TerrainToolInstance.
|
overrideprotectedvirtual |
Remove notification when this shovel is removed from a simulation.
Reimplemented from agxSDK::TerrainToolInstance.
|
protected |
Set the common material used by the SoilParticleAggregates inside the primary active zone and deformers.
Propagates the material into the internal classes.
| void agxTerrain::Shovel::setConnectedShovel | ( | Shovel * | shovel | ) |
| shovel | - Set if the shovel should be connected to another shovels InnerBody for purposes of simulating composite shovels with varying shovel vectors in along the shovel geometry. This means you can have multiple cutting edges with varying orientation per shovel where you have a central shovel with a single inner shape. (Default: nullptr) |
| void agxTerrain::Shovel::setCuttingEdge | ( | agx::Line | cuttingEdge | ) |
Set the cutting edge in local space.
| cuttingEdge | - new cutting edge in local space. |
| void agxTerrain::Shovel::setCutTopPlane | ( | agx::Plane | cutTopPlane | ) |
Set the cutting plane in local space.
| cutTopPlane | - new cutting plane in local space. |
| void agxTerrain::Shovel::setEnable | ( | bool | enable | ) |
Change state enable of this shovel.
If the shovel is disabled, it can not be used for excavation in a terrain. Default: true.
| enable | - true to enable, false to disable |
| void agxTerrain::Shovel::setEnableForTerrain | ( | Terrain * | terrain, |
| bool | enable | ||
| ) |
Set if the shovel is enabled for the particular terrain.
Prerequisites: Shovel needs to be added to the simulation. Default: True, ie enabled for any terrain.
| void agxTerrain::Shovel::setEnableShovelTerrainGeometryContacts | ( | Terrain * | terrain, |
| bool | enable | ||
| ) |
Set if regular geometry contacts should be created between the shovel geometries and the associated terrain geometry.
| void agxTerrain::Shovel::setExcavationSettings | ( | ExcavationMode | mode, |
| ExcavationSettings | excavationSettings | ||
| ) |
Set a settings object for an ExcavationMode of the shovel.
Excavation modes are as follows:
| mode | - The specified excavation mode that the settings will apply to. |
| excavationSettings | - The specified excavation settings that will apply to the excavation mode. |
| bool agxTerrain::Shovel::setShovelAggregateContactMaterial | ( | agx::ContactMaterial * | contactMaterial, |
| Shovel::ExcavationMode | mode = Shovel::ExcavationMode::PRIMARY |
||
| ) |
Explicitly set contact material properties in a shovel-aggregate contact for a specific excavation mode for the shovel.
This overrides the shovel-terrain contact material properties that are used in the default case.
| contactMaterial | - The contact material to be set in the aggregate contact. |
| mode | - The specified excavation mode that corresponds to the aggregate. |
| bool agxTerrain::Shovel::setSoilPenetrationModel | ( | agxTerrain::SoilPenetrationResistance::PenetrationModel | model | ) |
Set the soil penetration model used for the shovel.
Available models are:
| model | - The specified penetration model to use in the shovel against the terrain. ( Default: ELASTIC_PLASTIC_LIMIT ) |
| void agxTerrain::Shovel::setTeethEdge | ( | agx::Line | teethEdge | ) |
Set the teeth edge in local space.
This edge will be used to together with the cutting edge to automatically compute teeth properties such as teeth direction and length so that the edge of the teeth conincide with the provided teeth edge.
| teethEdge | - new cutting edge in local space. |
| void agxTerrain::Shovel::setTopEdge | ( | agx::Line | topEdge | ) |
Set the top edge in local space.
| topEdge | - new top edge in local space. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |