31 SpringSettings(
ESpringMode inMode,
float inFrequencyOrStiffness,
float inDamping) : mMode(inMode), mFrequency(inFrequencyOrStiffness), mDamping(inDamping) { }
34 void SaveBinaryState(
StreamOut &inStream)
const;
37 void RestoreBinaryState(
StreamIn &inStream);
51 float mFrequency = 0.0f;
67 float mDamping = 0.0f;
std::uint8_t uint8
Definition Core.h:454
#define JPH_EXPORT
Definition Core.h:236
#define JPH_NAMESPACE_END
Definition Core.h:379
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
#define JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(linkage, class_name)
Definition SerializableObject.h:80
ESpringMode
Enum used by constraints to specify how the spring is defined.
Definition SpringSettings.h:16
@ FrequencyAndDamping
Frequency and damping are specified.
@ StiffnessAndDamping
Stiffness and damping are specified.
Settings for a linear or angular spring.
Definition SpringSettings.h:23
SpringSettings(ESpringMode inMode, float inFrequencyOrStiffness, float inDamping)
Definition SpringSettings.h:31
float mStiffness
Definition SpringSettings.h:60
SpringSettings(const SpringSettings &)=default
SpringSettings()=default
Constructor.
bool HasStiffness() const
Check if the spring has a valid frequency / stiffness, if not the spring will be hard.
Definition SpringSettings.h:40
Simple binary input stream.
Definition StreamIn.h:13
Simple binary output stream.
Definition StreamOut.h:13