]> git.mxchange.org Git - flightgear.git/blob - src/FDM/YASim/Ground.cpp
simplify name/number handling
[flightgear.git] / src / FDM / YASim / Ground.cpp
1 #include "Glue.hpp"
2
3 #include "Ground.hpp"
4 namespace yasim {
5
6 Ground::Ground()
7 {
8 }
9
10 Ground::~Ground()
11 {
12 }
13
14 void Ground::getGroundPlane(const double pos[3],
15                             double plane[4], float vel[3])
16 {
17     // ground.  Calculate a cartesian coordinate for the ground under
18     // us, find the (geodetic) up vector normal to the ground, then
19     // use that to find the final (radius) term of the plane equation.
20     float up[3];
21     Glue::geodUp((double*)pos, up);
22     int i;
23     for(i=0; i<3; i++) plane[i] = up[i];
24     plane[3] = plane[0]*pos[0] + plane[1]*pos[1] + plane[2]*pos[2];
25
26     vel[0] = 0.0;
27     vel[1] = 0.0;
28     vel[2] = 0.0;
29 }
30
31 bool Ground::caughtWire(const double pos[4][3])
32 {
33     return false;
34 }
35
36 bool Ground::getWire(double end[2][3], float vel[2][3])
37 {
38     return false;
39 }
40
41 void Ground::releaseWire(void)
42 {
43 }
44
45 float Ground::getCatapult(const double pos[3], double end[2][3],
46                           float vel[2][3])
47 {
48     return 1e10;
49 }
50
51 }; // namespace yasim
52