AGX Dynamics  2.35.0.1
agxModel::OneBodyTire Class Reference

#include <OneBodyTire.h>

+ Inheritance diagram for agxModel::OneBodyTire:

Classes

class  ContactInfo
 
class  TireConstraintController
 Class holding the constraints between ONE tire and an arbitrary number of other bodies. More...
 

Public Types

typedef agx::Vector< ContactInfo > ContactInfoVector
 
- Public Types inherited from agxSDK::Assembly
enum  Type { ASSEMBLY , COLLECTION }
 Specifies the type an assembly is. More...
 

Public Member Functions

 OneBodyTire (agx::RigidBody *rigidBody, agx::Real radius, agx::Frame *referenceFrame=nullptr)
 Construct tire given rigid body (with wheel geometry/geometries) and radius. More...
 
const char * getClassName () const override
 
const ContactInfoVector & getContacts ()
 
agx::RigidBody * getRigidBody ()
 
const agx::RigidBody * getRigidBody () const
 
agxStream::StorageAgent * getStorageAgent () const override
 
virtual void restore (agxStream::InputArchive &in) override
 
virtual void store (agxStream::OutputArchive &out) const override
 
- Public Member Functions inherited from agxModel::Tire
virtual agx::Real getLoadedRadius () const
 Gets the current loaded radius. More...
 
agx::Real getRadius () const
 Gets radius. More...
 
- Public Member Functions inherited from agxSDK::Assembly
 Assembly ()
 Default constructor. More...
 
bool add (agx::Constraint *constraint)
 Add a constraint to the assembly. More...
 
bool add (agx::ContactMaterial *contactMaterial)
 Add a contact material to this assembly. More...
 
bool add (agx::Emitter *emitter)
 Add an emitter to this assembly. More...
 
bool add (agx::Interaction *interaction)
 Add an interaction to this assembly. More...
 
bool add (agx::MergedBody *mergedBody)
 Add a MergedBody to this assembly. More...
 
bool add (agx::ObserverFrame *observerFrame)
 Add an ObserverFrame to this assembly. More...
 
bool add (agx::RigidBody *body)
 Add a rigid body to the assembly. More...
 
bool add (agxCollide::Geometry *geometry)
 Add a geometry to the assembly. More...
 
bool add (agxSDK::EventListener *listener)
 Add a listener to the assembly. More...
 
bool add (agxStream::Serializable *object)
 Add an object of type serialized. More...
 
bool add (Assembly *assembly)
 Add another assembly as child to this assembly. More...
 
virtual void addNotification (Assembly *)
 Called when this assembly is added to another assembly. More...
 
const AssemblyRefSetVector & getAssemblies () const
 
agxSDK::Assembly * getAssembly (const agx::Name &name, bool recursive=true)
 Find (linear search) and return named Assembly. More...
 
