Tramway SDK
Classes | Namespaces | Enumerations | Functions | Variables
bullet.cpp File Reference
#include <physics/bullet/debugdrawer.h>
#include <physics/api.h>
#include <components/trigger.h>
#include <btBulletDynamicsCommon.h>

Classes

class  tram::Physics::API::CallbackMotionState
 
struct  tram::Physics::API::RigidbodyMetadata
 
struct  tram::Physics::API::ShapecastCallback
 

Namespaces

namespace  tram
 
namespace  tram::Physics
 
namespace  tram::Physics::API
 

Enumerations

enum  tram::Physics::API::UserIndex : int { tram::Physics::API::USERINDEX_RIGIDBODY = 3 , tram::Physics::API::USERINDEX_TRIGGER = 4 }
 
enum  tram::Physics::API::MetadataType { tram::Physics::API::METADATA_RIGIDBODY , tram::Physics::API::METADATA_TRIGGER }
 

Functions

collisionshape_t tram::Physics::API::MakeCollisionShape (CollisionShapeTransform *shapes, size_t shape_count)
 
collisionshape_t tram::Physics::API::MakeCollisionShape (CollisionShape shape)
 
void tram::Physics::API::YeetCollisionShape (collisionshape_t shape)
 
rigidbody_t tram::Physics::API::MakeRigidbody (collisionshape_t shape, float mass, vec3 position, quat rotation, uint32_t mask, uint32_t group, get_trf_callback get_callback, set_trf_callback set_callback, void *data)
 
void tram::Physics::API::YeetRigidbody (rigidbody_t rigidbody)
 
void tram::Physics::API::SetRigidbodyTransformCallback (rigidbody_t rigidbody, std::pair< vec3, quat >(*get_transform_callback)(void *), void(*set_transform_callback)(void *, std::pair< vec3, quat >), void *data)
 
void tram::Physics::API::SetRigidbodyCollisionCallback (rigidbody_t rigidbody, col_callback callback, void *data)
 
void tram::Physics::API::SetRigidbodyCollisionMask (rigidbody_t rigidbody, uint32_t mask)
 
void tram::Physics::API::SetRigidbodyCollisionGroup (rigidbody_t rigidbody, uint32_t group)
 
void tram::Physics::API::SetRigidbodyLocation (rigidbody_t rigidbody, vec3 location)
 
void tram::Physics::API::SetRigidbodyRotation (rigidbody_t rigidbody, quat rotation)
 
void tram::Physics::API::SetRigidbodyMass (rigidbody_t rigidbody, float mass)
 
void tram::Physics::API::PushRigidbody (rigidbody_t rigidbody, vec3 direction)
 
void tram::Physics::API::PushRigidbody (rigidbody_t rigidbody, vec3 direction, vec3 local)
 
void tram::Physics::API::SpinRigidbody (rigidbody_t rigidbody, vec3 direction)
 
void tram::Physics::API::SetRigidbodyDebugDrawing (rigidbody_t rigidbody, bool drawing)
 
void tram::Physics::API::SetRigidbodyKinematic (rigidbody_t rigidbody, bool kinematic)
 
void tram::Physics::API::SetRigidbodyAngularFactor (rigidbody_t rigidbody, vec3 factor)
 
void tram::Physics::API::SetRigidbodyLinearFactor (rigidbody_t rigidbody, vec3 factor)
 
void tram::Physics::API::SetRigidbodyVelocity (rigidbody_t rigidbody, vec3 velocity)
 
vec3 tram::Physics::API::GetRigidbodyVelocity (rigidbody_t rigidbody)
 
void tram::Physics::API::AwakenRigidbody (rigidbody_t rigidbody)
 
void tram::Physics::API::SleepRigidbody (rigidbody_t rigidbody)
 
void tram::Physics::API::DisableRigidbodyDeactivation (rigidbody_t rigidbody)
 
trigger_t tram::Physics::API::MakeTrigger (collisionshape_t shape, uint32_t mask, uint32_t group, vec3 position, quat rotation)
 
void tram::Physics::API::YeetTrigger (trigger_t)
 
void tram::Physics::API::SetTriggerCollisionCallback (trigger_t rigidbody, col_callback callback, void *data)
 
void tram::Physics::API::SetTriggerCollisionMask (trigger_t rigidbody, uint32_t mask)
 
void tram::Physics::API::SetTriggerCollisionGroup (trigger_t rigidbody, uint32_t group)
 
void tram::Physics::API::SetTriggerLocation (trigger_t rigidbody, vec3 location)
 
void tram::Physics::API::SetTriggerRotation (trigger_t rigidbody, quat location)
 
std::pair< ObjectCollision, void * > tram::Physics::API::Raycast (vec3 from, vec3 to, uint32_t collision_mask)
 
std::vector< std::pair< ObjectCollision, void * > > tram::Physics::API::Shapecast (CollisionShape shape, vec3 from, vec3 to, uint32_t collision_mask)
 
void tram::Physics::API::DrawDebug (bool)
 
void tram::Physics::API::Init ()
 
void tram::Physics::API::StepPhysics ()
 
void tram::Physics::API::DrawDebug ()
 

Variables

Pool< RigidbodyMetadata > tram::Physics::API::rigidbody_metadata_pool ("rigibody emtadat pool", 200)