Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
CapsuleCollisionComponent.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace EngineCore {
6
16 public:
24 CapsuleCollisionComponent(Scene* scene, entt::entity entity,
25 float radius = 0.5f, float height = 1.0f);
26
27 ~CapsuleCollisionComponent() override = default;
28
29 btCollisionShape* createShape() override;
30
35 void setRadius(float radius);
36
41 [[nodiscard]] float getRadius() const { return radius_; }
42
47 void setHeight(float height);
48
53 [[nodiscard]] float getHeight() const { return height_; }
54
55 private:
56 float radius_;
57 float height_;
58 };
59
60} // namespace EngineCore
void setHeight(float height)
Sets the height of the cylindrical portion.
void setRadius(float radius)
Sets the radius of the capsule.
~CapsuleCollisionComponent() override=default
float getHeight() const
Gets the height of the cylindrical portion.
CapsuleCollisionComponent(Scene *scene, entt::entity entity, float radius=0.5f, float height=1.0f)
Constructs a CapsuleCollisionComponent.
btCollisionShape * createShape() override
Creates the Bullet collision shape. Must be implemented by derived classes.
float getRadius() const
Gets the radius of the capsule.
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.