|
AGX Dynamics 2.42.3.0
|
Specific thresholds used to merge and split given geometry contacts. More...
#include <GeometryContactMergeSplitThresholds.h>
Inheritance diagram for agxSDK::GeometryContactMergeSplitThresholds:Public Types | |
| enum | MergeThresholds : agx::UInt { MAX_RELATIVE_NORMAL_SPEED , MAX_RELATIVE_TANGENT_SPEED , MAX_ROLLING_SPEED , NUM_MERGE_THRESHOLDS } |
| Indices to the threshold values when a body should be merged. More... | |
| enum | SplitThresholds : agx::UInt { MAX_IMPACT_SPEED = NUM_MERGE_THRESHOLDS , LOGICAL_IMPACT , MAY_SPLIT_IN_GRAVITY_FIELD , TANGENTIAL_ADHESION , NORMAL_ADHESION , NUM_THRESHOLDS } |
| Indices to the threshold values when a body should be split. More... | |
Public Types inherited from agxSDK::MergeSplitThresholds | |
| using | MixFunction = std::function< agx::Real(agx::Real, agx::Real)> |
| Mixing two values function signature given two values and the return value is the mix. | |
Public Member Functions | |
| GeometryContactMergeSplitThresholds () | |
| Default constructor, all thresholds will be set to default. | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxSDK::GeometryContactMergeSplitThresholds) | |
| virtual agx::ICloneableRef | clone (agx::ICloneable *child=nullptr) override |
| Creates and returns a clone of this object. | |
| agx::Real | getMaxImpactSpeed (const GeometryContactMergeSplitThresholds *other=nullptr) const |
| agx::Real | getMaxRelativeNormalSpeed (const GeometryContactMergeSplitThresholds *other=nullptr) const |
| agx::Real | getMaxRelativeTangentSpeed (const GeometryContactMergeSplitThresholds *other=nullptr) const |
| agx::Real | getMaxRollingSpeed (const GeometryContactMergeSplitThresholds *other=nullptr) const |
| agx::Bool | getMaySplitInGravityField (const GeometryContactMergeSplitThresholds *other=nullptr) const |
| agx::Real | getNormalAdhesion (const GeometryContactMergeSplitThresholds *other=nullptr) const |
| agx::Bool | getSplitOnLogicalImpact (const GeometryContactMergeSplitThresholds *other=nullptr) const |
| agx::Real | getTangentialAdhesion (const GeometryContactMergeSplitThresholds *other=nullptr) const |
| virtual void | resetToDefault () override |
| Reset all values to default. | |
| void | setMaxImpactSpeed (agx::Real value) |
| Assign maximum impact speed (along a contact normal) a merged object can resist without being split. | |
| void | setMaxRelativeNormalSpeed (agx::Real value) |
| Assign maximum speed along a contact normal for a contact to be considered resting. | |
| void | setMaxRelativeTangentSpeed (agx::Real value) |
| Assign maximum (sliding) speed along a contact tangent for a contact to be considered resting. | |
| void | setMaxRollingSpeed (agx::Real value) |
| Assign maximum (rolling) speed for a contact to be considered resting. | |
| void | setMaySplitInGravityField (agx::Bool maySplitInGravityField) |
| Check split given external forces for all objects merged (i.e., rb->getForce() the sum of rb->addForce(), including the gravity force). | |
| void | setNormalAdhesion (agx::Real value) |
| Adhesive force in the normal directions preventing the object to split (if > 0) when the object is subject to external interactions (e.g., constraints). | |
| void | setSplitOnLogicalImpact (agx::Bool value) |
| True to split when geometry contact state is agxCollide::GeometryContact::IMPACT_STATE, i.e., the first time the objects collide. | |
| void | setTangentialAdhesion (agx::Real value) |
| Adhesive force in the tangential directions preventing the object to split (if > 0) when the object is subject to external interactions (e.g., constraints). | |
Public Member Functions inherited from agxSDK::MergeSplitThresholds | |
| agx::Real | get (const agx::UInt index) const |
| agx::Real | get (const agx::UInt index, const MergeSplitThresholds *other, MergeSplitThresholds::MixFunction mixFunc) const |
| Find and mix values of two instances. | |
| agx::UInt | getNumValues () const |
| agx::Bool | isGlobal () const |
| virtual void | resetToDefault ()=0 |
| Restore all thresholds to default. | |
| void | set (const agx::UInt index, agx::Real value) |
| Assign value given index and value. | |
| virtual agx::ICloneableRef | clone (agx::ICloneable *child=nullptr)=0 |
| Creates a clone of this object. | |
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 agxStream::Serializable * | create (agxStream::InputArchive &) |
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 | |
| virtual | ~GeometryContactMergeSplitThresholds () |
| Reference counted object - protected destructor. | |
Protected Member Functions inherited from agxSDK::MergeSplitThresholds | |
| MergeSplitThresholds (const agx::UInt numValues) | |
| Construct given number of thresholds. | |
| virtual | ~MergeSplitThresholds () |
| Reference counted object, protected destructor. | |
| void | cloneValuesTo (MergeSplitThresholds &target) const |
Resizes and copies values to target. | |
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 () |
Additional Inherited Members | |
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. | |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Specific thresholds used to merge and split given geometry contacts.
Definition at line 28 of file GeometryContactMergeSplitThresholds.h.
Indices to the threshold values when a body should be merged.
Definition at line 34 of file GeometryContactMergeSplitThresholds.h.
Indices to the threshold values when a body should be split.
| Enumerator | |
|---|---|
| MAX_IMPACT_SPEED | If the impact speed (approaching each other) is higher than this value, the objects may split. |
| LOGICAL_IMPACT | Split when the state of the geometry contact is agxCollide::GeometryContact::IMPACT_STATE. |
| MAY_SPLIT_IN_GRAVITY_FIELD | Check split given external forces for all objects merged (i.e., rb->getForce() the sum of rb->addForce(), including the gravity force). Performance warning, disabled by default. |
| TANGENTIAL_ADHESION | Adhesive force in the tangential directions preventing the object to split (if > 0). Default: 0.0 |
| NORMAL_ADHESION | Adhesive force in the normal direction preventing the object to split (if > 0). Default: 0.0 |
| NUM_THRESHOLDS | |
Definition at line 48 of file GeometryContactMergeSplitThresholds.h.
| agxSDK::GeometryContactMergeSplitThresholds::GeometryContactMergeSplitThresholds | ( | ) |
Default constructor, all thresholds will be set to default.
|
protectedvirtual |
Reference counted object - protected destructor.
| agxSDK::GeometryContactMergeSplitThresholds::AGXSTREAM_DECLARE_SERIALIZABLE_BASE | ( | agxSDK::GeometryContactMergeSplitThresholds | ) |
|
overridevirtual |
Creates and returns a clone of this object.
Implements agx::ICloneable.
|
inlinestatic |
Definition at line 190 of file GeometryContactMergeSplitThresholds.h.
| agx::Real agxSDK::GeometryContactMergeSplitThresholds::getMaxImpactSpeed | ( | const GeometryContactMergeSplitThresholds * | other = nullptr | ) | const |
| other | - if given, the non-default/non-global value will be used and if both are explicit, the maximum value of the two is returned |
Definition at line 224 of file GeometryContactMergeSplitThresholds.h.
References agxSDK::MergeSplitThresholds::get(), and MAX_IMPACT_SPEED.
| agx::Real agxSDK::GeometryContactMergeSplitThresholds::getMaxRelativeNormalSpeed | ( | const GeometryContactMergeSplitThresholds * | other = nullptr | ) | const |
| other | - if given, the non-default/non-global value will be used and if both are explicit, the maximum value of the two is returned |
Definition at line 209 of file GeometryContactMergeSplitThresholds.h.
References agxSDK::MergeSplitThresholds::get(), and MAX_RELATIVE_NORMAL_SPEED.
| agx::Real agxSDK::GeometryContactMergeSplitThresholds::getMaxRelativeTangentSpeed | ( | const GeometryContactMergeSplitThresholds * | other = nullptr | ) | const |
| other | - if given, the non-default/non-global value will be used and if both are explicit, the maximum value of the two is returned |
Definition at line 214 of file GeometryContactMergeSplitThresholds.h.
References agxSDK::MergeSplitThresholds::get(), and MAX_RELATIVE_TANGENT_SPEED.
| agx::Real agxSDK::GeometryContactMergeSplitThresholds::getMaxRollingSpeed | ( | const GeometryContactMergeSplitThresholds * | other = nullptr | ) | const |
| other | - if given, the non-default/non-global value will be used and if both are explicit, the maximum value of the two is returned |
Definition at line 219 of file GeometryContactMergeSplitThresholds.h.
References agxSDK::MergeSplitThresholds::get(), and MAX_ROLLING_SPEED.
| agx::Bool agxSDK::GeometryContactMergeSplitThresholds::getMaySplitInGravityField | ( | const GeometryContactMergeSplitThresholds * | other = nullptr | ) | const |
| other | - if given, the non-default/non-global flag will be used and if both are explicit, the maximum value (true) of the two is returned |
Definition at line 234 of file GeometryContactMergeSplitThresholds.h.
References agxSDK::MergeSplitThresholds::get(), and MAY_SPLIT_IN_GRAVITY_FIELD.
| agx::Real agxSDK::GeometryContactMergeSplitThresholds::getNormalAdhesion | ( | const GeometryContactMergeSplitThresholds * | other = nullptr | ) | const |
| other | - if given, the non-default/non-global flag will be used and if both are explicit, the maximum value of the two is returned |
Definition at line 244 of file GeometryContactMergeSplitThresholds.h.
References agxSDK::MergeSplitThresholds::get(), and NORMAL_ADHESION.
| agx::Bool agxSDK::GeometryContactMergeSplitThresholds::getSplitOnLogicalImpact | ( | const GeometryContactMergeSplitThresholds * | other = nullptr | ) | const |
| other | - if given, the non-default/non-global value will be used and if both are explicit, the maximum value (true) of the two is returned |
Definition at line 229 of file GeometryContactMergeSplitThresholds.h.
References agxSDK::MergeSplitThresholds::get(), and LOGICAL_IMPACT.
| agx::Real agxSDK::GeometryContactMergeSplitThresholds::getTangentialAdhesion | ( | const GeometryContactMergeSplitThresholds * | other = nullptr | ) | const |
| other | - if given, the non-default/non-global flag will be used and if both are explicit, the maximum value of the two is returned |
Definition at line 239 of file GeometryContactMergeSplitThresholds.h.
References agxSDK::MergeSplitThresholds::get(), and TANGENTIAL_ADHESION.
|
overridevirtual |
Reset all values to default.
Implements agxSDK::MergeSplitThresholds.
| void agxSDK::GeometryContactMergeSplitThresholds::setMaxImpactSpeed | ( | agx::Real | value | ) |
Assign maximum impact speed (along a contact normal) a merged object can resist without being split.
Default 0.01.
| void agxSDK::GeometryContactMergeSplitThresholds::setMaxRelativeNormalSpeed | ( | agx::Real | value | ) |
Assign maximum speed along a contact normal for a contact to be considered resting.
Default: 0.01.
| void agxSDK::GeometryContactMergeSplitThresholds::setMaxRelativeTangentSpeed | ( | agx::Real | value | ) |
Assign maximum (sliding) speed along a contact tangent for a contact to be considered resting.
Default 0.01.
| void agxSDK::GeometryContactMergeSplitThresholds::setMaxRollingSpeed | ( | agx::Real | value | ) |
Assign maximum (rolling) speed for a contact to be considered resting.
Default 0.01.
| void agxSDK::GeometryContactMergeSplitThresholds::setMaySplitInGravityField | ( | agx::Bool | maySplitInGravityField | ) |
Check split given external forces for all objects merged (i.e., rb->getForce() the sum of rb->addForce(), including the gravity force).
Performance warning, disabled by default.
| maySplitInGravityField | - true to enable, false to disable |
| void agxSDK::GeometryContactMergeSplitThresholds::setNormalAdhesion | ( | agx::Real | value | ) |
Adhesive force in the normal directions preventing the object to split (if > 0) when the object is subject to external interactions (e.g., constraints).
Default: 0.0
| value | - normal direction adhesive force |
| void agxSDK::GeometryContactMergeSplitThresholds::setSplitOnLogicalImpact | ( | agx::Bool | value | ) |
True to split when geometry contact state is agxCollide::GeometryContact::IMPACT_STATE, i.e., the first time the objects collide.
Default is false and "max impact speed" will be used instead.
| void agxSDK::GeometryContactMergeSplitThresholds::setTangentialAdhesion | ( | agx::Real | value | ) |
Adhesive force in the tangential directions preventing the object to split (if > 0) when the object is subject to external interactions (e.g., constraints).
Default: 0.0
| value | - tangential adhesive force |