2021-01-25 15:17:32 -06:00
|
|
|
#include "CollisionShape.h"
|
|
|
|
|
|
|
|
CollisionShape::CollisionShape() {
|
|
|
|
shape = nullptr;
|
|
|
|
}
|
|
|
|
|
2021-01-27 16:17:22 -06:00
|
|
|
SphereCollisionShape::SphereCollisionShape(float radius) {
|
2021-01-25 15:17:32 -06:00
|
|
|
shape = new btSphereShape(radius);
|
|
|
|
}
|
|
|
|
|
2021-01-27 16:17:22 -06:00
|
|
|
BoxCollisionShape::BoxCollisionShape(float width, float height, float depth) {
|
2021-01-25 15:17:32 -06:00
|
|
|
shape = new btBoxShape(btVector3(width / 2.0f, height / 2.0f, depth / 2.0f));
|
|
|
|
}
|
|
|
|
|
2021-01-27 16:17:22 -06:00
|
|
|
CapsuleCollisionShape::CapsuleCollisionShape(float radius, float height) {
|
2021-01-25 15:17:32 -06:00
|
|
|
shape = new btCapsuleShape(radius, height);
|
|
|
|
}
|