|
Engine²
Open-source game engine written in C++.
|
#include "Physics.pch.hpp"#include "system/RigidBodySystem.hpp"#include "Logger.hpp"#include "component/BoxCollider.hpp"#include "component/CapsuleCollider.hpp"#include "component/ConvexHullMeshCollider.hpp"#include "component/MeshCollider.hpp"#include "component/RigidBody.hpp"#include "component/RigidBodyInternal.hpp"#include "component/SphereCollider.hpp"#include "exception/RigidBodyError.hpp"#include "resource/BodyEntityMap.hpp"#include "resource/PhysicsManager.hpp"#include "utils/JoltConversions.hpp"#include <fmt/format.h>#include "Object.hpp"#include <Jolt/Geometry/IndexedTriangle.h>#include <Jolt/Physics/Body/BodyCreationSettings.h>#include <Jolt/Physics/Collision/Shape/BoxShape.h>#include <Jolt/Physics/Collision/Shape/CapsuleShape.h>#include <Jolt/Physics/Collision/Shape/ConvexHullShape.h>#include <Jolt/Physics/Collision/Shape/MeshShape.h>#include <Jolt/Physics/Collision/Shape/RotatedTranslatedShape.h>#include <Jolt/Physics/Collision/Shape/SphereShape.h>Namespaces | |
| namespace | Physics |
| namespace | Physics::System |
Functions | |
| static JPH::RefConst< JPH::Shape > | Physics::System::CreateConvexHullFromMesh (const Object::Component::Mesh &mesh, const Component::ConvexHullMeshCollider *meshCollider, const glm::vec3 &scale) |
| Create a ConvexHullShape from mesh vertices. | |
| static JPH::RefConst< JPH::Shape > | Physics::System::CreateMeshShapeFromMesh (const Object::Component::Mesh &mesh, const Component::MeshCollider *meshCollider, const glm::vec3 &scale) |
| Create a MeshShape from mesh vertices and indices. | |
| static JPH::RefConst< JPH::Shape > | Physics::System::CreateShapeFromColliders (Engine::Core::Registry ®istry, Engine::EntityId entity) |
| Create a Jolt shape from collider components. | |
| static void | Physics::System::OnRigidBodyConstruct (Engine::Core::Registry ®istry, Engine::EntityId entityId) |
| Called when RigidBody component is added to an entity. | |
| static void | Physics::System::OnRigidBodyInternalConstruct (Engine::Core::Registry ®istry, Engine::EntityId entityId) |
| static void | Physics::System::OnRigidBodyDestroy (Engine::Core::Registry ®istry, Engine::EntityId entityId) |
| Called when RigidBody component is removed from an entity. | |
| static void | Physics::System::OnRigidBodyInternalDestroy (Engine::Core::Registry ®istry, Engine::EntityId entityId) |
| void | Physics::System::InitRigidBodySystem (Engine::Core &core) |
| Initialize RigidBody system and register entt hooks. | |
| void | Physics::System::ShutdownRigidBodySystem (Engine::Core &core) |
| Shutdown RigidBody system and unregister entt hooks. | |