Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
Collider.hpp
Go to the documentation of this file.
1#pragma once
2#include <glm/glm.hpp>
3
4#include "core/EngineAPI.hpp"
6
7
22
27// [ReflectClass]
32 // [ReflectField]
33 float radius = 1.0f;
35 // [ReflectField]
36 float height = 2.0f;
38 // [ReflectField]
39 glm::vec3 extents = glm::vec3(0.5f);
41 // [ReflectField]
42 glm::vec3 offset = glm::vec3(0.0f);
43};
44
45
47
48
49
50
51
52
53
54
ColliderShape
Geometric primitive shapes supported for physics collision detection.
Definition Collider.hpp:12
@ AABB
Axis-Aligned Bounding Box volume.
Definition Collider.hpp:16
@ Capsule
Capsule volume defined by radius and height.
Definition Collider.hpp:20
@ OBB
Oriented Bounding Box volume.
Definition Collider.hpp:18
@ Sphere
Spherical collision volume defined by radius.
Definition Collider.hpp:14
#define REGISTER_COMPONENT(Type, MenuPath)
Definition ComponentReflection.hpp:156
#define ENGINE_API
Definition EngineAPI.hpp:10
Represents a collision volume (Sphere, Axis-Aligned Bounding Box, Oriented Bounding Box,...
Definition Collider.hpp:28
float radius
Radius used for Sphere and Capsule colliders.
Definition Collider.hpp:33
glm::vec3 offset
Local position offset relative to entity transform origin.
Definition Collider.hpp:42
float height
Total height (including hemispherical caps) for Capsule colliders.
Definition Collider.hpp:36
glm::vec3 extents
Half-extents vector for AABB and OBB colliders.
Definition Collider.hpp:39
ColliderShape shape
Active primitive collision shape.
Definition Collider.hpp:30