AGXDynamics  2.35.0.2
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 
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 }
agx::Real
double Real
Definition: Real.h:42
agxSDK::LinkedSegmentContainer
agx::Vector< agxSDK::LinkedSegmentRef > LinkedSegmentContainer
Definition: LinkedSegment.h:29
agx::Vector< WheelInteraction >
agxVehicle::TrackRoute
Track route object to initialize tracks.
Definition: TrackRoute.h:33
agxStream::Serializable
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
agxUtil::PointCurve::SegmentationResult
Result data of segmentation, PointCurve::findSegmentLength.
Definition: PointCurve.h:81
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
agxVehicle::TrackNode
Node/segment/shoe object in agxVehicle::Track.
Definition: TrackNode.h:46
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
agxVehicle::TrackRoute::SegmentationResult::tolerance
agx::Real tolerance
Definition: TrackRoute.h:65
agxVehicle::Track
Assembly object representing a continuous track with a given number of shoes (nodes).
Definition: agxVehicle/Track.h:36
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
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition: AddedMassInteraction.h:22
agxVehicle::TrackRoute::WheelInteraction
Wheel <-> node interactions after initialize.
Definition: TrackRoute.h:39
agxUtil::ConvexHull2D::Curve
PointCurve< Point > Curve
Definition: ConvexHull2D.h:46
agx::ref_ptr< TrackRoute >
TrackNode.h
agx::Infinity
const AGXCORE_EXPORT Real Infinity
ConvexHull2D.h
agxVehicle::TrackRoute::WheelInteraction::wheel
TrackWheel * wheel
Definition: TrackRoute.h:41
agx::Vec3
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Definition: Vec3.h:36
agxVehicle::TrackRoute::SegmentationResult::successful
agx::Bool successful
Definition: TrackRoute.h:63
agxVehicle
This namespace contains classes related to vehicles dynamics.
Definition: AckermannSteering.h:22
agxVehicle::TrackRoute::SegmentationResult
Resulting curve and resolution.
Definition: TrackRoute.h:52
agxUtil::PointCurve
Utility class curve defined by a set of points.
Definition: PointCurve.h:41
agx::Referenced
Base class providing referencing counted objects.
Definition: Referenced.h:113
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
agx::UInt
uint32_t UInt
Definition: Integer.h:34
agxVehicle::TrackRoute::SegmentationResult::solution
Curve::SegmentationResult solution
Definition: TrackRoute.h:62
agx::Bool
bool Bool
Definition: Integer.h:48
agxVehicle::TrackWheel
Wheel used in tracked vehicles.
Definition: TrackWheel.h:31
agxVehicle::TrackRoute::WheelInteraction::node
TrackNode * node
Definition: TrackRoute.h:42
agxVehicle::TrackRoute::SegmentationResult::curve
Curve curve
Definition: TrackRoute.h:61
agxSDK
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30
AGXVEHICLE_EXPORT
#define AGXVEHICLE_EXPORT
Definition: agxVehicle/export.h:38
agxUtil::PointCurve::SegmentPoint
Segment point with current curve segment and a point on that segment with local and global time.
Definition: PointCurve.h:62
agxVehicle::TrackRoute::SegmentationResult::error
agx::Real error
Definition: TrackRoute.h:64
agxVehicle::TrackRoute::SegmentationResult::SegmentationResult
SegmentationResult(agx::UInt numberOfSegments)
Definition: TrackRoute.h:54