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;
63 float mDamping = 0.0f;
std::uint8_t uint8
Definition Core.h:427
#define JPH_EXPORT
Definition Core.h:214
#define JPH_NAMESPACE_END
Definition Core.h:354
#define JPH_NAMESPACE_BEGIN
Definition Core.h:348
#define JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(linkage, class_name)
Definition SerializableObject.h:71
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
float mStiffness
Definition SpringSettings.h:56
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