Files
NazaraEngine/include/Nazara/JoltPhysics3D/JoltRigidBody3D.inl
SirLynix d610baf920 JoltPhysics3D: Rework RigidBody wrapper
- Add a clear way to setup dynamic/kinematic or static bodies
- Body registration to the world is batched (all bodies created before a physics step are added together, which is what Jolt is optimized for)
- Added support for empty shapes (= rigid bodies without collision) using a very small shape and tagging the body as sensor
2023-04-10 17:12:23 +02:00

51 lines
1018 B
C++

// Copyright (C) 2023 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - JoltPhysics3D module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/JoltPhysics3D/Debug.hpp>
namespace Nz
{
inline void JoltRigidBody3D::DisableSimulation()
{
return EnableSimulation(false);
}
inline void JoltRigidBody3D::DisableSleeping()
{
return EnableSleeping(false);
}
inline JPH::Body* JoltRigidBody3D::GetBody()
{
return m_body;
}
inline const JPH::Body* JoltRigidBody3D::GetBody() const
{
return m_body;
}
inline UInt32 JoltRigidBody3D::GetBodyIndex() const
{
return m_bodyIndex;
}
inline const std::shared_ptr<JoltCollider3D>& JoltRigidBody3D::GetGeom() const
{
return m_geom;
}
inline JoltPhysWorld3D& JoltRigidBody3D::GetWorld() const
{
return *m_world;
}
inline bool JoltRigidBody3D::IsSimulationEnabled() const
{
return m_isSimulationEnabled;
}
}
#include <Nazara/JoltPhysics3D/DebugOff.hpp>