17 #ifndef AGX_SleepThreshold_H
18 #define AGX_SleepThreshold_H
39 float acceleration=
float(0.2),
40 float angularVelocity=
float(1E10),
41 float angularAcceleration=1E10
45 inline float getVelocity()
const;
48 inline float getAngularVelocity()
const;
51 inline float getAcceleration()
const;
54 inline float getAngularAcceleration()
const;
59 inline float getVelocity2()
const;
62 inline float getAngularVelocity2()
const;
65 inline float getAcceleration2()
const;
68 inline float getAngularAcceleration2()
const;
72 inline void setVelocity(
float vel );
75 inline void setAngularVelocity(
float vel );
78 inline void setAcceleration(
float acc );
81 inline void setAngularAcceleration(
float acc );
113 float acceleration=1E10,
114 float angularVelocity=
float(0.05),
115 float angularAcceleration=1E10,
116 float time=
float(0.8) );
122 inline void setTime(
float time );
128 inline float getTime()
const;
141 m_velocityThreshold(velocity), m_accelerationThreshold(acceleration), m_angularVelocityThreshold( angularVelocity ), m_angularAccelerationThreshold(angularAcceleration)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
void setTime(float time)
Set the time-window during which the body must be below velocity/acceleration threshold before it is ...
AutoSleepThreshold(float velocity=float(0.05), float acceleration=1E10, float angularVelocity=float(0.05), float angularAcceleration=1E10, float time=float(0.8))
float getTime() const
Get the time-window during which the body must be below velocity/acceleration threshold before it is ...
Base class providing referencing counted objects.
SleepThreshold(float velocity=float(0.05), float acceleration=float(0.2), float angularVelocity=float(1E10), float angularAcceleration=1E10)
void setAngularVelocity(float vel)
Set the threshold of the angular velocity magnitude when a body should be put to sleep.
float m_angularAccelerationThreshold
float getVelocity() const
float getVelocity2() const
float getAngularVelocity() const
float getAngularAcceleration() const
float getAngularVelocity2() const
float getAngularAcceleration2() const
float m_velocityThreshold
float m_accelerationThreshold
float getAcceleration2() const
float m_angularVelocityThreshold
void setVelocity(float vel)
Set the threshold of the linear velocity magnitude when a body should be put to sleep.
float getAcceleration() const
void setAcceleration(float acc)
set the threshold of the linear acceleration magnitude when a body should be put to sleep
void setAngularAcceleration(float acc)
Set the threshold of the angular acceleration magnitude when a body should be put to sleep.
Smart pointer for handling referenced counted objects.
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.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
agx::ref_ptr< SleepThreshold > SleepThresholdRef
SleepThreshold MergeSplitThreshold
agx::ref_ptr< MergeSplitThreshold > MergeSplitThresholdRef
agx::ref_ptr< AutoSleepThreshold > AutoSleepThresholdRef
std::ostream & operator<<(std::ostream &stream, const AtomicValueT< T > &value)