|
AGXDynamics
2.31.1.0
|
Object containing properties of an agxVehicle::Track. More...
#include <TrackProperties.h>
Inheritance diagram for agxVehicle::TrackProperties:Public Member Functions | |
| TrackProperties () | |
| Default constructor - all flags and values are set do default. More... | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| const char * | getClassName () const override |
| agx::Bool | getEnableHingeRange () const |
| agx::Bool | getEnableOnInitializeMergeNodesToWheels () const |
| agx::Bool | getEnableOnInitializeTransformNodesToWheels () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::Real | getHingeCompliance (agx::Hinge::DOF dof) const |
| agx::Real | getHingeDamping (agx::Hinge::DOF dof) const |
| agx::RangeReal | getHingeRangeRange () const |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agx::Real | getMinStabilizingHingeNormalForce () const |
| agx::Real | getNodesToWheelsMergeThreshold () const |
| agx::Real | getNodesToWheelsSplitThreshold () const |
| agx::UInt | getNumNodesIncludedInAverageDirection () const |
| int | getReferenceCount () const |
| agx::Real | getStabilizingHingeFrictionParameter () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agx::Real | getTransformNodesToWheelsOverlap () const |
| agx::Uuid | getUuid () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isFinished () const |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| void | resetToDefault () |
| Resets all flags and values to default. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| void | setEnableHingeRange (agx::Bool enable) |
| True to enable the range in the hinges between the track nodes to define how the track may bend. More... | |
| void | setEnableOnInitializeMergeNodesToWheels (agx::Bool enable) |
| When the track has been initialized some nodes are in contact with the wheels. More... | |
| void | setEnableOnInitializeTransformNodesToWheels (agx::Bool enable) |
| True to position/transform the track nodes to the surface of the wheels after the track has been initialized. More... | |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setHingeCompliance (agx::Real compliance) |
| Assign compliance (for all hinge degrees of freedom) used in the hinges between track nodes. More... | |
| void | setHingeCompliance (agx::Real compliance, agx::Hinge::DOF dof) |
| Assign compliance for a given degree of freedom in the hinges between track nodes. More... | |
| void | setHingeComplianceRotational (agx::Real compliance) |
| Assign compliance for the rotational degrees of freedom in the hinges between track nodes. More... | |
| void | setHingeComplianceTranslational (agx::Real compliance) |
| Assign compliance for the translational degrees of freedom in the hinges between track nodes. More... | |
| void | setHingeDamping (agx::Real damping) |
| Assign damping (for all hinge degrees of freedom) used in the hinges between track nodes. More... | |
| void | setHingeDamping (agx::Real damping, agx::Hinge::DOF dof) |
| Assign damping for a given degree of freedom in the hinges between track nodes. More... | |
| void | setHingeDampingRotational (agx::Real damping) |
| Assign damping for the rotational degrees of freedom in the hinges between track nodes. More... | |
| void | setHingeDampingTranslational (agx::Real damping) |
| Assign damping for the translational degrees of freedom in the hinges between track nodes. More... | |
| void | setHingeRangeRange (agx::Real lowerAngle, agx::Real upperAngle) |
| Assign range used if the hinge range between the nodes are enabled. More... | |
| void | setMinStabilizingHingeNormalForce (agx::Real minNormalForce) |
| Minimum value of the normal force (the hinge force along the track) used in "internal" friction calculations. More... | |
| void | setNodesToWheelsMergeThreshold (agx::Real mergeThreshold) |
| Threshold when to merge a node to a wheel. More... | |
| void | setNodesToWheelsSplitThreshold (agx::Real splitThreshold) |
| Threshold when to split a node from a wheel. More... | |
| void | setNumNodesIncludedInAverageDirection (agx::UInt numIncludedNodes) |
| Average direction of non-merged nodes entering or exiting a wheel is used as reference direction to split of a merged node. More... | |
| void | setStabilizingHingeFrictionParameter (agx::Real frictionParameter) |
| Friction parameter of the internal friction in the node hinges. More... | |
| void | setTransformNodesToWheelsOverlap (agx::Real overlap) |
| When the nodes are transformed to the wheels, this is the final target overlap. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | updateComplianceDamping (agx::Hinge &hinge) const |
| Writes compliance and damping to the given hinge instance. More... | |
Static Public Member Functions | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static const char * | getConstructClassId () |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Types | |
| using | Flags = agx::BitState< FlagsEnum, agx::UInt32 > |
| enum | FlagsEnum : agx::UInt32 { ON_INITIALIZE_MERGE_NODES_TO_WHEELS = 1 << 0, ON_INITIALIZE_TRANSFORM_NODES_TO_WHEELS = 1 << 1, HINGE_RANGE_ENABLED = 1 << 2 } |
| enum | RealValue : agx::UInt { HINGE_RANGE_LOWER, HINGE_RANGE_UPPER, NODE_TO_WHEEL_OVERLAP, NODE_TO_WHEEL_MERGE_THRESHOLD, NODE_TO_WHEEL_SPLIT_THRESHOLD, NUM_NODES_IN_AVERAGE_DIRECTION, MIN_STABILIZING_NORMAL_FORCE, STABILIZING_FRICTION_PARAMETER, NUM_REAL_VALUES } |
| using | RealValues = agx::RealVector |
Protected Member Functions | |
| virtual | ~TrackProperties () |
| Reference counted object - protected destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | generateUuid () |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Object containing properties of an agxVehicle::Track.
Definition at line 32 of file TrackProperties.h.
|
protected |
Definition at line 254 of file TrackProperties.h.
|
protected |
Definition at line 268 of file TrackProperties.h.
|
protected |
| Enumerator | |
|---|---|
| ON_INITIALIZE_MERGE_NODES_TO_WHEELS | |
| ON_INITIALIZE_TRANSFORM_NODES_TO_WHEELS | |
| HINGE_RANGE_ENABLED | |
Definition at line 248 of file TrackProperties.h.
|
protected |
Definition at line 256 of file TrackProperties.h.
| agxVehicle::TrackProperties::TrackProperties | ( | ) |
Default constructor - all flags and values are set do default.
|
protectedvirtual |
Reference counted object - protected destructor.
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
inlinestatic |
Definition at line 245 of file TrackProperties.h.
|
inlinestatic |
Definition at line 245 of file TrackProperties.h.
|
protectedinherited |
|
protectedinherited |
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 245 of file TrackProperties.h.
|
inlinestatic |
Definition at line 245 of file TrackProperties.h.
|
staticprotectedinherited |
|
inline |
Definition at line 293 of file TrackProperties.h.
| agx::Bool agxVehicle::TrackProperties::getEnableOnInitializeMergeNodesToWheels | ( | ) | const |
| agx::Bool agxVehicle::TrackProperties::getEnableOnInitializeTransformNodesToWheels | ( | ) | const |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
|
inline |
Definition at line 283 of file TrackProperties.h.
|
inline |
Definition at line 288 of file TrackProperties.h.
|
inline |
Definition at line 298 of file TrackProperties.h.
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.h.
| agx::Real agxVehicle::TrackProperties::getMinStabilizingHingeNormalForce | ( | ) | const |
| agx::Real agxVehicle::TrackProperties::getNodesToWheelsMergeThreshold | ( | ) | const |
| agx::Real agxVehicle::TrackProperties::getNodesToWheelsSplitThreshold | ( | ) | const |
| agx::UInt agxVehicle::TrackProperties::getNumNodesIncludedInAverageDirection | ( | ) | const |
|
inherited |
| agx::Real agxVehicle::TrackProperties::getStabilizingHingeFrictionParameter | ( | ) | const |
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 245 of file TrackProperties.h.
| agx::Real agxVehicle::TrackProperties::getTransformNodesToWheelsOverlap | ( | ) | const |
|
inherited |
Definition at line 268 of file Serializable.h.
Referenced by agxSDK::UuidHashCollisionFilter::match().
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
|
inherited |
Definition at line 252 of file Serializable.h.
References AGX_FORCE_INLINE.
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
| void agxVehicle::TrackProperties::resetToDefault | ( | ) |
Resets all flags and values to default.
|
overridevirtual |
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
True to enable the range in the hinges between the track nodes to define how the track may bend.
| enable | - true to enable, false to disable (default: true) |
When the track has been initialized some nodes are in contact with the wheels.
If this flag is true the interacting nodes will be merged to the wheel directly after initialize, if false the nodes will be merged during the first (or later) time step.
| enable | - true to enable, false to disable (default: false) |
True to position/transform the track nodes to the surface of the wheels after the track has been initialized.
When false, the routing algorithm positions are used.
| enable | - true to enable, false to disable (default: true) |
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
Assign compliance (for all hinge degrees of freedom) used in the hinges between track nodes.
| compliance | - new compliance (default: 1.0E-10) |
| void agxVehicle::TrackProperties::setHingeCompliance | ( | agx::Real | compliance, |
| agx::Hinge::DOF | dof | ||
| ) |
Assign compliance for a given degree of freedom in the hinges between track nodes.
| compliance | - new compliance (default: 1.0E-10) |
| dof | - hinge degree of freedom |
Assign compliance for the rotational degrees of freedom in the hinges between track nodes.
| compliance | - new compliance (default: 1.0E-10) |
Assign compliance for the translational degrees of freedom in the hinges between track nodes.
| compliance | - new compliance (default: 1.0E-10) |
Assign damping (for all hinge degrees of freedom) used in the hinges between track nodes.
| damping | - new damping (default: 0.0333) |
| void agxVehicle::TrackProperties::setHingeDamping | ( | agx::Real | damping, |
| agx::Hinge::DOF | dof | ||
| ) |
Assign damping for a given degree of freedom in the hinges between track nodes.
| damping | - new damping (default: 0.0333) |
| dof | - hinge degree of freedom |
Assign damping for the rotational degrees of freedom in the hinges between track nodes.
| damping | - new damping (default: 0.0333) |
Assign damping for the translational degrees of freedom in the hinges between track nodes.
| damping | - new damping (default: 0.0333) |
Assign range used if the hinge range between the nodes are enabled.
| lowerAngle | - lower angle in radians, begin of range (default: -2 pi / 3) |
| upperAngle | - upper angle in radians, end of range (default: degreesToRadians( 20 )) |
Minimum value of the normal force (the hinge force along the track) used in "internal" friction calculations.
I.e., when the track is compressed, this value is used with the friction coefficient as a minimum stabilizing compliance. If this value is negative there will be stabilization when the track is compressed. Default: 100.
| minNormalForce | - minimum normal force to calculate internal friction in the node hinges |
Threshold when to merge a node to a wheel.
Given a reference direction in the track, this value is the projection of the deviation (from the reference direction) of the node direction onto the wheel radial direction vector. I.e., when the projection is negative the node can be considered "wrapped" on the wheel. Default value: -0.1.
| mergeThreshold | - merge threshold (default: -0.1) |
Threshold when to split a node from a wheel.
Given a reference direction in the track, this value is the projection of the deviation (from the reference direction) of the node direction onto the wheel radial direction vector. I.e., when the projection is negative the node can be considered "wrapped" on the wheel. Default value: -0.05.
| splitThreshold | - split threshold (default: -0.05) |
| void agxVehicle::TrackProperties::setNumNodesIncludedInAverageDirection | ( | agx::UInt | numIncludedNodes | ) |
Average direction of non-merged nodes entering or exiting a wheel is used as reference direction to split of a merged node.
This is the number of nodes to include into this average direction.
| numIncludedNodes | - number of nodes to include in average direction (default: 3) |
| void agxVehicle::TrackProperties::setStabilizingHingeFrictionParameter | ( | agx::Real | frictionParameter | ) |
Friction parameter of the internal friction in the node hinges.
This parameter scales the normal force in the hinge. Default: 1.0
| frictionParameter | - normal force scale parameter |
When the nodes are transformed to the wheels, this is the final target overlap.
| overlap | - target overlap (default: 1.0E-3) |
Explicitly set a Uuid on a serializable object.
Use this method with great care, as it can result in non-unique identifiers in the system!
|
overridevirtual |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
| void agxVehicle::TrackProperties::updateComplianceDamping | ( | agx::Hinge & | hinge | ) | const |
Writes compliance and damping to the given hinge instance.
| hinge | - hinge to write compliance and damping to |
|
staticinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.