Rename ChipmunkPhysics2D and JoltPhysics3D to Physics[2D|3D]

This commit is contained in:
Lynix
2024-02-09 20:59:53 +01:00
committed by Jérôme Leclercq
parent 139bed2b0a
commit e336c8a514
116 changed files with 3044 additions and 3042 deletions

View File

@@ -0,0 +1,39 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Physics3D module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Physics3D/Debug.hpp>
namespace Nz
{
inline bool PhysWorld3D::IsBodyActive(UInt32 bodyIndex) const
{
UInt32 blockIndex = bodyIndex / 64;
UInt32 localIndex = bodyIndex % 64;
return m_activeBodies[blockIndex] & (UInt64(1u) << localIndex);
}
inline bool PhysWorld3D::IsBodyRegistered(UInt32 bodyIndex) const
{
UInt32 blockIndex = bodyIndex / 64;
UInt32 localIndex = bodyIndex % 64;
return m_registeredBodies[blockIndex] & (UInt64(1u) << localIndex);
}
inline void PhysWorld3D::RegisterStepListener(Physiscs3DStepListener* stepListener)
{
auto it = std::lower_bound(m_stepListeners.begin(), m_stepListeners.end(), stepListener);
m_stepListeners.insert(it, stepListener);
}
inline void PhysWorld3D::UnregisterStepListener(Physiscs3DStepListener* stepListener)
{
auto it = std::lower_bound(m_stepListeners.begin(), m_stepListeners.end(), stepListener);
assert(*it == stepListener);
m_stepListeners.erase(it);
}
}
#include <Nazara/Physics3D/DebugOff.hpp>