|
AGX Dynamics
2.35.0.1
|
Wheel used in tracked vehicles. More...
#include <TrackWheel.h>
Inheritance diagram for agxVehicle::TrackWheel:Public Types | |
| using | ControlPointContainer = agx::Vec3Vector |
| enum | Model { SPROCKET , IDLER , ROLLER } |
| using | Properties = agx::BitState< Property, agx::UInt32 > |
| enum | Property : agx::UInt32 { MERGE_NODES = 1 << 0 , SPLIT_SEGMENTS = 1 << 2 , MOVE_NODES_TO_ROTATION_PLANE = 1 << 3 , MOVE_NODES_TO_WHEEL = 1 << 4 } |
Public Types inherited from agxVehicle::Wheel | |
| using | ConstraintContainer = agx::Vector< agx::ConstraintRef > |
Public Member Functions | |
| TrackWheel (Model model, agx::Real radius, agx::RigidBody *rb, agx::AffineMatrix4x4 rbRelTransform) | |
| Construct given property (wheel type), radius, rigid body and transform defining wheel center, up and rotation axes in the rigid body frame. More... | |
| TrackWheel (Model model, agx::Real radius, agx::RigidBody *rb, agx::FrameRef rbRelFrame=nullptr) | |
| Construct given property (wheel type), radius, rigid body and frame defining wheel center, up and rotation axes in the rigid body frame. More... | |
| IndexRangeContainer | findMergedNodesIndexRanges () const |
| Finds merged nodes indices and splits the list into ranges where the indices aren't consecutive. More... | |
| agx::UIntVector | findMergedNodesIndices () const |
| List of node indices merged to this wheel. More... | |
| ControlPointContainer | getControlPoints (agx::Real circleSegmentLength) const |
Creates a set of points defining the wheel circle, each length circleSegmentLength apart. More... | |
| agx::Bool | getControlPoints (agx::Real circleSegmentLength, ControlPointContainer &container) const |
Creates a set of points defining the wheel circle, each length circleSegmentLength apart. More... | |
| agx::Bool | getEnableProperty (Property property) const |
| agx::MergedBody * | getMergedBody () const |
| Model | getModel () const |
| agx::MergedBody * | getOrCreateMergedBody (agxSDK::Simulation *simulation) |
| const Properties | getProperties () const |
| agxVehicle::Track * | getTrack () const |
| agx::Bool | hasControlPoint (const agx::Vec3 &point, const agx::Real epsilon=agx::REAL_SQRT_EPSILON) const |
| template<typename... ModelTypes> | |
| agx::Bool | isModel (ModelTypes... modelTypes) const |
| void | setEnableProperty (Property property, agx::Bool enable) |
| Enable/disable a property for this wheel. More... | |
Public Member Functions inherited from agxVehicle::Wheel | |
| Wheel (agx::Real radius, agx::RigidBody *rb, agx::AffineMatrix4x4 rbRelTransform) | |
| Construct wheel given radius, wheel body and transform defining wheel center, up and rotation axes in the rigid body frame. More... | |
| Wheel (agx::Real radius, agx::RigidBody *rb, agx::Frame *rbRelFrame=nullptr) | |
| Construct wheel given radius, wheel body and frame defining wheel center, up and rotation axes in the rigid body frame. More... | |
| template<typename T > | |
| agx::ref_ptr< T > | attachConstraint (const agx::Name &name, agx::RigidBody *other, agx::Real wheelCenterOffset) |
| Create constraint with this wheel and some other rigid body. More... | |
| agx::Hinge * | attachHinge (const agx::Name &name, agx::RigidBody *other, agx::Real wheelCenterOffset) |
Specialized version of attachConstraint to create a hinge with this wheel body and other. More... | |
| agx::Vec3 | getCenterPosition () const |
| const char * | getClassName () const override |
| agx::Constraint * | getConstraint () const |
| agx::Constraint * | getConstraint (const agx::Name &name) const |
| const ConstraintContainer & | getConstraints () const |
| agx::Frame * | getLocalFrame () const |
| agx::Real | getRadius () const |
| agx::RigidBody * | getRigidBody () const |
| agx::Vec3 | getRotationAxis () const |
| agx::Plane | getRotationAxisPlane () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agx::AffineMatrix4x4 | getTransform () const |
| agx::Vec3 | getUpAxis () const |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | store (agxStream::OutputArchive &out) const override |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. More... | |
| Referenced (const Referenced &) | |
| 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 |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. More... | |
| 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 | 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... | |
Public Member Functions inherited from agxStream::Serializable | |
| virtual | ~Serializable () |
| Destructor for normal C++ use but hidden from SWIG bindings. More... | |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agx::Uuid | getUuid () const |
| bool | isFinished () const |
| 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 | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
Protected Member Functions | |
| TrackWheel () | |
| virtual | ~TrackWheel () |
Protected Member Functions inherited from agxVehicle::Wheel | |
| Wheel () | |
| Default constructor used only when this object is restored. More... | |
| virtual | ~Wheel () |
| Reference counted object - protected destructor. More... | |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Member Functions inherited from agxStream::Serializable | |
| Serializable () | |
| Default constructor. More... | |
| Serializable (const Serializable &other) | |
| Copy constructor. More... | |
| void | generateUuid () |
Additional Inherited Members | |
Static Public Member Functions inherited from agxVehicle::Wheel | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static const char * | getConstructClassId () |
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. More... | |
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. More... | |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Wheel used in tracked vehicles.
Definition at line 31 of file TrackWheel.h.
Definition at line 59 of file TrackWheel.h.
| using agxVehicle::TrackWheel::Properties = agx::BitState<Property, agx::UInt32> |
Definition at line 63 of file TrackWheel.h.
Definition at line 34 of file TrackWheel.h.
Definition at line 41 of file TrackWheel.h.
| agxVehicle::TrackWheel::TrackWheel | ( | Model | model, |
| agx::Real | radius, | ||
| agx::RigidBody * | rb, | ||
| agx::FrameRef | rbRelFrame = nullptr |
||
| ) |
Construct given property (wheel type), radius, rigid body and frame defining wheel center, up and rotation axes in the rigid body frame.
Rotation axis is by definition the y axis in rbRelFrame (if given, otherwise y axis of rb).
Up axis is by definition the z axis in rbRelFrame (if given, otherwise z axis of rb).
| model | - wheel model |
| radius | - radius of the wheel |
| rb | - wheel rigid body |
| rbRelFrame | - frame defining center position, up and rotation axes in rb frame |
| agxVehicle::TrackWheel::TrackWheel | ( | Model | model, |
| agx::Real | radius, | ||
| agx::RigidBody * | rb, | ||
| agx::AffineMatrix4x4 | rbRelTransform | ||
| ) |
Construct given property (wheel type), radius, rigid body and transform defining wheel center, up and rotation axes in the rigid body frame.
Rotation axis is by definition the y axis in rbRelFrame (if given, otherwise y axis of rb).
Up axis is by definition the z axis in rbRelFrame (if given, otherwise z axis of rb).
| model | - wheel model |
| radius | - radius of the wheel |
| rb | - wheel rigid body |
| rbRelTransform | - transform defining center position, up and rotation axes in rb frame |
|
protected |
|
protectedvirtual |
| IndexRangeContainer agxVehicle::TrackWheel::findMergedNodesIndexRanges | ( | ) | const |
Finds merged nodes indices and splits the list into ranges where the indices aren't consecutive.
Note that if the first and the last node both are in the list the last node will be included in the first range. E.g., instead of [[0, 1, 2, 3] [78, 79]] the resulting range could be (given it's 80 nodes in the track) [78, 79, 0, 1, 2, 3],
| agx::UIntVector agxVehicle::TrackWheel::findMergedNodesIndices | ( | ) | const |
List of node indices merged to this wheel.
The resulting list is sorted with lowest index first.
| ControlPointContainer agxVehicle::TrackWheel::getControlPoints | ( | agx::Real | circleSegmentLength | ) | const |
Creates a set of points defining the wheel circle, each length circleSegmentLength apart.
The points are given in the world coordinate frame.
| circleSegmentLength | - desired circle segment length between each point |
| agx::Bool agxVehicle::TrackWheel::getControlPoints | ( | agx::Real | circleSegmentLength, |
| ControlPointContainer & | container | ||
| ) | const |
Creates a set of points defining the wheel circle, each length circleSegmentLength apart.
The points are given in the world coordinate frame and will be added to container.
| circleSegmentLength | - desired circle segment length between each point |
| container | - control points will be added to this container |
|
inline |
| property | - wheel property |
Definition at line 226 of file TrackWheel.h.
|
inline |
Definition at line 206 of file TrackWheel.h.
| Model agxVehicle::TrackWheel::getModel | ( | ) | const |
| agx::MergedBody* agxVehicle::TrackWheel::getOrCreateMergedBody | ( | agxSDK::Simulation * | simulation | ) |
|
inline |
Definition at line 221 of file TrackWheel.h.
|
inline |
Definition at line 231 of file TrackWheel.h.
| agx::Bool agxVehicle::TrackWheel::hasControlPoint | ( | const agx::Vec3 & | point, |
| const agx::Real | epsilon = agx::REAL_SQRT_EPSILON |
||
| ) | const |
|
inline |
Definition at line 212 of file TrackWheel.h.
Enable/disable a property for this wheel.
| property | - property to enable/disable |
| enable | - true to enable the property, false to disable |