Physics3D: Rename PhysWorld to PhysWorld3D

This commit is contained in:
Lynix
2016-10-13 08:13:56 +02:00
parent 3765cba046
commit b52c7c57bf
12 changed files with 59 additions and 59 deletions

View File

@@ -7,7 +7,7 @@
#ifndef NDK_COMPONENTS_PHYSICSCOMPONENT_HPP
#define NDK_COMPONENTS_PHYSICSCOMPONENT_HPP
#include <Nazara/Physics3D/PhysObject.hpp>
#include <Nazara/Physics3D/RigidBody3D.hpp>
#include <NDK/Component.hpp>
#include <memory>

View File

@@ -7,7 +7,7 @@
#ifndef NDK_SYSTEMS_PHYSICSSYSTEM_HPP
#define NDK_SYSTEMS_PHYSICSSYSTEM_HPP
#include <Nazara/Physics3D/PhysWorld.hpp>
#include <Nazara/Physics3D/PhysWorld3D.hpp>
#include <NDK/EntityList.hpp>
#include <NDK/System.hpp>
#include <memory>
@@ -21,8 +21,8 @@ namespace Ndk
PhysicsSystem(const PhysicsSystem& system);
~PhysicsSystem() = default;
Nz::PhysWorld& GetWorld();
const Nz::PhysWorld& GetWorld() const;
Nz::PhysWorld3D& GetWorld();
const Nz::PhysWorld3D& GetWorld() const;
static SystemIndex systemIndex;
@@ -32,7 +32,7 @@ namespace Ndk
EntityList m_dynamicObjects;
EntityList m_staticObjects;
std::unique_ptr<Nz::PhysWorld> m_world; ///TODO: std::optional (Should I make a Nz::Optional class?)
std::unique_ptr<Nz::PhysWorld3D> m_world; ///TODO: std::optional (Should I make a Nz::Optional class?)
};
}

View File

@@ -9,7 +9,7 @@ namespace Ndk
* \return A reference to the physical world
*/
inline Nz::PhysWorld& PhysicsSystem::GetWorld()
inline Nz::PhysWorld3D& PhysicsSystem::GetWorld()
{
return *m_world;
}
@@ -19,7 +19,7 @@ namespace Ndk
* \return A constant reference to the physical world
*/
inline const Nz::PhysWorld& PhysicsSystem::GetWorld() const
inline const Nz::PhysWorld3D& PhysicsSystem::GetWorld() const
{
return *m_world;
}

View File

@@ -3,7 +3,7 @@
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
#include <NDK/Components/CollisionComponent.hpp>
#include <Nazara/Physics3D/PhysObject.hpp>
#include <Nazara/Physics3D/RigidBody3D.hpp>
#include <NDK/Algorithm.hpp>
#include <NDK/World.hpp>
#include <NDK/Components/PhysicsComponent.hpp>
@@ -56,7 +56,7 @@ namespace Ndk
NazaraAssert(entityWorld, "Entity must have world");
NazaraAssert(entityWorld->HasSystem<PhysicsSystem>(), "World must have a physics system");
Nz::PhysWorld& physWorld = entityWorld->GetSystem<PhysicsSystem>().GetWorld();
Nz::PhysWorld3D& physWorld = entityWorld->GetSystem<PhysicsSystem>().GetWorld();
m_staticBody.reset(new Nz::RigidBody3D(&physWorld, m_geom));
m_staticBody->EnableAutoSleep(false);

View File

@@ -3,7 +3,7 @@
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
#include <NDK/Components/PhysicsComponent.hpp>
#include <Nazara/Physics3D/PhysObject.hpp>
#include <Nazara/Physics3D/RigidBody3D.hpp>
#include <NDK/Algorithm.hpp>
#include <NDK/World.hpp>
#include <NDK/Components/CollisionComponent.hpp>
@@ -29,7 +29,7 @@ namespace Ndk
World* entityWorld = m_entity->GetWorld();
NazaraAssert(entityWorld->HasSystem<PhysicsSystem>(), "World must have a physics system");
Nz::PhysWorld& world = entityWorld->GetSystem<PhysicsSystem>().GetWorld();
Nz::PhysWorld3D& world = entityWorld->GetSystem<PhysicsSystem>().GetWorld();
Nz::Collider3DRef geom;
if (m_entity->HasComponent<CollisionComponent>())

View File

@@ -3,7 +3,7 @@
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
#include <NDK/Systems/PhysicsSystem.hpp>
#include <Nazara/Physics3D/PhysObject.hpp>
#include <Nazara/Physics3D/RigidBody3D.hpp>
#include <NDK/Components/CollisionComponent.hpp>
#include <NDK/Components/NodeComponent.hpp>
#include <NDK/Components/PhysicsComponent.hpp>
@@ -62,7 +62,7 @@ namespace Ndk
entities.Insert(entity);
if (!m_world)
m_world = std::make_unique<Nz::PhysWorld>();
m_world = std::make_unique<Nz::PhysWorld3D>();
}
/*!