Jolt Physics
A multi core friendly Game Physics Engine
|
#include <MotorSettings.h>
Public Member Functions | |
MotorSettings ()=default | |
Constructor. More... | |
MotorSettings (const MotorSettings &)=default | |
MotorSettings & | operator= (const MotorSettings &)=default |
MotorSettings (float inFrequency, float inDamping) | |
MotorSettings (float inFrequency, float inDamping, float inForceLimit, float inTorqueLimit) | |
void | SetForceLimits (float inMin, float inMax) |
Set asymmetric force limits. More... | |
void | SetTorqueLimits (float inMin, float inMax) |
Set asymmetric torque limits. More... | |
void | SetForceLimit (float inLimit) |
Set symmetric force limits. More... | |
void | SetTorqueLimit (float inLimit) |
Set symmetric torque limits. More... | |
bool | IsValid () const |
Check if settings are valid. More... | |
void | SaveBinaryState (StreamOut &inStream) const |
Saves the contents of the motor settings in binary form to inStream. More... | |
void | RestoreBinaryState (StreamIn &inStream) |
Restores contents from the binary stream inStream. More... | |
Public Attributes | |
SpringSettings | mSpringSettings { ESpringMode::FrequencyAndDamping, 2.0f, 1.0f } |
Settings for the spring that is used to drive to the position target (not used when motor is a velocity motor). More... | |
float | mMinForceLimit = -FLT_MAX |
Minimum force to apply in case of a linear constraint (N). Usually this is -mMaxForceLimit unless you want a motor that can e.g. push but not pull. Not used when motor is an angular motor. More... | |
float | mMaxForceLimit = FLT_MAX |
Maximum force to apply in case of a linear constraint (N). Not used when motor is an angular motor. More... | |
float | mMinTorqueLimit = -FLT_MAX |
Minimum torque to apply in case of a angular constraint (N m). Usually this is -mMaxTorqueLimit unless you want a motor that can e.g. push but not pull. Not used when motor is a position motor. More... | |
float | mMaxTorqueLimit = FLT_MAX |
Maximum torque to apply in case of a angular constraint (N m). Not used when motor is a position motor. More... | |
Class that contains the settings for a constraint motor. See the main page of the API documentation for more information on how to configure a motor.
|
default |
Constructor.
|
default |
|
inline |
|
inline |
|
inline |
Check if settings are valid.
|
default |
void MotorSettings::RestoreBinaryState | ( | StreamIn & | inStream | ) |
Restores contents from the binary stream inStream.
void MotorSettings::SaveBinaryState | ( | StreamOut & | inStream | ) | const |
Saves the contents of the motor settings in binary form to inStream.
|
inline |
Set symmetric force limits.
|
inline |
Set asymmetric force limits.
|
inline |
Set symmetric torque limits.
|
inline |
Set asymmetric torque limits.
float MotorSettings::mMaxForceLimit = FLT_MAX |
Maximum force to apply in case of a linear constraint (N). Not used when motor is an angular motor.
float MotorSettings::mMaxTorqueLimit = FLT_MAX |
Maximum torque to apply in case of a angular constraint (N m). Not used when motor is a position motor.
float MotorSettings::mMinForceLimit = -FLT_MAX |
Minimum force to apply in case of a linear constraint (N). Usually this is -mMaxForceLimit unless you want a motor that can e.g. push but not pull. Not used when motor is an angular motor.
float MotorSettings::mMinTorqueLimit = -FLT_MAX |
Minimum torque to apply in case of a angular constraint (N m). Usually this is -mMaxTorqueLimit unless you want a motor that can e.g. push but not pull. Not used when motor is a position motor.
SpringSettings MotorSettings::mSpringSettings { ESpringMode::FrequencyAndDamping, 2.0f, 1.0f } |
Settings for the spring that is used to drive to the position target (not used when motor is a velocity motor).