Ndk/Physics: Added first physics components/systems

Former-commit-id: 654b7a2a4645487d139474dcbd02c0882d7c8f02
This commit is contained in:
Lynix
2015-05-02 10:00:07 +02:00
parent 55519b5e31
commit d558b04aa7
15 changed files with 670 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Development Kit"
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
#include <NDK/Entity.hpp>
#include <NDK/World.hpp>
#include <NDK/Components/PhysicsComponent.hpp>
#include <NDK/Systems/PhysicsSystem.hpp>
namespace Ndk
{
inline CollisionComponent::CollisionComponent(NzPhysGeomRef geom) :
m_geom(std::move(geom)),
m_bodyUpdated(false)
{
}
inline CollisionComponent::CollisionComponent(const CollisionComponent& collision) :
m_geom(collision.m_geom),
m_bodyUpdated(false)
{
}
inline const NzPhysGeomRef& CollisionComponent::GetGeom() const
{
return m_geom;
}
inline CollisionComponent& CollisionComponent::operator=(NzPhysGeomRef geom)
{
SetGeom(geom);
return *this;
}
inline NzPhysObject* CollisionComponent::GetStaticBody()
{
return m_staticBody.get();
}
}