AGX Dynamics  2.37.3.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
agx::HingeRef m_outerHinge
Utility class to get step event callbacks to any class having the methods implemented.
Definition: agxUtil.h:524
agx::SymmetricPair< agx::Physics::GeometryPtr > GeometryPair
Definition: Geometry.h:66
virtual void removeNotification(agxSDK::Simulation *)
Called when this assembly is removed from a simulation.
Definition: Assembly.h:621
A contact between two geometries.
Definition: Contacts.h:270
agxCollide::GeometryContact *virtual void separation(const agx::TimeStamp &t, agxCollide::GeometryPair &gp)
Called upon separation event if getFilter() contain SEPARATION.
Definition: agxUtil.h:595
virtual void removeNotification()
Called when this listener is removed from the simulation.
Definition: EventListener.h:91
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
virtual void addNotification()
Called when this listener is added to the simulation.
Definition: EventListener.h:86
agx::Real TimeStamp
Definition: TimeStamp.h:26
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: FlowUnit.h:36
virtual KeepContactPolicy impact(const agx::TimeStamp &time, agxCollide::GeometryContact *geometryContact)
Called upon impact event if getFilter() contain IMPACT.
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
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...
KeepContactPolicy
Defines whether contact should be kept or removed after contact/impact methods returns.
The hinge constraint between two rigid bodies or one rigid body and the world.
Definition: Hinge.h:103
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:54
agx::RigidBodyObserver m_tireVisualBody
#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
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:616
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
#define AGXMODEL_EXPORT
double Real
Definition: Real.h:42
virtual KeepContactPolicy contact(const agx::TimeStamp &time, agxCollide::GeometryContact *geometryContact)
Called upon contact event if getFilter() contain CONTACT.
Utility class to get contact event callbacks to any class having the methods implemented.
Definition: agxUtil.h:572