Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
CapsuleCollisionComponent.cpp
Go to the documentation of this file.
2
3#include <btBulletDynamicsCommon.h>
4
5namespace EngineCore {
6
8 float radius, float height)
10 , radius_(radius)
11 , height_(height)
12 {
13 }
14
16 return new btCapsuleShape(radius_, height_);
17 }
18
20 radius_ = radius;
21 markDirty();
22 }
23
25 height_ = height;
26 markDirty();
27 }
28
29} // namespace EngineCore
void setHeight(float height)
Sets the height of the cylindrical portion.
void setRadius(float radius)
Sets the radius of the capsule.
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.
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
Log category system implementation.