Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
SphereCollision.cpp
Go to the documentation of this file.
2#include "LinearMath/btDefaultMotionState.h"
3
4#include <BulletCollision/CollisionShapes/btSphereShape.h>
6
7namespace Physics
8{
9
11{
12 shape = new btSphereShape(15.0f);
13 setup();
14}
15
17{
18 shape = new btSphereShape(radius);
19 setup();
20}
21
23{
24 physicsTransform.setIdentity();
25 physicsTransform.setOrigin(bt::getVec3(transform.getLocation()));
26 physicsTransform.setRotation(bt::getQuat(transform.getRotationQuat()));
27
28 motionState = new btDefaultMotionState(physicsTransform);
29}
30} // namespace Physics
btCollisionShape * shape
CollisionShape(bool isDynamic)
btDefaultMotionState * motionState
EngineCore::Transform transform
Namespace for all physics only components. This could be shapes for the pyhsics engine.
btQuaternion getQuat(glm::quat quaternion)
Definition Converter.cpp:17
btVector3 getVec3(glm::vec3 v)
Definition Converter.cpp:12