AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
TrackProperties.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/Hinge.h>
22#include <agx/BitState.h>
24
25namespace agxVehicle
26{
28
33 {
34 public:
39
44 void setHingeCompliance( agx::Real compliance );
45
52
58
64
68 agx::Real getHingeCompliance( agx::Hinge::DOF dof ) const;
69
74 void setHingeDamping( agx::Real damping );
75
82
88
94
98 agx::Real getHingeDamping( agx::Hinge::DOF dof ) const;
99
106
110 agx::Bool getEnableHingeRange() const;
111
117 void setHingeRangeRange( agx::Real lowerAngle, agx::Real upperAngle );
118
122 agx::RangeReal getHingeRangeRange() const;
123
132
137
145
150
156
161
171
176
186
191
199
204
213
218
227
232
237
243
244 public:
246
247 protected:
249 {
250 ON_INITIALIZE_MERGE_NODES_TO_WHEELS = 1 << 0,
251 ON_INITIALIZE_TRANSFORM_NODES_TO_WHEELS = 1 << 1,
252 HINGE_RANGE_ENABLED = 1 << 2,
253 };
254 using Flags = agx::BitState<FlagsEnum, agx::UInt32>;
255
269
270 protected:
275
276 private:
277 Flags m_flags;
278 RealValues m_realValues;
279 agx::Real m_hingeCompliance[ 5 ];
280 agx::Real m_hingeDamping[ 5 ];
281 };
282
284 {
285 return m_hingeCompliance[ (agx::UInt)std::max<int>( dof, 0 ) ];
286 }
287
289 {
290 return m_hingeDamping[ (agx::UInt)std::max<int>( dof, 0 ) ];
291 }
292
294 {
295 return m_flags.Is( HINGE_RANGE_ENABLED );
296 }
297
299 {
300 return agx::RangeReal{ m_realValues[ HINGE_RANGE_LOWER ], m_realValues[ HINGE_RANGE_UPPER ] };
301 }
302}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXVEHICLE_EXPORT
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Object containing properties of an agxVehicle::Track.
agx::Real getHingeDamping(agx::Hinge::DOF dof) const
void updateComplianceDamping(agx::Hinge &hinge) const
Writes compliance and damping to the given hinge instance.
void setMinStabilizingHingeNormalForce(agx::Real minNormalForce)
Minimum value of the normal force (the hinge force along the track) used in "internal" friction calcu...
void setHingeCompliance(agx::Real compliance)
Assign compliance (for all hinge degrees of freedom) used in the hinges between track nodes.
void setEnableOnInitializeTransformNodesToWheels(agx::Bool enable)
True to position/transform the track nodes to the surface of the wheels after the track has been init...
agx::BitState< FlagsEnum, agx::UInt32 > Flags
void setHingeComplianceRotational(agx::Real compliance)
Assign compliance for the rotational degrees of freedom in the hinges between track nodes.
void setNumNodesIncludedInAverageDirection(agx::UInt numIncludedNodes)
Average direction of non-merged nodes entering or exiting a wheel is used as reference direction to s...
void setNodesToWheelsMergeThreshold(agx::Real mergeThreshold)
Threshold when to merge a node to a wheel.
void setHingeDamping(agx::Real damping)
Assign damping (for all hinge degrees of freedom) used in the hinges between track nodes.
void setHingeComplianceTranslational(agx::Real compliance)
Assign compliance for the translational degrees of freedom in the hinges between track nodes.
void setTransformNodesToWheelsOverlap(agx::Real overlap)
When the nodes are transformed to the wheels, this is the final target overlap.
TrackProperties()
Default constructor - all flags and values are set do default.
agx::Real getMinStabilizingHingeNormalForce() const
agx::Real getHingeCompliance(agx::Hinge::DOF dof) const
void setHingeDampingTranslational(agx::Real damping)
Assign damping for the translational degrees of freedom in the hinges between track nodes.
void setHingeDampingRotational(agx::Real damping)
Assign damping for the rotational degrees of freedom in the hinges between track nodes.
void setHingeCompliance(agx::Real compliance, agx::Hinge::DOF dof)
Assign compliance for a given degree of freedom in the hinges between track nodes.
void setStabilizingHingeFrictionParameter(agx::Real frictionParameter)
Friction parameter of the internal friction in the node hinges.
void setNodesToWheelsSplitThreshold(agx::Real splitThreshold)
Threshold when to split a node from a wheel.
void resetToDefault()
Resets all flags and values to default.
void setHingeRangeRange(agx::Real lowerAngle, agx::Real upperAngle)
Assign range used if the hinge range between the nodes are enabled.
agx::Real getNodesToWheelsSplitThreshold() const
void setEnableOnInitializeMergeNodesToWheels(agx::Bool enable)
When the track has been initialized some nodes are in contact with the wheels.
agx::Real getTransformNodesToWheelsOverlap() const
agx::UInt getNumNodesIncludedInAverageDirection() const
agx::Real getStabilizingHingeFrictionParameter() const
agx::Bool getEnableOnInitializeMergeNodesToWheels() const
void setHingeDamping(agx::Real damping, agx::Hinge::DOF dof)
Assign damping for a given degree of freedom in the hinges between track nodes.
agx::Bool getEnableHingeRange() const
virtual ~TrackProperties()
Reference counted object - protected destructor.
agx::Real getNodesToWheelsMergeThreshold() const
agx::RangeReal getHingeRangeRange() const
agx::Bool getEnableOnInitializeTransformNodesToWheels() const
void setEnableHingeRange(agx::Bool enable)
True to enable the range in the hinges between the track nodes to define how the track may bend.
The hinge constraint between two rigid bodies or one rigid body and the world.
Definition Hinge.h:104
DOF
Enum used for specifying which Degree of Freedom (DOF) that should be accessed in calls to for exampl...
Definition Hinge.h:152
Base class providing referencing counted objects.
Definition Referenced.h:120
This namespace contains classes related to vehicles dynamics.
VectorPOD< Real > RealVector
uint32_t UInt32
Definition Integer.h:32
bool Bool
Definition Integer.h:40
uint64_t UInt
Definition Integer.h:27
double Real
Definition Real.h:42