AGX Dynamics  2.37.3.2
TrackInternalMergeProperties.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/export.h>
20 
21 #include <agx/BitState.h>
22 
23 namespace agxVehicle
24 {
29  {
30  public:
36  {
37  NONE,
40  AGGRESSIVE
41  };
42 
43  public:
55 
60  void setEnableMerge( agx::Bool enable );
61 
65  agx::Bool getEnableMerge() const;
66 
71  void setNumNodesPerMergeSegment( agx::UInt numNodesPerMergeSegment );
72 
76  agx::UInt getNumNodesPerMergeSegment() const;
77 
82  void setContactReduction( ContactReduction contactReductionLevel );
83 
87  ContactReduction getContactReduction() const;
88 
92  agx::Bool getEnableContactReduction() const;
93 
97  agx::UInt getContactReductionBinResolution() const;
98 
103  void setEnableLockToReachMergeCondition( agx::Bool enable );
104 
108  agx::Bool getEnableLockToReachMergeCondition() const;
109 
114  void setLockToReachMergeConditionCompliance( agx::Real compliance );
115 
119  agx::Real getLockToReachMergeConditionCompliance() const;
120 
125  void setLockToReachMergeConditionDamping( agx::Real damping );
126 
130  agx::Real getLockToReachMergeConditionDamping() const;
131 
137  void setMaxAngleMergeCondition( agx::Real maxAngleToMerge );
138 
142  agx::Real getMaxAngleMergeCondition() const;
143 
147  void resetToDefault();
148 
149  public:
154  void store( agxStream::OutputArchive& out ) const;
155 
159  void restore( agxStream::InputArchive& in );
160 
166  agx::Bool getAndResetSplitRelatedDataDirtyFlag();
168 
169  private:
170  enum StateEnum : agx::UInt32
171  {
172  MERGE_ENABLE = 1 << 0,
173  CONTACT_REDUCTION_LEVEL_AGGRESSIVE = 1 << 1,
174  CONTACT_REDUCTION_LEVEL_MODERATE = 1 << 2,
175  CONTACT_REDICTION_LEVEL_MINIMAL = 1 << 3,
176  LOCK_TO_REACH_MERGE_CONDITION = 1 << 4,
177  SPLIT_RELATED_DATA_DIRTY = 1 << 5
178  };
179  using State = agx::BitState<StateEnum, agx::UInt32>;
180 
181  private:
182  State m_state;
183  agx::UInt m_numNodesPerMergeSegment;
184  agx::Real m_lockToReachMergeConditionCompliance;
185  agx::Real m_lockToReachMergeConditionDamping;
186  agx::Real m_maxAngleMergeCondition;
187  };
188 }
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
Definition: InputArchive.h:400
#define AGXVEHICLE_EXPORT
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive...
bool Bool
Definition: Integer.h:48
Contact reduction enabled with bin resolution = 2.
uint32_t UInt
Definition: Integer.h:34
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Properties and thresholds for internal merging of nodes in agxVehicle::Track.
This namespace contains classes related to vehicles dynamics.
double Real
Definition: Real.h:42
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
Contact reduction enabled with bin resolution = 3.
uint32_t UInt32
Definition: Integer.h:40
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97
ContactReduction
Contact reduction of merged nodes in contact with other objects such as ground.