Add JoltPhysics3D for a performance test
This commit is contained in:
committed by
Jérôme Leclercq
parent
bd4c2d6ee7
commit
c5ac142888
44
include/Nazara/JoltPhysics3D/JoltPhysics3D.hpp
Normal file
44
include/Nazara/JoltPhysics3D/JoltPhysics3D.hpp
Normal file
@@ -0,0 +1,44 @@
|
||||
// Copyright (C) 2023 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
|
||||
// This file is part of the "Nazara Engine - JoltPhysics3D module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_JOLTPHYSICS3D_HPP
|
||||
#define NAZARA_JOLTPHYSICS3D_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/JoltPhysics3D/Config.hpp>
|
||||
#include <Nazara/Core/Core.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace JPH
|
||||
{
|
||||
class JobSystem;
|
||||
class JobSystemThreadPool;
|
||||
}
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class NAZARA_JOLTPHYSICS3D_API JoltPhysics3D : public ModuleBase<JoltPhysics3D>
|
||||
{
|
||||
friend ModuleBase;
|
||||
|
||||
public:
|
||||
using Dependencies = TypeList<Core>;
|
||||
|
||||
struct Config {};
|
||||
|
||||
JoltPhysics3D(Config /*config*/);
|
||||
~JoltPhysics3D();
|
||||
|
||||
JPH::JobSystem& GetThreadPool();
|
||||
|
||||
private:
|
||||
std::unique_ptr<JPH::JobSystemThreadPool> m_threadPool;
|
||||
|
||||
static JoltPhysics3D* s_instance;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // NAZARA_JOLTPHYSICS3D_HPP
|
||||
Reference in New Issue
Block a user