1 // FGAICarrier - AIShip-derived class creates an AI aircraft carrier
3 // Written by David Culp, started October 2004.
5 // Copyright (C) 2004 David P. Culp - davidculp2@comcast.net
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.
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.
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.
21 #ifndef _FG_AICARRIER_HXX
22 #define _FG_AICARRIER_HXX
27 #include <simgear/compiler.h>
36 class FGAICarrierHardware : public ssgBase {
39 enum Type { Catapult, Wire, Solid };
45 static FGAICarrierHardware* newCatapult(FGAICarrier *c) {
46 FGAICarrierHardware* ch = new FGAICarrierHardware;
52 static FGAICarrierHardware* newWire(FGAICarrier *c) {
53 FGAICarrierHardware* ch = new FGAICarrierHardware;
59 static FGAICarrierHardware* newSolid(FGAICarrier *c) {
60 FGAICarrierHardware* ch = new FGAICarrierHardware;
71 class FGAICarrier : public FGAIShip {
75 FGAICarrier(FGAIManager* mgr);
78 void setSolidObjects(const list<string>& solid_objects);
79 void setWireObjects(const list<string>& wire_objects);
80 void setCatapultObjects(const list<string>& catapult_objects);
82 void getVelocityWrtEarth(sgVec3 v);
84 virtual void unbind();
85 void UpdateFlols ( double dt );
91 void update(double dt);
92 void mark_nohot(ssgEntity*);
93 bool mark_wires(ssgEntity*, const list<string>&);
94 bool mark_cat(ssgEntity*, const list<string>&);
95 bool mark_solid(ssgEntity*, const list<string>&);
97 list<string> solid_objects; // List of solid object names
98 list<string> wire_objects; // List of wire object names
99 list<string> catapult_objects; // List of catapult object names
101 // Velocity wrt earth.
102 sgVec3 vel_wrt_earth;
116 double flolsXYZ[3], eyeXYZ[3];
117 double lat, lon, alt;
124 #endif // _FG_AICARRIER_HXX