| 1 | #ifdef HAVE_CONFIG_H |
| 2 | # include "config.h" |
| 3 | #endif |
| 4 | |
| 5 | #include "Glue.hpp" |
| 6 | |
| 7 | #include <simgear/bvh/BVHMaterial.hxx> |
| 8 | #include "Ground.hpp" |
| 9 | namespace yasim { |
| 10 | |
| 11 | void Ground::getGroundPlane(const double pos[3], |
| 12 | double plane[4], float vel[3], |
| 13 | unsigned int &body) |
| 14 | { |
| 15 | // ground. Calculate a cartesian coordinate for the ground under |
| 16 | // us, find the (geodetic) up vector normal to the ground, then |
| 17 | // use that to find the final (radius) term of the plane equation. |
| 18 | float up[3]; |
| 19 | Glue::geodUp((double*)pos, up); |
| 20 | int i; |
| 21 | for(i=0; i<3; i++) plane[i] = up[i]; |
| 22 | plane[3] = plane[0]*pos[0] + plane[1]*pos[1] + plane[2]*pos[2]; |
| 23 | |
| 24 | vel[0] = 0.0; |
| 25 | vel[1] = 0.0; |
| 26 | vel[2] = 0.0; |
| 27 | |
| 28 | body = 0; |
| 29 | } |
| 30 | |
| 31 | void Ground::getGroundPlane(const double pos[3], |
| 32 | double plane[4], float vel[3], |
| 33 | const simgear::BVHMaterial **material, |
| 34 | unsigned int &body) |
| 35 | { |
| 36 | getGroundPlane(pos,plane,vel,body); |
| 37 | } |
| 38 | |
| 39 | bool Ground::getBody(double t, double bodyToWorld[16], double linearVel[3], |
| 40 | double angularVel[3], unsigned int &body) |
| 41 | { |
| 42 | return false; |
| 43 | } |
| 44 | |
| 45 | bool Ground::caughtWire(const double pos[4][3]) |
| 46 | { |
| 47 | return false; |
| 48 | } |
| 49 | |
| 50 | bool Ground::getWire(double end[2][3], float vel[2][3]) |
| 51 | { |
| 52 | return false; |
| 53 | } |
| 54 | |
| 55 | void Ground::releaseWire(void) |
| 56 | { |
| 57 | } |
| 58 | |
| 59 | float Ground::getCatapult(const double pos[3], double end[2][3], |
| 60 | float vel[2][3]) |
| 61 | { |
| 62 | return 1e10; |
| 63 | } |
| 64 | |
| 65 | }; // namespace yasim |
| 66 |