AGX Dynamics  2.35.0.1
ConstraintMergeSplitThresholds.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 
20 
21 namespace agxSDK
22 {
24 
29  {
30  public:
32  {
34  NUM_MERGE_THRESHOLDS
35  };
36 
38  {
39  DESIRED_SPEED_DIFF = NUM_MERGE_THRESHOLDS,
43  NUM_THRESHOLDS
44  };
45 
46  public:
51 
58 
63  agx::Real getMaxRelativeSpeed() const;
64 
70 
75  agx::Real getMaxDesiredSpeedDiff() const;
76 
82 
87  agx::Real getMaxDesiredLockAngleDiff() const;
88 
94 
99  agx::Real getMaxDesiredRangeAngleDiff() const;
100 
106 
111  agx::Real getMaxDesiredForceRangeDiff() const;
112 
113  public:
115 
119  virtual agx::ICloneableRef clone( agx::ICloneable* child = nullptr ) override;
120 
124  virtual void resetToDefault() override;
125 
126  protected:
131  };
132 
134  {
135  return get( MAX_RELATIVE_SPEED );
136  }
137 
139  {
140  return get( DESIRED_SPEED_DIFF );
141  }
142 
144  {
145  return get( DESIRED_LOCK_ANGLE_DIFF );
146  }
147 
149  {
150  return get( DESIRED_RANGE_ANGLE_DIFF );
151  }
152 
154  {
155  return get( DESIRED_FORCE_RANGE_DIFF );
156  }
157 }
#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 AGXPHYSICS_EXPORT
Specific thresholds used to split and merge objects given constraints.
ConstraintMergeSplitThresholds()
Default constructor, all thresholds will be set to default.
agx::Real getMaxRelativeSpeed() const
When the relative motion between the objects is less than this threshold, the objects may merge.
virtual ~ConstraintMergeSplitThresholds()
Reference counted object - protected destructor.
virtual void resetToDefault() override
Resets all values to default.
void setMaxDesiredRangeAngleDiff(agx::Real value)
Assign maximum difference the 'position'/desired angle parameter in a range controller may change wit...
void setMaxDesiredForceRangeDiff(agx::Real value)
Assign maximum difference the 'force range'/desired force range parameter in any controller may chang...
void setMaxDesiredLockAngleDiff(agx::Real value)
Assign maximum difference the 'position'/desired angle parameter in a lock controller may change with...
void setMaxDesiredSpeedDiff(agx::Real value)
Assign maximum difference the 'speed'/desired speed parameter in a motor controller may change withou...
virtual agx::ICloneableRef clone(agx::ICloneable *child=nullptr) override
Creates and returns a clone of this object.
void setMaxRelativeSpeed(agx::Real value)
Assign maximum relative speed between the constrained objects for the system to be considered at rest...
Base class for thresholds/constants/values used in agxSDK::MergeSplitAlgorithm.
agx::Real get(const agx::UInt index) const
Interface class for a cloneable reference counted object.
Definition: ICloneable.h:30
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
uint32_t UInt
Definition: Integer.h:34
double Real
Definition: Real.h:42