Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
BoxCollisionComponent.h
Go to the documentation of this file.
1#pragma once
2
4#include <glm/glm.hpp>
5
6namespace EngineCore {
7
15 public:
22 BoxCollisionComponent(Scene* scene, entt::entity entity,
23 const glm::vec3& halfExtents = glm::vec3(0.5f));
24
25 ~BoxCollisionComponent() override = default;
26
27 btCollisionShape* createShape() override;
28
33 void setHalfExtents(const glm::vec3& halfExtents);
34
39 [[nodiscard]] glm::vec3 getHalfExtents() const { return halfExtents_; }
40
41 private:
42 glm::vec3 halfExtents_;
43 };
44
45} // namespace EngineCore
void setHalfExtents(const glm::vec3 &halfExtents)
Sets the half extents of the box.
~BoxCollisionComponent() override=default
BoxCollisionComponent(Scene *scene, entt::entity entity, const glm::vec3 &halfExtents=glm::vec3(0.5f))
Constructs a BoxCollisionComponent.
btCollisionShape * createShape() override
Creates the Bullet collision shape. Must be implemented by derived classes.
glm::vec3 getHalfExtents() const
Gets the half extents of the box.
CollisionComponent(Scene *scene, entt::entity entity)
Constructs a CollisionComponent.
A scene is the overarching structure which can spawn actors.
Definition Scene.h:17
Log category system implementation.