1#ifndef _COLLIDER_COMPONENT_HPP_
2#define _COLLIDER_COMPONENT_HPP_
76 void Update(
float deltaTime)
override;
89 void SetLayer(uint32_t layer) { m_layer = layer; }
91 void SetMask(uint32_t mask) { m_mask = mask; }
92 uint32_t
GetMask()
const {
return m_mask; }
106 uint32_t m_layer = 0xFFFFFFFF;
107 uint32_t m_mask = 0xFFFFFFFF;
108 bool m_isTrigger =
false;
void Update(float deltaTime) override
void SetMask(uint32_t mask)
const Physics::ColliderShape & GetShape() const
void SetLayer(uint32_t layer)
void SetTrigger(bool trigger)
ColliderComponent(GameObject *owner, const Physics::AABB &aabb)
Wraps a pre-built axis-aligned box shape.
Math::Vector3D GetOffset() const
~ColliderComponent() override=default
uint32_t GetLayer() const
void SetOffset(const Math::Vector3D &offset)
Physics::ColliderType GetType() const
bool Initialize() override
One-time setup, called after the component is attached and the owner is initialized.
Component(GameObject *object)
std::variant< AABB, BoundingSphere, BoundingCapsule, TriangleMesh > ColliderShape
Tagged union of the shapes a ColliderComponent can hold.
Root namespace for everything the engine exposes.