Physics3D: Rename all *Geom to Collider3D
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#ifndef NDK_COMPONENTS_COLLISIONCOMPONENT_HPP
|
||||
#define NDK_COMPONENTS_COLLISIONCOMPONENT_HPP
|
||||
|
||||
#include <Nazara/Physics3D/Geom.hpp>
|
||||
#include <Nazara/Physics3D/Collider3D.hpp>
|
||||
#include <NDK/Component.hpp>
|
||||
#include <memory>
|
||||
|
||||
@@ -26,15 +26,15 @@ namespace Ndk
|
||||
friend class StaticCollisionSystem;
|
||||
|
||||
public:
|
||||
CollisionComponent(Nz::PhysGeomRef geom = Nz::PhysGeomRef());
|
||||
CollisionComponent(Nz::Collider3DRef geom = Nz::Collider3DRef());
|
||||
CollisionComponent(const CollisionComponent& collision);
|
||||
~CollisionComponent() = default;
|
||||
|
||||
const Nz::PhysGeomRef& GetGeom() const;
|
||||
const Nz::Collider3DRef& GetGeom() const;
|
||||
|
||||
void SetGeom(Nz::PhysGeomRef geom);
|
||||
void SetGeom(Nz::Collider3DRef geom);
|
||||
|
||||
CollisionComponent& operator=(Nz::PhysGeomRef geom);
|
||||
CollisionComponent& operator=(Nz::Collider3DRef geom);
|
||||
CollisionComponent& operator=(CollisionComponent&& collision) = default;
|
||||
|
||||
static ComponentIndex componentIndex;
|
||||
@@ -49,7 +49,7 @@ namespace Ndk
|
||||
void OnDetached() override;
|
||||
|
||||
std::unique_ptr<Nz::PhysObject> m_staticBody;
|
||||
Nz::PhysGeomRef m_geom;
|
||||
Nz::Collider3DRef m_geom;
|
||||
bool m_bodyUpdated;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Ndk
|
||||
* \param geom Reference to a geometry symbolizing the entity
|
||||
*/
|
||||
|
||||
inline CollisionComponent::CollisionComponent(Nz::PhysGeomRef geom) :
|
||||
inline CollisionComponent::CollisionComponent(Nz::Collider3DRef geom) :
|
||||
m_geom(std::move(geom)),
|
||||
m_bodyUpdated(false)
|
||||
{
|
||||
@@ -38,7 +38,7 @@ namespace Ndk
|
||||
* \return A constant reference to the physics geometry
|
||||
*/
|
||||
|
||||
inline const Nz::PhysGeomRef& CollisionComponent::GetGeom() const
|
||||
inline const Nz::Collider3DRef& CollisionComponent::GetGeom() const
|
||||
{
|
||||
return m_geom;
|
||||
}
|
||||
@@ -50,7 +50,7 @@ namespace Ndk
|
||||
* \param geom Reference to a geometry symbolizing the entity
|
||||
*/
|
||||
|
||||
inline CollisionComponent& CollisionComponent::operator=(Nz::PhysGeomRef geom)
|
||||
inline CollisionComponent& CollisionComponent::operator=(Nz::Collider3DRef geom)
|
||||
{
|
||||
SetGeom(geom);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Ndk
|
||||
* \remark Produces a NazaraAssert if the entity has no physics component and has no static body
|
||||
*/
|
||||
|
||||
void CollisionComponent::SetGeom(Nz::PhysGeomRef geom)
|
||||
void CollisionComponent::SetGeom(Nz::Collider3DRef geom)
|
||||
{
|
||||
m_geom = std::move(geom);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Ndk
|
||||
|
||||
Nz::PhysWorld& world = entityWorld->GetSystem<PhysicsSystem>().GetWorld();
|
||||
|
||||
Nz::PhysGeomRef geom;
|
||||
Nz::Collider3DRef geom;
|
||||
if (m_entity->HasComponent<CollisionComponent>())
|
||||
geom = m_entity->GetComponent<CollisionComponent>().GetGeom();
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Ndk
|
||||
if (IsComponent<CollisionComponent>(component))
|
||||
{
|
||||
NazaraAssert(m_object, "Invalid object");
|
||||
m_object->SetGeom(Nz::NullGeom::New());
|
||||
m_object->SetGeom(Nz::NullCollider3D::New());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user