AGX Dynamics  2.38.0.2
ThreeBodyTire.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXMODEL_THREE_BODY_TIRE_H
18 #define AGXMODEL_THREE_BODY_TIRE_H
19 
20 
21 #include <agxModel/TwoBodyTire.h>
22 
23 namespace agxModel
24 {
25 
39  {
40  public:
55  ThreeBodyTire(agx::RigidBody* tireBodyCollision, agx::RigidBody* tireBodyVisual, agx::Real outerRadius,
56  agx::RigidBody* hubBody, agx::Real innerRadius,
57  const agx::AffineMatrix4x4& localTransform = agx::AffineMatrix4x4() );
58 
62  agx::RigidBody* getTireVisualRigidBody();
63 
67  const agx::RigidBody* getTireCollisionRigidBody() const;
68 
69 
78  agx::Hinge* getOuterHinge();
79 
87  virtual bool setStiffness(const agx::Real stiffness, DeformationMode mode) override;
88 
95  virtual agx::Real getStiffness(DeformationMode mode) override;
96 
104  virtual bool setDampingCoefficient(const agx::Real dampingCoefficient, DeformationMode mode) override;
105 
112  virtual agx::Real getDampingCoefficient(DeformationMode mode) override;
113 
114 
116 
117  protected:
118  ThreeBodyTire();
119 
120  virtual ~ThreeBodyTire();
121 
122  virtual bool isValid() const override;
123 
124  // Contact events.
126 
129 
132 
133  void separation(
135 
137  const agx::TimeStamp&,
139  bool impact);
140 
141  void reduceContacts(agxCollide::LocalGeometryContact& gc);
142 
143  // Step events.
145 
146  virtual void post( const agx::TimeStamp& ) override;
147 
148 
149  protected:
150 
151  // Adding to/removing from simulation.
152  virtual void addNotification(agxSDK::Simulation* simulation) override;
153 
155 
156  virtual void removeNotification(agxSDK::Simulation* simulation)override;
157 
159 
160  // More persistent variables, will be serialized.
163 
164  };
165 }
166 
167 #endif // AGXMODEL_THREE_BODY_TIRE_H
agxUtil::GeneralContactEventListener::separation
agxCollide::GeometryContact *virtual void separation(const agx::TimeStamp &t, agxCollide::GeometryPair &gp)
Called upon separation event if getFilter() contain SEPARATION.
Definition: agxUtil.h:595
agx::Real
double Real
Definition: Real.h:42
agxModel
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: FlowUnit.h:36
agxData::GeometryPair
agx::SymmetricPair< agx::Physics::GeometryPtr > GeometryPair
Definition: Geometry.h:65
agxUtil::GeneralStepListener
Utility class to get step event callbacks to any class having the methods implemented.
Definition: agxUtil.h:524
agxModel::ThreeBodyTire::m_outerHinge
agx::HingeRef m_outerHinge
Definition: ThreeBodyTire.h:162
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:51
TwoBodyTire.h
agxCollide::LocalGeometryContact
Definition: LocalContactPoint.h:209
agx::AffineMatrix4x4T< Real >
agxSDK::StepEventListener::post
virtual void post(const agx::TimeStamp &time)
Called after a step is taken in the simulation Implement this method in the derived class to get call...
Definition: StepEventListener.h:107
AGXSTREAM_DECLARE_SERIALIZABLE
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
agxUtil::GeneralContactEventListener
Utility class to get contact event callbacks to any class having the methods implemented.
Definition: agxUtil.h:572
agx::observer_ptr< RigidBody >
agxModel::ThreeBodyTire::m_tireVisualBody
agx::RigidBodyObserver m_tireVisualBody
Definition: ThreeBodyTire.h:161
agx::ref_ptr< Hinge >
agxSDK::Simulation
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:125
agxModel::TwoBodyTire::DeformationMode
DeformationMode
Definition: TwoBodyTire.h:168
agxSDK::ContactEventListener::KeepContactPolicy
KeepContactPolicy
Defines whether contact should be kept or removed after contact/impact methods returns.
Definition: ContactEventListener.h:59
agxModel::ThreeBodyTire
Definition: ThreeBodyTire.h:38
agxSDK::ContactEventListener::contact
virtual KeepContactPolicy contact(const agx::TimeStamp &time, agxCollide::GeometryContact *geometryContact)
Called upon contact event if getFilter() contain CONTACT.
Definition: ContactEventListener.h:147
agxSDK::EventListener::addNotification
virtual void addNotification()
Called when this listener is added to the simulation.
Definition: EventListener.h:86
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
agxSDK::ContactEventListener::impact
virtual KeepContactPolicy impact(const agx::TimeStamp &time, agxCollide::GeometryContact *geometryContact)
Called upon impact event if getFilter() contain IMPACT.
Definition: ContactEventListener.h:142
agxCollide::GeometryContact
A contact between two geometries.
Definition: Contacts.h:270
agx::TimeStamp
agx::Real TimeStamp
Definition: TimeStamp.h:26
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition: agxModel/export.h:42
agx::Hinge
The hinge constraint between two rigid bodies or one rigid body and the world.
Definition: Hinge.h:103
agxModel::TwoBodyTire
Definition: TwoBodyTire.h:147
agxSDK::Assembly::removeNotification
virtual void removeNotification(agxSDK::Simulation *)
Called when this assembly is removed from a simulation.
Definition: Assembly.h:657
agxSDK::EventListener::removeNotification
virtual void removeNotification()
Called when this listener is removed from the simulation.
Definition: EventListener.h:91
agxSDK::Assembly::addNotification
virtual void addNotification(agxSDK::Simulation *)
Called when this assembly is added to a simulation (given that it not already is in the simulation).
Definition: Assembly.h:652