| 1 | #ifndef _FGGROUND_HPP |
| 2 | #define _FGGROUND_HPP |
| 3 | |
| 4 | #include "Ground.hpp" |
| 5 | |
| 6 | class FGInterface; |
| 7 | namespace simgear { |
| 8 | class BVHMaterial; |
| 9 | } |
| 10 | |
| 11 | namespace yasim { |
| 12 | |
| 13 | // The XYZ coordinate system has Z as the earth's axis, the Y axis |
| 14 | // pointing out the equator at zero longitude, and the X axis pointing |
| 15 | // out the middle of the western hemisphere. |
| 16 | class FGGround : public Ground { |
| 17 | public: |
| 18 | FGGround(FGInterface *iface); |
| 19 | virtual ~FGGround(); |
| 20 | |
| 21 | void getGroundPlane(const double pos[3], |
| 22 | double plane[4], float vel[3], |
| 23 | unsigned int &body) override; |
| 24 | |
| 25 | void getGroundPlane(const double pos[3], |
| 26 | double plane[4], float vel[3], |
| 27 | const simgear::BVHMaterial **material, |
| 28 | unsigned int &body) override; |
| 29 | |
| 30 | bool getBody(double t, double bodyToWorld[16], double linearVel[3], |
| 31 | double angularVel[3], unsigned int &id) override; |
| 32 | |
| 33 | bool caughtWire(const double pos[4][3]) override; |
| 34 | |
| 35 | bool getWire(double end[2][3], float vel[2][3]) override; |
| 36 | |
| 37 | void releaseWire(void) override; |
| 38 | |
| 39 | float getCatapult(const double pos[3], |
| 40 | double end[2][3], float vel[2][3]) override; |
| 41 | |
| 42 | void setTimeOffset(double toff); |
| 43 | |
| 44 | private: |
| 45 | FGInterface *_iface; |
| 46 | double _toff; |
| 47 | }; |
| 48 | |
| 49 | }; // namespace yasim |
| 50 | #endif // _FGGROUND_HPP |