|
AGX Dynamics 2.42.3.0
|
Specific thresholds used to split and merge objects given constraints. More...
#include <ConstraintMergeSplitThresholds.h>
Inheritance diagram for agxSDK::ConstraintMergeSplitThresholds:Public Types | |
| enum | MergeThresholds : agx::UInt { MAX_RELATIVE_SPEED , NUM_MERGE_THRESHOLDS } |
| enum | SplitThresholds : agx::UInt { DESIRED_SPEED_DIFF = NUM_MERGE_THRESHOLDS , DESIRED_LOCK_ANGLE_DIFF , DESIRED_RANGE_ANGLE_DIFF , DESIRED_FORCE_RANGE_DIFF , NUM_THRESHOLDS } |
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 | |
| ConstraintMergeSplitThresholds () | |
| Default constructor, all thresholds will be set to default. | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxSDK::ConstraintMergeSplitThresholds) | |
| virtual agx::ICloneableRef | clone (agx::ICloneable *child=nullptr) override |
| Creates and returns a clone of this object. | |
| agx::Real | getMaxDesiredForceRangeDiff () const |
| agx::Real | getMaxDesiredLockAngleDiff () const |
| agx::Real | getMaxDesiredRangeAngleDiff () const |
| agx::Real | getMaxDesiredSpeedDiff () const |
| agx::Real | getMaxRelativeSpeed () const |
| When the relative motion between the objects is less than this threshold, the objects may merge. | |
| virtual void | resetToDefault () override |
| Resets all values to default. | |
| void | setMaxDesiredForceRangeDiff (agx::Real value) |
| Assign maximum difference the 'force range'/desired force range parameter in any controller may change without splitting the constrained objects. | |
| void | setMaxDesiredLockAngleDiff (agx::Real value) |
| Assign maximum difference the 'position'/desired angle parameter in a lock controller may change without splitting the constrained objects. | |
| void | setMaxDesiredRangeAngleDiff (agx::Real value) |
| Assign maximum difference the 'position'/desired angle parameter in a range controller may change without splitting the constrained objects. | |
| void | setMaxDesiredSpeedDiff (agx::Real value) |
| Assign maximum difference the 'speed'/desired speed parameter in a motor controller may change without splitting the constrained objects. | |
| void | setMaxRelativeSpeed (agx::Real value) |
| Assign maximum relative speed between the constrained objects for the system to be considered at rest. | |
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 | ~ConstraintMergeSplitThresholds () |
| 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 split and merge objects given constraints.
Definition at line 28 of file ConstraintMergeSplitThresholds.h.
| Enumerator | |
|---|---|
| MAX_RELATIVE_SPEED | |
| NUM_MERGE_THRESHOLDS | |
Definition at line 31 of file ConstraintMergeSplitThresholds.h.
| Enumerator | |
|---|---|
| DESIRED_SPEED_DIFF | |
| DESIRED_LOCK_ANGLE_DIFF | |
| DESIRED_RANGE_ANGLE_DIFF | |
| DESIRED_FORCE_RANGE_DIFF | |
| NUM_THRESHOLDS | |
Definition at line 37 of file ConstraintMergeSplitThresholds.h.
| agxSDK::ConstraintMergeSplitThresholds::ConstraintMergeSplitThresholds | ( | ) |
Default constructor, all thresholds will be set to default.
|
protectedvirtual |
Reference counted object - protected destructor.
| agxSDK::ConstraintMergeSplitThresholds::AGXSTREAM_DECLARE_SERIALIZABLE_BASE | ( | agxSDK::ConstraintMergeSplitThresholds | ) |
|
overridevirtual |
Creates and returns a clone of this object.
Implements agx::ICloneable.
|
inlinestatic |
Definition at line 114 of file ConstraintMergeSplitThresholds.h.
|
inline |
Definition at line 153 of file ConstraintMergeSplitThresholds.h.
References DESIRED_FORCE_RANGE_DIFF, and agxSDK::MergeSplitThresholds::get().
|
inline |
Definition at line 143 of file ConstraintMergeSplitThresholds.h.
References DESIRED_LOCK_ANGLE_DIFF, and agxSDK::MergeSplitThresholds::get().
|
inline |
Definition at line 148 of file ConstraintMergeSplitThresholds.h.
References DESIRED_RANGE_ANGLE_DIFF, and agxSDK::MergeSplitThresholds::get().
|
inline |
Definition at line 138 of file ConstraintMergeSplitThresholds.h.
References DESIRED_SPEED_DIFF, and agxSDK::MergeSplitThresholds::get().
|
inline |
When the relative motion between the objects is less than this threshold, the objects may merge.
Definition at line 133 of file ConstraintMergeSplitThresholds.h.
References agxSDK::MergeSplitThresholds::get(), and MAX_RELATIVE_SPEED.
|
overridevirtual |
Resets all values to default.
Implements agxSDK::MergeSplitThresholds.
| void agxSDK::ConstraintMergeSplitThresholds::setMaxDesiredForceRangeDiff | ( | agx::Real | value | ) |
Assign maximum difference the 'force range'/desired force range parameter in any controller may change without splitting the constrained objects.
Default: 0.1.
| void agxSDK::ConstraintMergeSplitThresholds::setMaxDesiredLockAngleDiff | ( | agx::Real | value | ) |
Assign maximum difference the 'position'/desired angle parameter in a lock controller may change without splitting the constrained objects.
Default: 1.0E-5.
| void agxSDK::ConstraintMergeSplitThresholds::setMaxDesiredRangeAngleDiff | ( | agx::Real | value | ) |
Assign maximum difference the 'position'/desired angle parameter in a range controller may change without splitting the constrained objects.
Default: 1.0E-5.
| void agxSDK::ConstraintMergeSplitThresholds::setMaxDesiredSpeedDiff | ( | agx::Real | value | ) |
Assign maximum difference the 'speed'/desired speed parameter in a motor controller may change without splitting the constrained objects.
Default: 1.0E-5.
| void agxSDK::ConstraintMergeSplitThresholds::setMaxRelativeSpeed | ( | agx::Real | value | ) |
Assign maximum relative speed between the constrained objects for the system to be considered at rest.
I.e., when the relative motion between the objects is less than this threshold, the objects may merge. Default: 0.005.