AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TrackRoute.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2021. 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  const WheelInteractionContainer& getWheelInteractions() const;
112 
116  SegmentationResult solve( const Track& track,
117  agx::UInt numNodes,
118  agx::Real nodeThickness,
119  agx::Real perSegmentTolerance = agx::Real( 1.0E-6 ),
120  agx::Real curveSegmentationTolerance = agx::Real( 1.0E-6 ) ) const;
122 
123  public:
129  virtual const agxSDK::LinkedSegmentContainer& initialize( const Track& track );
130 
134  virtual void postInitialize();
135 
136  public:
138 
139  protected:
140  TrackRoute();
141  ~TrackRoute();
142 
143  private:
144  void add( TrackNodeRef node );
145 
146  private:
147  agx::UInt m_numberOfNodes;
148  agx::Vec3 m_nodeHalfExtents;
149  agx::Real m_initialDistanceTension;
150  agxSDK::LinkedSegmentContainer m_nodes;
151  WheelInteractionContainer m_wheelInteractions;
152  };
153 }
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:248
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:113
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
AGXLUA_EXPORT void error(lua_State *L)
Wheel &lt;-&gt; node interactions after initialize.
Definition: TrackRoute.h:39
Curve::SegmentationResult solution
Definition: TrackRoute.h:62
AGXCORE_EXPORT const Real Infinity
#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:206
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
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:101
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:100
Assembly object representing a continuous track with a given number of shoes (nodes).