const agxSDK::Assembly * getAssembly (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return named Assembly. More...
 
agxSDK::Assembly * getAssembly (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return an Assembly matching the given uuid. More...
 
const agxSDK::Assembly * getAssembly (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return an Assembly matching the given uuid. More...
 
const char * getClassName () const override
 
agx::Constraint * getConstraint (const agx::Name &name, bool recursive=true)
 Find (linear search) and return named Constraint. More...
 
template<typename T >
T * getConstraint (const agx::Name &name, bool recursive=true)
 Find and return named Constraint of a template type, for example Hinge: More...
 
const agx::Constraint * getConstraint (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return named Constraint. More...
 
template<typename T >
const T * getConstraint (const agx::Name &name, bool recursive=true) const
 Find and return named Constraint of a template type, for example Hinge: More...
 
agx::Constraint * getConstraint (const agx::Uuid &uuid, bool recursive=true)
 Find and return a pointer to a Constraint with the given uuid. More...
 
const agx::Constraint * getConstraint (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return a pointer to a Constraint with the given uuid. More...
 
agx::Constraint1DOF * getConstraint1DOF (const agx::Name &name, bool recursive=true)
 
agx::Constraint2DOF * getConstraint2DOF (const agx::Name &name, bool recursive=true)
 
const agx::ConstraintRefSetVector & getConstraints () const
 
const agx::EmitterRefSetVector & getEmitters () const
 
const EventListenerRefSetVector & getEventListeners () const
 
virtual agx::Frame * getFrame ()
 Return a reference to the frame containing transformation and velocity information for this assembly. More...
 
virtual const agx::Frame * getFrame () const
 
const agxCollide::GeometryRefSetVector & getGeometries () const
 
agxCollide::Geometry * getGeometry (const agx::Name &name, bool recursive=true)
 Find (linear search) and return named collision Geometry. More...
 
const agxCollide::Geometry * getGeometry (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return named collision Geometry. More...
 
agxCollide::Geometry * getGeometry (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return a Geometry matching the given uuid. More...
 
const agxCollide::Geometry * getGeometry (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return a Geometry matching the given uuid. More...
 
const agx::InteractionRefSetVector & getInteractions () const
 
agx::Vec3 getLocalPosition () const
 
agx::Quat getLocalRotation () const
 
const agx::AffineMatrix4x4 & getLocalTransform () const
 
const agx::MergedBodyRefSetVector & getMergedBodies () const
 
agx::MergedBody * getMergedBody (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return an MergedBody matching the given uuid. More...
 
const agx::MergedBody * getMergedBody (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return an MergedBody matching the given uuid. More...
 
agx::Name getName () const
 
agx::ObserverFrame * getObserverFrame (const agx::Name &name, bool recursive=true)
 Find (linear search) and return an ObserverFrame matching the given uuid. More...
 
const agx::ObserverFrame * getObserverFrame (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return an ObserverFrame matching the given uuid. More...
 
agx::ObserverFrame * getObserverFrame (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return an ObserverFrame matching the given uuid. More...
 
const agx::ObserverFrame * getObserverFrame (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return an ObserverFrame matching the given uuid. More...
 
const agx::ObserverFrameRefSetVector & getObserverFrames () const
 
Assembly * getParent ()
 
const Assembly * getParent () const
 
agx::Frame * getParentFrame ()
 
const agx::Frame * getParentFrame () const
 
const agx::ParticleSystemRefSetVector & getParticleSystems () const
 
const agx::RigidBodyRefSetVector & getRigidBodies () const
 
agx::RigidBody * getRigidBody (const agx::Name &name, bool recursive=true)
 Find (linear search) and return named RigidBody. More...
 
const agx::RigidBody * getRigidBody (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return named RigidBody. More...
 
agx::RigidBody * getRigidBody (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return a pointer to a RigidBody with the given uuid. More...
 
const agx::RigidBody * getRigidBody (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return a pointer to a RigidBody with the given uuid. More...
 
agxSDK::Simulation * getSimulation ()
 
const agxSDK::Simulation * getSimulation () const
 
agxStream::StorageAgent * getStorageAgent () const override
 
Type getType () const
 
bool remove (agx::Constraint *constraint)
 Remove a constraint from this assembly (does not recurse down in tree). More...
 
bool remove (agx::ContactMaterial *contactMaterial)
 Remove a contact material from this assembly. More...
 
bool remove (agx::Emitter *emitter)
 Remove an emitter from this assembly. More...
 
bool remove (agx::Interaction *interaction)
 Remove an interaction from this assembly. More...
 
bool remove (agx::MergedBody *mergedBody)
 Remove a MergedBody from this assembly. More...
 
bool remove (agx::ObserverFrame *observerFrame)
 Remove an ObserverFrame from this assembly. More...
 
bool remove (agx::RigidBody *body, bool removeAssociatedGeometries=false)
 Remove a rigid body from this assembly (does not recurse down in tree). More...
 
bool remove (agxCollide::Geometry *geometry)
 Remove a geometry from this assembly (does not recurse down in tree). More...
 
bool remove (Assembly *assembly)
 Remove a child assembly from a parent. More...
 
bool remove (EventListener *listener)
 Remove an EventListener from the assembly. More...
 
virtual void removeNotification (Assembly *)
 Called when this assembly is removed from another assembly. More...
 
virtual void setAngularVelocity (const agx::Vec3 &velocity)
 Set the angular velocity (in world frame) recursively for all rigid bodies stored in assembly. More...
 
void setLocalPosition (agx::Real x, agx::Real y, agx::Real z)
 Set the position of the assembly relative to its frame's parent frame. More...
 
void setLocalPosition (const agx::Vec3 &p)
 Set the position of the assembly relative to its frame's parent frame. More...
 
void setLocalRotation (const agx::EulerAngles &e)
 Set the rotation of the assembly relative to its frame's parent frame. More...
 
void setLocalRotation (const agx::Quat &q)
 Set the rotation of the assembly relative to its frame's parent frame. More...
 
void setLocalTransform (const agx::AffineMatrix4x4 &matrix)
 Assign the local transformation matrix for this assembly, ignoring any eventual parent transformation. More...
 
void setName (const agx::Name &name)
 Set the name of this Assembly. More...
 
bool setParentFrame (agx::Frame *frame)
 Set the parent frame of this assembly's frame. More...
 
void setPosition (agx::Real x, agx::Real y, agx::Real z)
 Set the position of the frame in world coordinates. More...
 
void setPosition (const agx::Vec3 &p)
 Set the position of the frame in world coordinates. More...
 
void setRotation (const agx::EulerAngles &e)
 Set the rotation of the assembly relative to world frame. More...
 
void setRotation (const agx::OrthoMatrix3x3 &m)
 Set the rotation of the assembly relative to world frame. More...
 
void setRotation (const agx::Quat &q)
 Set the rotation of the assembly relative to world frame. More...
 
void setTransform (const agx::AffineMatrix4x4 &matrix)
 Set the transform of the assembly. More...
 
virtual void setVelocity (const agx::Vec3 &velocity)
 Set the linear velocity (in world frame) recursively for all rigid bodies stored in assembly. More...
 
virtual void traverse (AssemblyVisitor *visitor)
 Traverse the assembly tree recursively using a visitor. More...
 
virtual void traverse (const AssemblyVisitor *visitor) const
 
- 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...
 

Static Public Member Functions

static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agxSDK::Assembly
static Assembly * asAssembly (agxStream::Serializable *obj)
 
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...
 

Protected Types

typedef agx::ref_ptr< TireConstraintController > TireConstraintControllerRef
 

Protected Member Functions

 OneBodyTire ()
 
virtual ~OneBodyTire ()
 
virtual void addNotification (agxSDK::Simulation *simulation) override
 Called when this assembly is added to a simulation (given that it not already is in the simulation). More...
 
virtual agxSDK::ContactEventListener::KeepContactPolicy contact (const agx::TimeStamp &, agxCollide::GeometryContact *gc)
 
virtual agxSDK::ContactEventListener::KeepContactPolicy handleContact (agxCollide::GeometryContact *gc)
 
virtual agxSDK::ContactEventListener::KeepContactPolicy impact (const agx::TimeStamp &, agxCollide::GeometryContact *gc)
 
virtual void post (const agx::TimeStamp &)
 
virtual void pre (const agx::TimeStamp &)
 
virtual void preCollide (const agx::TimeStamp &)
 
virtual void removeNotification (agxSDK::Simulation *simulation) override
 Called when this assembly is removed from a simulation. More...
 
virtual void separation (const agx::TimeStamp &, agxCollide::GeometryPair &)
 
- Protected Member Functions inherited from agxModel::Tire
 Tire ()
 
virtual ~Tire ()
 
- Protected Member Functions inherited from agxSDK::Assembly
 Assembly (Type type)
 
virtual ~Assembly ()
 Destructor. More...
 
bool addParticleSystem (agx::ParticleSystem *particleSystem)
 Add a particle system to this assembly. More...
 
void addToSimulation (Simulation *simulation)
 
void removeFromSimulation (Simulation *simulation)
 
bool removeParticleSystem (agx::ParticleSystem *particleSystem)
 Remove a particle system from this assembly. 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 ()
 

Protected Attributes

TireConstraintControllerRef m_constraintController
 
agx::ref_ptr< agxUtil::GeneralContactEventListener< OneBodyTire > > m_contactCallback
 
agx::Vector< ContactInfo > m_contacts
 
agx::Real m_radius
 
agx::FrameRef m_refFrame
 
agx::RigidBodyRef m_rigidBody
 
agx::ref_ptr< agxUtil::GeneralStepListener< OneBodyTire > > m_stepCallback
 
- Protected Attributes inherited from agxModel::Tire
agx::Real m_radius
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

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. More...
 

Detailed Description

Note
: This is an experimental feature, not fully tested yet.

A simple tire model with one rigid body. Contacts are reduced to only support the deepest one. To model any deformation/elastic behavior, the contact material has to be adapted. Friction directions follow the tire frame (and can be set differently via the contact material).

Definition at line 43 of file OneBodyTire.h.

Member Typedef Documentation

◆ ContactInfoVector

◆ TireConstraintControllerRef

Constructor & Destructor Documentation

◆ OneBodyTire() [1/2]

agxModel::OneBodyTire::OneBodyTire ( agx::RigidBody *  rigidBody,
agx::Real  radius,
agx::Frame *  referenceFrame = nullptr 
)

Construct tire given rigid body (with wheel geometry/geometries) and radius.

By definition tire axis is assumed to be y direction in body coordinates. This is also the secondary friction direction.

Parameters
rigidBody- rigid body of this tire (including geometries)
radius- radius of this tire
referenceFrame- reference frame for friction directions. If none given, the rigidBody's will be used.

◆ OneBodyTire() [2/2]

agxModel::OneBodyTire::OneBodyTire ( )
protected

◆ ~OneBodyTire()

virtual agxModel::OneBodyTire::~OneBodyTire ( )
protectedvirtual

Member Function Documentation

◆ addNotification()

virtual void agxModel::OneBodyTire::addNotification ( agxSDK::Simulation *  )
overrideprotectedvirtual

Called when this assembly is added to a simulation (given that it not already is in the simulation).

Reimplemented from agxSDK::Assembly.

◆ contact()

virtual agxSDK::ContactEventListener::KeepContactPolicy agxModel::OneBodyTire::contact ( const agx::TimeStamp &  ,
agxCollide::GeometryContact *  gc 
)
inlineprotectedvirtual

Definition at line 139 of file OneBodyTire.h.

◆ create() [1/2]

static agxStream::Serializable* agxModel::OneBodyTire::create ( )
inlinestatic

Definition at line 123 of file OneBodyTire.h.

◆ create() [2/2]

static agxStream::Serializable* agxModel::OneBodyTire::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 123 of file OneBodyTire.h.

◆ getClassName()

const char* agxModel::OneBodyTire::getClassName ( ) const
inlineoverridevirtual
Returns
the class name of this class.

Reimplemented from agxStream::Serializable.

Definition at line 123 of file OneBodyTire.h.

◆ getConstructClassId()

static const char* agxModel::OneBodyTire::getConstructClassId ( )
inlinestatic

Definition at line 123 of file OneBodyTire.h.

◆ getContacts()

const ContactInfoVector& agxModel::OneBodyTire::getContacts ( )

◆ getRigidBody() [1/2]

agx::RigidBody* agxModel::OneBodyTire::getRigidBody ( )
Returns
the rigid body of this tire

◆ getRigidBody() [2/2]

const agx::RigidBody* agxModel::OneBodyTire::getRigidBody ( ) const
Returns
the rigid body of this tire

◆ getStorageAgent()

agxStream::StorageAgent* agxModel::OneBodyTire::getStorageAgent ( ) const
inlineoverridevirtual
Returns
the storage agent

Implements agxStream::Serializable.

Definition at line 123 of file OneBodyTire.h.

◆ handleContact()

virtual agxSDK::ContactEventListener::KeepContactPolicy agxModel::OneBodyTire::handleContact ( agxCollide::GeometryContact *  gc)
protectedvirtual

◆ impact()

virtual agxSDK::ContactEventListener::KeepContactPolicy agxModel::OneBodyTire::impact ( const agx::TimeStamp &  ,
agxCollide::GeometryContact *  gc 
)
inlineprotectedvirtual

Definition at line 138 of file OneBodyTire.h.

◆ post()

virtual void agxModel::OneBodyTire::post ( const agx::TimeStamp &  )
protectedvirtual

◆ pre()

virtual void agxModel::OneBodyTire::pre ( const agx::TimeStamp &  )
protectedvirtual

◆ preCollide()

virtual void agxModel::OneBodyTire::preCollide ( const agx::TimeStamp &  )
protectedvirtual

◆ removeNotification()

virtual void agxModel::OneBodyTire::removeNotification ( agxSDK::Simulation *  )
overrideprotectedvirtual

Called when this assembly is removed from a simulation.

Reimplemented from agxSDK::Assembly.

◆ restore()

virtual void agxModel::OneBodyTire::restore ( agxStream::InputArchive &  in)
overridevirtual

Reimplemented from agxSDK::Assembly.

◆ separation()

virtual void agxModel::OneBodyTire::separation ( const agx::TimeStamp &  ,
agxCollide::GeometryPair &   
)
inlineprotectedvirtual

Definition at line 140 of file OneBodyTire.h.

◆ store()

virtual void agxModel::OneBodyTire::store ( agxStream::OutputArchive &  out) const
overridevirtual

Reimplemented from agxSDK::Assembly.

Member Data Documentation

◆ m_constraintController

TireConstraintControllerRef agxModel::OneBodyTire::m_constraintController
protected

Definition at line 150 of file OneBodyTire.h.

◆ m_contactCallback

agx::ref_ptr< agxUtil::GeneralContactEventListener< OneBodyTire > > agxModel::OneBodyTire::m_contactCallback
protected

Definition at line 145 of file OneBodyTire.h.

◆ m_contacts

agx::Vector<ContactInfo> agxModel::OneBodyTire::m_contacts
protected

Definition at line 151 of file OneBodyTire.h.

◆ m_radius

agx::Real agxModel::OneBodyTire::m_radius
protected

Definition at line 148 of file OneBodyTire.h.

◆ m_refFrame

agx::FrameRef agxModel::OneBodyTire::m_refFrame
protected

Definition at line 149 of file OneBodyTire.h.

◆ m_rigidBody

agx::RigidBodyRef agxModel::OneBodyTire::m_rigidBody
protected

Definition at line 147 of file OneBodyTire.h.

◆ m_stepCallback

agx::ref_ptr< agxUtil::GeneralStepListener< OneBodyTire > > agxModel::OneBodyTire::m_stepCallback
protected

Definition at line 144 of file OneBodyTire.h.


The documentation for this class was generated from the following file: