|
Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
|
Evaluates rigid body movement and resolves collider intersections. More...
#include <PhysicsSystem.hpp>
Classes | |
| struct | OBB |
Public Member Functions | |
| PhysicsSystem (Registry ®, EditorModeState &editorMode) | |
| void | applyAngularDisplacement (Transform &transform, const glm::vec3 &deltaTheta) |
| void | update (float dt) override |
| Pure virtual update function to implement system behaviors. | |
| RaycastHit | raycast (const Ray &ray) |
| Public Member Functions inherited from System | |
| virtual | ~System ()=default |
| Virtual destructor. | |
| void | addEntity (Entity e) |
| Adds an entity to the system tracking list. | |
| void | removeEntity (Entity e) |
| Removes an entity from system tracking. | |
Private Member Functions | |
| glm::mat4 | getEntityWorldMatrix (Entity entity, int depth=0) |
| OBB | getOBB (Entity entity, const ColliderComponent &col) |
| OBB | getOBBFromAABB (const ColliderComponent &col, const glm::vec3 &pos) |
| CollisionInfo | checkSphereAABB (const ColliderComponent &sphere, const glm::vec3 &sPos, const ColliderComponent &aabb, const glm::vec3 &aPos, bool flipNormal) |
| CollisionInfo | checkOBBSphere (const OBB &obb, const glm::vec3 &sphereCenter, float sphereRadius, bool flipNormal) |
| CollisionInfo | checkOBBOBB (const OBB &obbA, const OBB &obbB) |
| CollisionInfo | checkCollision (Entity entityA, const ColliderComponent &colA, Entity entityB, const ColliderComponent &colB) |
| void | resolveCollision (Entity entityA, Transform &transA, ColliderComponent &colA, Entity entityB, Transform &transB, ColliderComponent &colB, const CollisionInfo &colInfo, float dt) |
Private Attributes | |
| Registry & | registry |
| EditorModeState & | editorMode |
Additional Inherited Members | |
| Protected Attributes inherited from System | |
| std::vector< Entity > | entities |
| List of entities tracked by this system. | |
Evaluates rigid body movement and resolves collider intersections.
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inlineoverridevirtual |
Pure virtual update function to implement system behaviors.
| dt | Delta time in seconds. |
Implements System.
|
private |
|
private |