JoltPhysics3D/JoltRigidBody3D: Add constructors for settings
This commit is contained in:
parent
de002adbb1
commit
e5318e49fe
|
|
@ -103,6 +103,13 @@ namespace Nz
|
||||||
|
|
||||||
struct DynamicSettings : CommonSettings
|
struct DynamicSettings : CommonSettings
|
||||||
{
|
{
|
||||||
|
DynamicSettings() = default;
|
||||||
|
DynamicSettings(std::shared_ptr<JoltCollider3D> collider, float mass_) :
|
||||||
|
mass(mass_)
|
||||||
|
{
|
||||||
|
geom = std::move(collider);
|
||||||
|
}
|
||||||
|
|
||||||
// Default values from Jolt
|
// Default values from Jolt
|
||||||
JoltMotionQuality motionQuality = JoltMotionQuality::Discrete;
|
JoltMotionQuality motionQuality = JoltMotionQuality::Discrete;
|
||||||
Vector3f angularVelocity = Vector3f::Zero();
|
Vector3f angularVelocity = Vector3f::Zero();
|
||||||
|
|
@ -120,6 +127,11 @@ namespace Nz
|
||||||
|
|
||||||
struct StaticSettings : CommonSettings
|
struct StaticSettings : CommonSettings
|
||||||
{
|
{
|
||||||
|
StaticSettings() = default;
|
||||||
|
StaticSettings(std::shared_ptr<JoltCollider3D> collider)
|
||||||
|
{
|
||||||
|
geom = std::move(collider);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue