AGX Dynamics  2.35.0.1
TrackRoute.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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 
86 
91 
96 
101 
107 
112 
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:
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 }
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#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
#define AGXVEHICLE_EXPORT
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:45
PointCurve< Point > Curve
Definition: ConvexHull2D.h:46
Utility class curve defined by a set of points.
Definition: PointCurve.h:42
Node/segment/shoe object in agxVehicle::Track.
Definition: TrackNode.h:47
Track route object to initialize tracks.
Definition: TrackRoute.h:34
agx::Real getNodeLength() const
TrackRouteRef clone() const
agx::Real getNodeWidth() const
const WheelInteractionContainer & getWheelInteractions() const
agx::Real getInitialDistanceTension() const
agx::UInt getNumberOfNodes() const
TrackRoute(agx::UInt numberOfNodes, agx::Real width, agx::Real thickness, agx::Real initialDistanceTension=agx::Real(0))
Construct given number of nodes, size and initial tension distance.
agx::Real getNodeThickness() const
Wheel used in tracked vehicles.
Definition: TrackWheel.h:32
Assembly object representing a continuous track with a given number of shoes (nodes).
Base class providing referencing counted objects.
Definition: Referenced.h:114
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
agx::Vector< agxSDK::LinkedSegmentRef > LinkedSegmentContainer
Definition: LinkedSegment.h:29
This namespace contains classes related to vehicles dynamics.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Definition: agx/Vec3.h:36
bool Bool
Definition: Integer.h:48
uint32_t UInt
Definition: Integer.h:34
AGXCORE_EXPORT const Real Infinity
double Real
Definition: Real.h:42
Segment point with current curve segment and a point on that segment with local and global time.
Definition: PointCurve.h:63
Result data of segmentation, PointCurve::findSegmentLength.
Definition: PointCurve.h:82
Resulting curve and resolution.
Definition: TrackRoute.h:53
SegmentationResult(agx::UInt numberOfSegments)
Definition: TrackRoute.h:54
Curve::SegmentationResult solution
Definition: TrackRoute.h:62
Wheel <-> node interactions after initialize.
Definition: TrackRoute.h:40