Tramway SDK
|
Classes | |
class | CallbackMotionState |
struct | CollisionShapeTransform |
struct | ObjectCollision |
class | PhysicsDebugDraw |
struct | RigidbodyMetadata |
struct | ShapecastCallback |
Typedefs | |
typedef std::pair< vec3, quat >(* | get_trf_callback) (void *) |
typedef void(* | set_trf_callback) (void *, std::pair< vec3, quat >) |
typedef void(* | col_callback) (void *, void *, ObjectCollision) |
Enumerations | |
enum | UserIndex : int { USERINDEX_RIGIDBODY = 3 , USERINDEX_TRIGGER = 4 } |
enum | MetadataType { METADATA_RIGIDBODY , METADATA_TRIGGER } |
Functions | |
collisionshape_t | MakeCollisionShape (CollisionShapeTransform *shapes, size_t shape_count) |
collisionshape_t | MakeCollisionShape (CollisionShape shape) |
void | YeetCollisionShape (collisionshape_t shape) |
rigidbody_t | 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 | YeetRigidbody (rigidbody_t rigidbody) |
void | SetRigidbodyTransformCallback (rigidbody_t rigidbody, get_trf_callback get_callback, set_trf_callback set_callback, void *data) |
void | SetRigidbodyCollisionCallback (rigidbody_t rigidbody, col_callback callback, void *data) |
void | SetRigidbodyCollisionMask (rigidbody_t rigidbody, uint32_t mask) |
void | SetRigidbodyCollisionGroup (rigidbody_t rigidbody, uint32_t group) |
void | SetRigidbodyLocation (rigidbody_t rigidbody, vec3 location) |
void | SetRigidbodyRotation (rigidbody_t rigidbody, quat rotation) |
void | SetRigidbodyMass (rigidbody_t rigidbody, float mass) |
void | PushRigidbody (rigidbody_t rigidbody, vec3 direction) |
void | PushRigidbody (rigidbody_t rigidbody, vec3 direction, vec3 local) |
void | SpinRigidbody (rigidbody_t rigidbody, vec3 direction) |
void | SetRigidbodyDebugDrawing (rigidbody_t rigidbody, bool drawing) |
void | SetRigidbodyKinematic (rigidbody_t rigidbody, bool kinematic) |
void | SetRigidbodyAngularFactor (rigidbody_t rigidbody, vec3 factor) |
void | SetRigidbodyLinearFactor (rigidbody_t rigidbody, vec3 factor) |
void | SetRigidbodyVelocity (rigidbody_t rigidbody, vec3 velocity) |
vec3 | GetRigidbodyVelocity (rigidbody_t rigidbody) |
void | AwakenRigidbody (rigidbody_t rigidbody) |
void | SleepRigidbody (rigidbody_t rigidbody) |
void | DisableRigidbodyDeactivation (rigidbody_t rigidbody) |
trigger_t | MakeTrigger (collisionshape_t shape, uint32_t mask, uint32_t group, vec3 position, quat rotation) |
void | YeetTrigger (trigger_t) |
void | SetTriggerCollisionCallback (trigger_t rigidbody, col_callback callback, void *data) |
void | SetTriggerCollisionMask (trigger_t rigidbody, uint32_t mask) |
void | SetTriggerCollisionGroup (trigger_t rigidbody, uint32_t group) |
void | SetTriggerLocation (trigger_t rigidbody, vec3 location) |
void | SetTriggerRotation (trigger_t rigidbody, quat location) |
std::pair< ObjectCollision, void * > | Raycast (vec3 from, vec3 to, uint32_t collision_mask) |
std::vector< std::pair< ObjectCollision, void * > > | Shapecast (CollisionShape shape, vec3 from, vec3 to, uint32_t collision_mask) |
void | Init () |
void | StepPhysics () |
void | DrawDebug () |
void | DrawDebug (bool) |
void | SetRigidbodyTransformCallback (rigidbody_t rigidbody, std::pair< vec3, quat >(*get_transform_callback)(void *), void(*set_transform_callback)(void *, std::pair< vec3, quat >), void *data) |
Variables | |
Pool< RigidbodyMetadata > | rigidbody_metadata_pool ("rigibody emtadat pool", 200) |
typedef void(* tram::Physics::API::col_callback) (void *, void *, ObjectCollision) |
enum tram::Physics::API::UserIndex : int |
void tram::Physics::API::AwakenRigidbody | ( | rigidbody_t | rigidbody | ) |
void tram::Physics::API::DisableRigidbodyDeactivation | ( | rigidbody_t | rigidbody | ) |
void tram::Physics::API::DrawDebug | ( | ) |
void tram::Physics::API::DrawDebug | ( | bool | draw | ) |
vec3 tram::Physics::API::GetRigidbodyVelocity | ( | rigidbody_t | rigidbody | ) |
void tram::Physics::API::Init | ( | ) |
collisionshape_t tram::Physics::API::MakeCollisionShape | ( | CollisionShape | shape | ) |
collisionshape_t tram::Physics::API::MakeCollisionShape | ( | CollisionShapeTransform * | shapes, |
size_t | shape_count | ||
) |
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 | ||
) |
trigger_t tram::Physics::API::MakeTrigger | ( | collisionshape_t | shape, |
uint32_t | mask, | ||
uint32_t | group, | ||
vec3 | position, | ||
quat | rotation | ||
) |
void tram::Physics::API::PushRigidbody | ( | rigidbody_t | rigidbody, |
vec3 | direction | ||
) |
void tram::Physics::API::PushRigidbody | ( | rigidbody_t | rigidbody, |
vec3 | direction, | ||
vec3 | local | ||
) |
std::pair< ObjectCollision, void * > tram::Physics::API::Raycast | ( | vec3 | from, |
vec3 | to, | ||
uint32_t | collision_mask | ||
) |
void tram::Physics::API::SetRigidbodyAngularFactor | ( | rigidbody_t | rigidbody, |
vec3 | factor | ||
) |
void tram::Physics::API::SetRigidbodyCollisionCallback | ( | rigidbody_t | rigidbody, |
col_callback | callback, | ||
void * | data | ||
) |
void tram::Physics::API::SetRigidbodyCollisionGroup | ( | rigidbody_t | rigidbody, |
uint32_t | group | ||
) |
void tram::Physics::API::SetRigidbodyCollisionMask | ( | rigidbody_t | rigidbody, |
uint32_t | mask | ||
) |
void tram::Physics::API::SetRigidbodyDebugDrawing | ( | rigidbody_t | rigidbody, |
bool | drawing | ||
) |
void tram::Physics::API::SetRigidbodyKinematic | ( | rigidbody_t | rigidbody, |
bool | kinematic | ||
) |
void tram::Physics::API::SetRigidbodyLinearFactor | ( | rigidbody_t | rigidbody, |
vec3 | factor | ||
) |
void tram::Physics::API::SetRigidbodyLocation | ( | rigidbody_t | rigidbody, |
vec3 | location | ||
) |
void tram::Physics::API::SetRigidbodyMass | ( | rigidbody_t | rigidbody, |
float | mass | ||
) |
void tram::Physics::API::SetRigidbodyRotation | ( | rigidbody_t | rigidbody, |
quat | rotation | ||
) |
void tram::Physics::API::SetRigidbodyTransformCallback | ( | rigidbody_t | rigidbody, |
get_trf_callback | get_callback, | ||
set_trf_callback | set_callback, | ||
void * | data | ||
) |
void tram::Physics::API::SetRigidbodyTransformCallback | ( | rigidbody_t | rigidbody, |
std::pair< vec3, quat >(*)(void *) | get_transform_callback, | ||
void(*)(void *, std::pair< vec3, quat >) | set_transform_callback, | ||
void * | data | ||
) |
void tram::Physics::API::SetRigidbodyVelocity | ( | rigidbody_t | rigidbody, |
vec3 | velocity | ||
) |
void tram::Physics::API::SetTriggerCollisionCallback | ( | trigger_t | rigidbody, |
col_callback | callback, | ||
void * | data | ||
) |
void tram::Physics::API::SetTriggerCollisionGroup | ( | trigger_t | rigidbody, |
uint32_t | group | ||
) |
void tram::Physics::API::SetTriggerCollisionMask | ( | trigger_t | rigidbody, |
uint32_t | 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::SleepRigidbody | ( | rigidbody_t | rigidbody | ) |
void tram::Physics::API::SpinRigidbody | ( | rigidbody_t | rigidbody, |
vec3 | direction | ||
) |
void tram::Physics::API::StepPhysics | ( | ) |
void tram::Physics::API::YeetCollisionShape | ( | collisionshape_t | shape | ) |
void tram::Physics::API::YeetRigidbody | ( | rigidbody_t | rigidbody | ) |
void tram::Physics::API::YeetTrigger | ( | trigger_t | trigger | ) |
Pool< RigidbodyMetadata > tram::Physics::API::rigidbody_metadata_pool("rigibody emtadat pool", 200) | ( | "rigibody emtadat pool" | , |
200 | |||
) |