|
AGX Dynamics 2.42.3.1
|
Track curve event with a type, an entry tangent (i.e., tangent to this event), wheel index, etc. More...
#include <TrackCurveEvent.h>
Inheritance diagram for agxVehicle::TrackCurveEvent:Classes | |
| struct | Type |
| Event type with flags. More... | |
Public Types | |
| using | Obs = agx::observer_ptr< TrackCurveEvent > |
| using | Ref = agx::ref_ptr< TrackCurveEvent > |
Public Member Functions | |
| TrackCurveEvent (const WheelTangentData &entry, size_t wheelIndex, Type type) | |
| Construct given entry tangent, wheel index and type. | |
| template<typename Pred > | |
| TrackCurveEvent * | forwardTo (Pred &&pred) const |
Searches forward until pred returns true. | |
| agx::Real | getConvexProduct () const |
| Indication how "convex" this event is in relation to next. | |
| agx::RigidBody * | getSourceRigidBody () const |
| If isIntermediate() == true, this is the source rigid body of this point, if the supported. | |
| bool | isIntermediate () const |
| bool | isIntermediateContact () const |
| bool | isIntermediateOther () const |
| bool | isIntermediateSensor () const |
| bool | isOnRoute () const |
| bool | isWheel () const |
| template<typename Pred > | |
| TrackCurveEvent * | reverseTo (Pred &&pred) const |
Searches back/in reverse until pred returns true. | |
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. | |
Static Public Member Functions | |
| static Ref | create (const WheelTangentData &entry, size_t wheelIndex, Type type) |
| Create given entry tangent, wheel index and type. | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Public Attributes | |
| WheelTangentData | entry |
Entry tangent to this event, i.e., entry.end defines the start of type. | |
| Ref | next |
| Point to the event after this, nullptr if this is the end event. | |
| Obs | prev |
| Pointer to the event before this, nullptr if this is the first event. | |
| Type | type |
| Type describing this event. | |
| size_t | wheelIndex = agx::InvalidIndex |
| Wheel index, the "source" of this event - has to be valid. | |
Protected Member Functions | |
| virtual | ~TrackCurveEvent ()=default |
| Create and destroy instances using the TrackCurveList API. | |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
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 |
Track curve event with a type, an entry tangent (i.e., tangent to this event), wheel index, etc.
Definition at line 35 of file TrackCurveEvent.h.
Definition at line 111 of file TrackCurveEvent.h.
Definition at line 110 of file TrackCurveEvent.h.
| agxVehicle::TrackCurveEvent::TrackCurveEvent | ( | const WheelTangentData & | entry, |
| size_t | wheelIndex, | ||
| Type | type | ||
| ) |
Construct given entry tangent, wheel index and type.
| entry | - entry tangent to this event |
| wheelIndex | - wheel index of this event |
| type | - type of event |
|
protectedvirtualdefault |
Create and destroy instances using the TrackCurveList API.
|
static |
Create given entry tangent, wheel index and type.
| entry | - entry tangent to the new event |
| wheelIndex | - wheel index, independent of type (e.g., INTERMEDIATE also has an index) |
| type | - type of event |
| TrackCurveEvent * agxVehicle::TrackCurveEvent::forwardTo | ( | Pred && | pred | ) | const |
Searches forward until pred returns true.
| pred | - predicate bool( const TrackCurveEvent& ) |
pred returned true, or nullptr if not found Definition at line 249 of file TrackCurveEvent.h.
References next.
|
inline |
Indication how "convex" this event is in relation to next.
If the return value is negative means that this event is locally convex, e.g., wrapping a wheel. Note that it's not valid to do this for the last event.
Definition at line 238 of file TrackCurveEvent.h.
References agxVehicle::WheelTangentData::convexity(), entry, and next.
|
inline |
If isIntermediate() == true, this is the source rigid body of this point, if the supported.
Definition at line 243 of file TrackCurveEvent.h.
References agxVehicle::TrackCurveEvent::Type::source, and type.
|
inline |
Definition at line 211 of file TrackCurveEvent.h.
References isIntermediateContact(), isIntermediateOther(), and isIntermediateSensor().
|
inline |
Definition at line 223 of file TrackCurveEvent.h.
References agxVehicle::TrackCurveEvent::Type::INTERMEDIATE_CONTACT, agxVehicle::TrackCurveEvent::Type::is(), and type.
Referenced by isIntermediate().
|
inline |
Definition at line 228 of file TrackCurveEvent.h.
References agxVehicle::TrackCurveEvent::Type::INTERMEDIATE_OTHER, agxVehicle::TrackCurveEvent::Type::is(), and type.
Referenced by isIntermediate().
|
inline |
Definition at line 218 of file TrackCurveEvent.h.
References agxVehicle::TrackCurveEvent::Type::INTERMEDIATE_SENSOR, agxVehicle::TrackCurveEvent::Type::is(), and type.
Referenced by isIntermediate().
|
inline |
Definition at line 233 of file TrackCurveEvent.h.
References agxVehicle::TrackCurveEvent::Type::is(), agxVehicle::TrackCurveEvent::Type::ON_ROUTE, and type.
|
inline |
Definition at line 206 of file TrackCurveEvent.h.
References agxVehicle::TrackCurveEvent::Type::is(), type, and agxVehicle::TrackCurveEvent::Type::WHEEL.
| TrackCurveEvent * agxVehicle::TrackCurveEvent::reverseTo | ( | Pred && | pred | ) | const |
Searches back/in reverse until pred returns true.
| pred | - predicate bool( const TrackCurveEvent& ) |
pred returned true, or nullptr if not found Definition at line 258 of file TrackCurveEvent.h.
References prev.
| WheelTangentData agxVehicle::TrackCurveEvent::entry |
Entry tangent to this event, i.e., entry.end defines the start of type.
Definition at line 191 of file TrackCurveEvent.h.
Referenced by getConvexProduct().
| Ref agxVehicle::TrackCurveEvent::next |
Point to the event after this, nullptr if this is the end event.
Note that next is not nullptr for the last event, last.next->next is nullptr and last.next->wheelIndex == invalid.
Definition at line 196 of file TrackCurveEvent.h.
Referenced by forwardTo(), and getConvexProduct().
| Obs agxVehicle::TrackCurveEvent::prev |
Pointer to the event before this, nullptr if this is the first event.
Definition at line 195 of file TrackCurveEvent.h.
Referenced by agxVehicle::TrackCurveEventList::last(), and reverseTo().
| Type agxVehicle::TrackCurveEvent::type |
Type describing this event.
Definition at line 193 of file TrackCurveEvent.h.
Referenced by getSourceRigidBody(), isIntermediateContact(), isIntermediateOther(), isIntermediateSensor(), isOnRoute(), and isWheel().
| size_t agxVehicle::TrackCurveEvent::wheelIndex = agx::InvalidIndex |
Wheel index, the "source" of this event - has to be valid.
Definition at line 192 of file TrackCurveEvent.h.