3#ifndef TRAM_SDK_PHYSICS_PHYSICS_H
4#define TRAM_SDK_PHYSICS_PHYSICS_H
11struct btCollisionShape;
12struct btCollisionObject;
16 class PhysicsComponent;
41namespace API {
struct RigidbodyMetadata; }
Rigidbody wrapper.
Definition: physics.h:12
void Init()
Initializes the physics system.
Definition: physics.cpp:37
std::vector< Collision > Shapecast(const CollisionShape &shape, const vec3 &from, const vec3 &to, uint32_t collision_mask)
I have no idea if this function works. (yes it does)
Definition: physics.cpp:67
CollisionGroup
Definition: physics.h:24
@ COLL_TRIGGER
Definition: physics.h:28
@ COLL_VEHICLE
Definition: physics.h:31
@ COLL_WORLDOBJ
Definition: physics.h:25
@ COLL_STATICOBJ
Definition: physics.h:26
@ COLL_PLAYER
Definition: physics.h:29
@ COLL_MONSTER
Definition: physics.h:30
@ COLL_DYNAMICOBJ
Definition: physics.h:27
Collision Raycast(const vec3 &from, const vec3 &to, uint32_t collision_mask)
Performs a raycast.
Definition: physics.cpp:60
void Update()
Updates the physics system.
Definition: physics.cpp:48
glm::vec3 vec3
Definition: math.h:11
Definition: bullet.cpp:100
Physics collision data.
Definition: physics.h:34
vec3 normal
Normal vector of the surface that the collision happened with.
Definition: physics.h:37
vec3 point
Position of the collision in world space.
Definition: physics.h:36
PhysicsComponent * collider
Pointer to a PhysicsComponent that owns the rigidbody with which the collision happened.
Definition: physics.h:35
float distance
Distance of the collision, i.e.
Definition: physics.h:38
Shape for a collider.
Definition: collisionshape.h:32
btCollisionShape * bt_shape
Definition: physics.h:44
btRigidBody * bt_rigidbody
Definition: physics.h:53
API::RigidbodyMetadata * bt_metadata
Definition: physics.h:54
API::RigidbodyMetadata * bt_metadata
Definition: physics.h:49
btCollisionObject * bt_collisionshape
Definition: physics.h:48