Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
SphereCollisionComponent.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace EngineCore {
6
14 public:
21 SphereCollisionComponent(Scene* scene, entt::entity entity,
22 float radius = 0.5f);
23
24 ~SphereCollisionComponent() override = default;
25
26 btCollisionShape* createShape() override;
27
32 void setRadius(float radius);
33
38 [[nodiscard]] float getRadius() const { return radius_; }
39
40 private:
41 float radius_;
42 };
43
44} // namespace EngineCore
CollisionComponent(Scene *scene, entt::entity entity)
Constructs a CollisionComponent.
A scene is the overarching structure which can spawn actors.
Definition Scene.h:17
~SphereCollisionComponent() override=default
SphereCollisionComponent(Scene *scene, entt::entity entity, float radius=0.5f)
Constructs a SphereCollisionComponent.
btCollisionShape * createShape() override
Creates the Bullet collision shape. Must be implemented by derived classes.
void setRadius(float radius)
Sets the radius of the sphere.
float getRadius() const
Gets the radius of the sphere.
Log category system implementation.