NazaraEngine/include/Nazara/Physics/PhysWorld.hpp

46 lines
1.1 KiB
C++

// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Engine - Physics module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_PHYSWORLD_HPP
#define NAZARA_PHYSWORLD_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Math/Box.hpp>
#include <Nazara/Math/Vector3.hpp>
#include <Nazara/Physics/Config.hpp>
struct NewtonWorld;
class NAZARA_PHYSICS_API NzPhysWorld
{
public:
NzPhysWorld();
NzPhysWorld(const NzPhysWorld&) = delete;
NzPhysWorld(NzPhysWorld&&) = delete; ///TODO
~NzPhysWorld();
NzVector3f GetGravity() const;
NewtonWorld* GetHandle() const;
float GetStepSize() const;
void SetGravity(const NzVector3f& gravity);
void SetSolverModel(unsigned int model);
void SetStepSize(float stepSize);
void Step(float timestep);
NzPhysWorld& operator=(const NzPhysWorld&) = delete;
NzPhysWorld& operator=(NzPhysWorld&&) = delete; ///TODO
private:
NzVector3f m_gravity;
NewtonWorld* m_world;
float m_stepSize;
float m_timestepAccumulator;
};
#endif // NAZARA_PHYSWORLD_HPP