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:453
#define JPH_EXPORT
Definition: Core.h:236
#define JPH_NAMESPACE_END
Definition: Core.h:378
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:372
#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
float mStiffness
Definition: SpringSettings.h:60
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