Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
SphereCollisionComponent.cpp
Go to the documentation of this file.
2
3#include <btBulletDynamicsCommon.h>
4
5namespace EngineCore {
6
8 float radius)
10 , radius_(radius)
11 {
12 }
13
15 return new btSphereShape(radius_);
16 }
17
19 radius_ = radius;
20 markDirty();
21 }
22
23} // namespace EngineCore
CollisionComponent(Scene *scene, entt::entity entity)
Constructs a CollisionComponent.
void markDirty()
Marks the shape as needing rebuild. Call after changing shape properties (halfExtents,...
A scene is the overarching structure which can spawn actors.
Definition Scene.h:17
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.
Log category system implementation.