AGX Dynamics  2.37.3.2
TrackRoute.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 #pragma once
18 
19 #include <agxVehicle/TrackNode.h>
20 
21 #include <agxUtil/ConvexHull2D.h>
22 
23 namespace agxVehicle
24 {
25  class Track;
26  class TrackWheel;
27 
29 
34  {
35  public:
40  {
43  };
45 
48 
53  {
54  SegmentationResult( agx::UInt numberOfSegments )
55  : curve(), solution( numberOfSegments ),
56  successful( false ), error( agx::Infinity ),
57  tolerance( agx::Real( 0 ) )
58  {
59  }
60 
66  };
67 
68  public:
80  TrackRoute( agx::UInt numberOfNodes, agx::Real width, agx::Real thickness, agx::Real initialDistanceTension = agx::Real( 0 ) );
81 
85  TrackRouteRef clone() const;
86 
90  agx::UInt getNumberOfNodes() const;
91 
95  agx::Real getNodeWidth() const;
96 
100  agx::Real getNodeThickness() const;
101 
106  agx::Real getNodeLength() const;
107 
111  agx::Real getInitialDistanceTension() const;
112 
116  const WheelInteractionContainer& getWheelInteractions() const;
117 
121  SegmentationResult solve( const Track& track,
122  agx::UInt numNodes,
123  agx::Real nodeThickness,
124  agx::Real perSegmentTolerance = agx::Real( 1.0E-6 ),
125  agx::Real curveSegmentationTolerance = agx::Real( 1.0E-6 ) ) const;
127 
128  public:
134  virtual const agxSDK::LinkedSegmentContainer& initialize( const Track& track );
135 
139  virtual void postInitialize();
140 
141  public:
143 
144  protected:
145  TrackRoute();
146  ~TrackRoute();
147 
148  private:
149  void add( TrackNodeRef node );
150 
151  private:
152  agx::UInt m_numberOfNodes;
153  agx::Vec3 m_nodeHalfExtents;
154  agx::Real m_initialDistanceTension;
156  WheelInteractionContainer m_wheelInteractions;
157  };
158 }
Segment point with current curve segment and a point on that segment with local and global time...
Definition: PointCurve.h:62
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Definition: Vec3.h:36
#define AGXVEHICLE_EXPORT
Wheel used in tracked vehicles.
Definition: TrackWheel.h:31
Track route object to initialize tracks.
Definition: TrackRoute.h:33
bool Bool
Definition: Integer.h:48
Result data of segmentation, PointCurve::findSegmentLength.
Definition: PointCurve.h:81
Node/segment/shoe object in agxVehicle::Track.
Definition: TrackNode.h:46
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
Resulting curve and resolution.
Definition: TrackRoute.h:52
agx::Vector< agxSDK::LinkedSegmentRef > LinkedSegmentContainer
Definition: LinkedSegment.h:29
Base class providing referencing counted objects.
Definition: Referenced.h:119
Utility class curve defined by a set of points.
Definition: PointCurve.h:41
uint32_t UInt
Definition: Integer.h:34
PointCurve< Point > Curve
Definition: ConvexHull2D.h:46
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Wheel <-> node interactions after initialize.
Definition: TrackRoute.h:39
Curve::SegmentationResult solution
Definition: TrackRoute.h:62
AGXCORE_EXPORT const Real Infinity
This namespace contains classes related to vehicles dynamics.
#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
SegmentationResult(agx::UInt numberOfSegments)
Definition: TrackRoute.h:54
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
double Real
Definition: Real.h:42
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97
Assembly object representing a continuous track with a given number of shoes (nodes).