AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
TrackInternalMergeProperties.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
19#include <agxVehicle/export.h>
20
21#include <agx/BitState.h>
22
23namespace agxVehicle
24{
29 {
30 public:
36 {
40 AGGRESSIVE
41 };
42
43 public:
55
60 void setEnableMerge( agx::Bool enable );
61
66
71 void setNumNodesPerMergeSegment( agx::UInt numNodesPerMergeSegment );
72
77
82 void setContactReduction( ContactReduction contactReductionLevel );
83
88
93
98
104
109
115
120
126
131
137 void setMaxAngleMergeCondition( agx::Real maxAngleToMerge );
138
143
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}
#define AGXVEHICLE_EXPORT
Properties and thresholds for internal merging of nodes in agxVehicle::Track.
void setNumNodesPerMergeSegment(agx::UInt numNodesPerMergeSegment)
Assign number of nodes in a row that may merge together.
void setMaxAngleMergeCondition(agx::Real maxAngleToMerge)
Assign maximum angle > 0 to trigger merge between nodes.
void setLockToReachMergeConditionCompliance(agx::Real compliance)
Assign compliance of the hinge lock used to reach merge condition.
void setEnableMerge(agx::Bool enable)
Enable/disable merge of nodes to segments in the track.
void resetToDefault()
Resets all values to default (see default constructor).
ContactReduction getContactReduction() const
agx::UInt getContactReductionBinResolution() const
ContactReduction
Contact reduction of merged nodes in contact with other objects such as ground.
@ MODERATE
Contact reduction enabled with bin resolution = 2.
@ MINIMAL
Contact reduction enabled with bin resolution = 3.
agx::Bool getEnableLockToReachMergeCondition() const
void setEnableLockToReachMergeCondition(agx::Bool enable)
Enable/disable the usage of hinge lock to reach merge condition (angle close to zero).
agx::Real getLockToReachMergeConditionDamping() const
void setContactReduction(ContactReduction contactReductionLevel)
Set contact reduction level of merged nodes against other objects.
void setLockToReachMergeConditionDamping(agx::Real damping)
Assign damping of the hinge lock used to reach merge condition.
agx::Real getLockToReachMergeConditionCompliance() const
TrackInternalMergeProperties()
Default constructor: merge enabled = false number of nodes per merge segment = 3 contact reduction = ...
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition macros.h:96
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
This namespace contains classes related to vehicles dynamics.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition Integer.h:40
uint64_t UInt
Definition Integer.h:27
double Real
Definition Real.h:42