]> git.mxchange.org Git - flightgear.git/blob - src/ATC/AIEntity.hxx
Preliminary support for AI planes from Dave Luff. This works only at
[flightgear.git] / src / ATC / AIEntity.hxx
1 // FGAIEntity - abstract base class an artificial intelligence entity
2 //
3 // Written by David Luff, started March 2002.
4 //
5 // Copyright (C) 2002  David C. Luff - david.luff@nottingham.ac.uk
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
21 /*****************************************************************
22 *
23 * WARNING - Curt has some ideas about AI traffic so anything in here
24 * may get rewritten or scrapped.  Contact Curt curt@flightgear.org 
25 * before spending any time or effort on this code!!!
26 *
27 ******************************************************************/
28
29 #ifndef _FG_AIEntity_HXX
30 #define _FG_AIEntity_HXX
31
32 #include <Model/model.hxx>
33 #include <plib/sg.h>
34 #include <plib/ssg.h>
35 #include <simgear/math/point3d.hxx>
36
37
38 /*****************************************************************
39 *
40 *  FGAIEntity - this class implements the minimum requirement
41 *  for any AI entity - a position, an orientation, an associated
42 *  3D model, and the ability to be moved.  It does nothing useful
43 *  and all AI entities are expected to be derived from it.
44 *
45 ******************************************************************/
46 class FGAIEntity {
47
48 public:
49
50     // We need some way for this class to display its radio transmissions if on the 
51     // same frequency and in the vicinity of the user's aircraft
52     // This may need to be done independently of ATC eg CTAF
53
54     virtual ~FGAIEntity();
55
56     // Run the internal calculations
57     virtual void Update(double dt);
58
59 protected:
60
61     Point3D pos;        // WGS84 lat & lon in degrees, elev above sea-level in meters
62     //double lat;               //WGS84
63     //double lon;               //WGS84
64     //double elev;      //Meters
65     double hdg;         //True heading in degrees
66     double roll;        //degrees
67     double pitch;       //degrees
68
69     char* model_path;   //Path to the 3D model
70     FGModelPlacement aip;
71
72     //ssgEntity* model;
73     //ssgTransform* position;
74
75     void Transform();
76
77     //void WorldCoordinate(sgCoord *obj_pos, Point3D center);
78
79     //void FastWorldCoordinate(sgCoord *obj_pos, Point3D center);
80
81 };
82
83 #endif  // _FG_AIEntity_HXX
84