Files
NazaraEngine/include/Nazara/Physics3D/Components/RigidBody3DComponent.inl
SirLynix 5130a2ff84 Remove Config.hpp options and refactor headers
- Rename Config.hpp to Export.hpp
- Remove Debug.hpp and DebugOff.hpp (not used anymore)
2024-02-19 15:11:34 +01:00

30 lines
753 B
C++

// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Physics3D module"
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <cassert>
namespace Nz
{
inline RigidBody3DComponent::RigidBody3DComponent(const RigidBody3D::DynamicSettings& settings)
{
m_settings = std::make_unique<Setting>(settings);
}
inline RigidBody3DComponent::RigidBody3DComponent(const RigidBody3D::StaticSettings& settings)
{
m_settings = std::make_unique<Setting>(settings);
}
inline void RigidBody3DComponent::Construct(PhysWorld3D& world)
{
assert(m_settings);
std::visit([&](auto&& arg)
{
Create(world, arg);
}, *m_settings);
m_settings.reset();
}
}