![]() |
AGX Dynamics 2.39.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>
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... | |
![]() | |
typedef Event2< Component *, Object * > | ObjectEvent |
Event when adding removing child objects. | |
typedef Callback1< Object * > | TraverseCallback |
![]() | |
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::Vec3 &cuttingDirection, Shovel *connectedShovel=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 () |
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 | 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 |
const agx::Vec3 & | getCuttingDirection () const |
agx::Vec3 | getCuttingDirectionWorld () const |
const agx::Line & | getCuttingEdge () const |
agx::Line | getCuttingEdgeWorld () 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 | getInnerVolume () const |
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 |
virtual agx::RigidBody * | getRigidBody () const override |
agx::Vec3 | getSecondaryCuttingDirection () 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. | |
ShovelSettings * | getSettings () |
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. | |
const agx::Line & | getTopEdge () const |
agx::Line | getTopEdgeWorld () 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 | setCuttingDirection (agx::Vec3 cuttingDirection) |
void | setCuttingEdge (agx::Line cuttingEdge) |
Set the cutting edge 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 | setTopEdge (agx::Line topEdge) |
Set the top edge in local space. | |
![]() | |
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. | |
virtual agx::RigidBody * | getRigidBody () const =0 |
agxSDK::Simulation * | getSimulation () const |
virtual bool | isValid () const =0 |
bool | removeEventListener (agxSDK::StepEventListener *listener) |
Remove an added StepEventListener from the shovel. | |
![]() | |
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) |
![]() | |
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 |
![]() | |
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. | |
![]() | |
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 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 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). | |
![]() | |
template<typename T > | |
static bool | ValidateCast (const Referenced *object) |
![]() | |
static void | setEnableUuidGeneration (bool flag) |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. | |
Protected Types | |
using | Flags = agx::BitState< StateFlags, agx::UInt32 > |
enum | StateFlags : agx::UInt32 { ENABLED = 1 << 0 , REMOVE_SHOVEL_CONTACTS = 1 << 1 , INNER_SHAPE_CREATE_DYNAMIC_MASS = 1 << 2 , ENABLE_PARTICLE_FREE_DEFORMATION = 1 << 3 , ENABLE_PARTICLE_FORCE_FEEDBACK = 1 << 4 , SET_ZERO_AGGREGATE_VELOCITY = 1 << 5 , USE_CUSTOM_FRICTION_MODELS = 1 << 6 } |
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 () |
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 () |
agxCollide::GeometryRefVector | createVoxelCollisionGeometries (agx::Real tessellationLevel=0.5) const |
agx::Vec3 | ensureCuttingDirectionIsNormalized (agx::Vec3 cuttingDirection) |
agxSDK::TerrainManager * | getTerrainManager () |
TerrainPtrVec | getTerrainsInSimulation () |
void | initalizeContactMaterialsForExistingTerrains (agxSDK::Simulation *simulation) |
Initialize contact materials when added to simulation. | |
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 |
![]() | |
ShovelInstance () | |
Default constructor. | |
virtual | ~ShovelInstance () |
Reference counted object - protected destructor. | |
virtual void | addNotification () |
virtual void | last () |
virtual void | post () |
virtual void | pre () |
virtual void | preCollide () |
virtual void | removeNotification () |
![]() | |
virtual | ~Component () |
String | expandAutoCompletionMatch (const String &query, const StringVector &matchingNames) const |
void | setDevice (Device *device) |
![]() | |
virtual | ~Object () |
![]() | |
virtual | ~Referenced () |
Destructor. | |
void | allocateObserverVector () const |
void | deleteUsingDeleteHandler () const |
![]() | |
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 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 | |
![]() | |
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.
|
protected |
|
strong |
Enum for describing the different excavation modes of a shovel:
|
protected |
agxTerrain::Shovel::Shovel | ( | agx::RigidBody * | shovelBody, |
const agx::Line & | topEdge, | ||
const agx::Line & | cuttingEdge, | ||
const agx::Vec3 & | cuttingDirection, | ||
Shovel * | connectedShovel = 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. |
cuttingDirection | - The cutting direction of the shovel where the penetration resistance will be active, which is usually parallel to the lowest shovel plate that is used to initially penetrate the soil. |
connectedShovel | - 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) |
|
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::ShovelInstance.
|
protected |
|
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 |
|
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 | ( | ) |
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::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 |
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 |
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::getInnerVolume | ( | ) | const |
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 |
|
overridevirtual |
Implements agxSDK::ShovelInstance.
agx::Vec3 agxTerrain::Shovel::getSecondaryCuttingDirection | ( | ) | 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.
ShovelSettings * agxTerrain::Shovel::getSettings | ( | ) |
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. |
|
protected |
|
protected |
const agx::Line & agxTerrain::Shovel::getTopEdge | ( | ) | const |
agx::Line agxTerrain::Shovel::getTopEdgeWorld | ( | ) | 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.
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::ShovelInstance.
|
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::ShovelInstance.
|
overrideprotectedvirtual |
Executes post-step events for agxTerrain::Shovel in the simulation.
Shovel and Terrain step events are synchronized via the TerrainManager.
Reimplemented from agxSDK::ShovelInstance.
|
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::ShovelInstance.
|
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::ShovelInstance.
|
overrideprotectedvirtual |
Remove notification when this shovel is removed from a simulation.
Reimplemented from agxSDK::ShovelInstance.
|
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::setCuttingDirection | ( | agx::Vec3 | cuttingDirection | ) |
cuttingDirection | - new cutting direction in local space. |
void agxTerrain::Shovel::setCuttingEdge | ( | agx::Line | cuttingEdge | ) |
Set the cutting edge in local space.
cuttingEdge | - new cutting edge 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::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 |