JoltPhysics3D: Allow to construct components without using the system

This commit is contained in:
SirLynix
2023-07-23 13:05:33 +02:00
parent 20f000c8dc
commit c081811760
14 changed files with 167 additions and 87 deletions

View File

@@ -17,16 +17,21 @@ namespace Nz
friend class JoltPhysics3DSystem;
public:
using JoltCharacter::JoltCharacter;
inline JoltCharacterComponent(const JoltCharacter::Settings& settings);
JoltCharacterComponent(const JoltCharacterComponent&) = default;
JoltCharacterComponent(JoltCharacterComponent&&) noexcept = default;
~JoltCharacterComponent() = default;
JoltCharacterComponent& operator=(const JoltCharacterComponent&) = default;
JoltCharacterComponent& operator=(JoltCharacterComponent&&) noexcept = default;
private:
inline void Construct(JoltPhysWorld3D& world);
std::unique_ptr<JoltCharacter::Settings> m_settings;
};
}
#include <Nazara/JoltPhysics3D/Components/JoltRigidBody3DComponent.inl>
#include <Nazara/JoltPhysics3D/Components/JoltCharacterComponent.inl>
#endif // NAZARA_JOLTPHYSICS3D_COMPONENTS_JOLTCHARACTERCOMPONENT_HPP