|
OpenBF1942-Plus
Refractor 1, rebuilt from scratch
|
#include <physics.h>
Classes | |
| struct | Hit |
| struct | Impl |
Public Member Functions | |
| Physics (const Heightmap &hm, float world_size, float water_level=-1e9f) | |
| ~Physics () | |
| size_t | add_scene (const std::vector< DrawItem > &items, const Vfs &vfs, const std::set< std::string > &ladders={}) |
| void | add_ladder (const float lo[3], const float hi[3]) |
| size_t | ladders () const |
| void | add_static (const std::string &key, const CollisionMesh &mesh, const Mat4 &world) |
| int | add_vehicle (const VehicleDef &def, const Mat4 &world) |
| void | drive (int vehicle, float throttle, float yaw, float pitch=0, float roll=0) |
| void | set_velocity (int vehicle, float x, float y, float z) |
| void | look (int vehicle, float x, float y, int seat=0) |
| Mat4 | joint (int vehicle, const std::string &name, int occurrence) const |
| void | step (float dt) |
| Mat4 | transform (int vehicle) const |
| float | speed (int vehicle) const |
| int | fire (const float pos[3], const float vel[3], int material, int material2, float ttl, int ignore_vehicle=-1, int ignore_character=-1, int tag=0, float radius=0, bool bounce=false) |
| bool | shot_position (int id, float out[3]) const |
| void | explode (int id) |
| std::vector< Hit > | take_hits () |
| bool | line_of_sight (const float a[3], const float b[3], int ignore_character, int target_character, int target_vehicle, int ignore_vehicle=-1) const |
| void | projectiles (std::vector< float > &out) const |
| void | projectile_ids (std::vector< int > &out) const |
| int | add_character (float x, float y, float z) |
| void | walk (int character, float vx, float vz, bool jump) |
| void | place_character (int character, float x, float y, float z) |
| void | set_character_active (int character, bool active) |
| void | kill_character (int character) |
| void | character_position (int character, float out[3]) const |
| bool | set_posture (int character, int posture) |
| void | open_parachute (int character, float k) |
| bool | parachute_open (int character) const |
| float | take_landing (int character) |
| void | character_steps (int character, unsigned &jumps, unsigned &landings) const |
| bool | character_swimming (int character) const |
| bool | character_climbing (int character) const |
| int | character_ladder (int character) const |
| bool | character_on_ground (int character) const |
| obf::Physics::Physics | ( | const Heightmap & | hm, |
| float | world_size, | ||
| float | water_level = -1e9f ) |
|
default |
| int obf::Physics::add_character | ( | float | x, |
| float | y, | ||
| float | z ) |
| void obf::Physics::add_ladder | ( | const float | lo[3], |
| const float | hi[3] ) |
| size_t obf::Physics::add_scene | ( | const std::vector< DrawItem > & | items, |
| const Vfs & | vfs, | ||
| const std::set< std::string > & | ladders = {} ) |
| void obf::Physics::add_static | ( | const std::string & | key, |
| const CollisionMesh & | mesh, | ||
| const Mat4 & | world ) |
| int obf::Physics::add_vehicle | ( | const VehicleDef & | def, |
| const Mat4 & | world ) |
| bool obf::Physics::character_climbing | ( | int | character | ) | const |
| int obf::Physics::character_ladder | ( | int | character | ) | const |
| bool obf::Physics::character_on_ground | ( | int | character | ) | const |
| void obf::Physics::character_position | ( | int | character, |
| float | out[3] ) const |
| void obf::Physics::character_steps | ( | int | character, |
| unsigned & | jumps, | ||
| unsigned & | landings ) const |
| bool obf::Physics::character_swimming | ( | int | character | ) | const |
| void obf::Physics::drive | ( | int | vehicle, |
| float | throttle, | ||
| float | yaw, | ||
| float | pitch = 0, | ||
| float | roll = 0 ) |
| void obf::Physics::explode | ( | int | id | ) |
| int obf::Physics::fire | ( | const float | pos[3], |
| const float | vel[3], | ||
| int | material, | ||
| int | material2, | ||
| float | ttl, | ||
| int | ignore_vehicle = -1, | ||
| int | ignore_character = -1, | ||
| int | tag = 0, | ||
| float | radius = 0, | ||
| bool | bounce = false ) |
| Mat4 obf::Physics::joint | ( | int | vehicle, |
| const std::string & | name, | ||
| int | occurrence ) const |
| void obf::Physics::kill_character | ( | int | character | ) |
| size_t obf::Physics::ladders | ( | ) | const |
| bool obf::Physics::line_of_sight | ( | const float | a[3], |
| const float | b[3], | ||
| int | ignore_character, | ||
| int | target_character, | ||
| int | target_vehicle, | ||
| int | ignore_vehicle = -1 ) const |
| void obf::Physics::look | ( | int | vehicle, |
| float | x, | ||
| float | y, | ||
| int | seat = 0 ) |
| void obf::Physics::open_parachute | ( | int | character, |
| float | k ) |
| bool obf::Physics::parachute_open | ( | int | character | ) | const |
| void obf::Physics::place_character | ( | int | character, |
| float | x, | ||
| float | y, | ||
| float | z ) |
| void obf::Physics::projectile_ids | ( | std::vector< int > & | out | ) | const |
| void obf::Physics::projectiles | ( | std::vector< float > & | out | ) | const |
| void obf::Physics::set_character_active | ( | int | character, |
| bool | active ) |
| bool obf::Physics::set_posture | ( | int | character, |
| int | posture ) |
| void obf::Physics::set_velocity | ( | int | vehicle, |
| float | x, | ||
| float | y, | ||
| float | z ) |
| bool obf::Physics::shot_position | ( | int | id, |
| float | out[3] ) const |
| float obf::Physics::speed | ( | int | vehicle | ) | const |
| void obf::Physics::step | ( | float | dt | ) |
| std::vector< Physics::Hit > obf::Physics::take_hits | ( | ) |
| float obf::Physics::take_landing | ( | int | character | ) |
| Mat4 obf::Physics::transform | ( | int | vehicle | ) | const |
| void obf::Physics::walk | ( | int | character, |
| float | vx, | ||
| float | vz, | ||
| bool | jump ) |