b0f9d24f9d
configure.ac src/AIModel/AIAircraft.cxx src/AIModel/AIBase.cxx src/AIModel/AIBase.hxx src/AIModel/AICarrier.cxx src/AIModel/AICarrier.hxx src/AIModel/AIManager.cxx src/AIModel/AIManager.hxx src/ATC/AIEntity.cxx src/ATC/AIEntity.hxx src/ATC/AIMgr.cxx src/ATC/AIMgr.hxx src/ATC/ATCdisplay.cxx src/ATC/ATCdisplay.hxx src/Cockpit/cockpit.cxx src/Cockpit/cockpit.hxx src/Cockpit/hud.cxx src/Cockpit/hud.hxx src/Cockpit/hud_rwy.cxx src/Cockpit/panel.cxx src/Cockpit/panel.hxx src/Cockpit/built_in/FGMagRibbon.cxx src/Cockpit/built_in/FGMagRibbon.hxx src/FDM/flight.cxx src/FDM/groundcache.cxx src/FDM/groundcache.hxx src/GUI/gui_funcs.cxx src/Input/input.cxx src/Instrumentation/od_gauge.cxx src/Instrumentation/od_gauge.hxx src/Instrumentation/render_area_2d.cxx src/Instrumentation/render_area_2d.hxx src/Instrumentation/wxradar.cxx src/Instrumentation/wxradar.hxx src/Instrumentation/HUD/HUD.cxx src/Instrumentation/HUD/HUD.hxx src/Instrumentation/HUD/HUD_runway.cxx src/Main/Makefile.am src/Main/main.cxx src/Main/renderer.cxx src/Main/renderer.hxx src/Main/viewmgr.cxx src/Model/acmodel.cxx src/Model/acmodel.hxx src/Model/model_panel.cxx src/Model/model_panel.hxx src/Model/modelmgr.cxx src/Model/modelmgr.hxx src/Model/panelnode.cxx src/Model/panelnode.hxx src/Navaids/awynet.cxx src/Scenery/Makefile.am src/Scenery/hitlist.cxx src/Scenery/hitlist.hxx src/Scenery/newcache.cxx src/Scenery/scenery.cxx src/Scenery/scenery.hxx src/Scenery/tileentry.cxx src/Scenery/tileentry.hxx src/Scenery/tilemgr.cxx src/Scripting/NasalSys.cxx src/Scripting/NasalSys.hxx src/Time/light.cxx Big BLOB on the way to OSG.
73 lines
2.3 KiB
C++
73 lines
2.3 KiB
C++
// FGAIEntity - abstract base class an artificial intelligence entity
|
|
//
|
|
// Written by David Luff, started March 2002.
|
|
//
|
|
// Copyright (C) 2002 David C. Luff - david.luff@nottingham.ac.uk
|
|
//
|
|
// This program is free software; you can redistribute it and/or
|
|
// modify it under the terms of the GNU General Public License as
|
|
// published by the Free Software Foundation; either version 2 of the
|
|
// License, or (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful, but
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
// General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program; if not, write to the Free Software
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#ifndef _FG_AIEntity_HXX
|
|
#define _FG_AIEntity_HXX
|
|
|
|
#include <simgear/math/point3d.hxx>
|
|
#include <simgear/scene/model/model.hxx>
|
|
#include <simgear/scene/model/placement.hxx>
|
|
|
|
|
|
/*****************************************************************
|
|
*
|
|
* FGAIEntity - this class implements the minimum requirement
|
|
* for any AI entity - a position, an orientation, an associated
|
|
* 3D model, and the ability to be moved. It does nothing useful
|
|
* and all AI entities are expected to be derived from it.
|
|
*
|
|
******************************************************************/
|
|
class FGAIEntity {
|
|
|
|
public:
|
|
|
|
FGAIEntity();
|
|
virtual ~FGAIEntity();
|
|
|
|
// Set the 3D model to use (Must be called)
|
|
void SetModel(osg::Node* model);
|
|
|
|
// Run the internal calculations
|
|
virtual void Update(double dt)=0;
|
|
|
|
// Send a transmission *TO* the AIEntity.
|
|
// FIXME int code is a hack - eventually this will receive Alexander's coded messages.
|
|
virtual void RegisterTransmission(int code)=0;
|
|
|
|
inline const Point3D& GetPos() const { return(_pos); }
|
|
|
|
virtual const string& GetCallsign()=0;
|
|
|
|
protected:
|
|
|
|
Point3D _pos; // WGS84 lat & lon in degrees, elev above sea-level in meters
|
|
double _hdg; //True heading in degrees
|
|
double _roll; //degrees
|
|
double _pitch; //degrees
|
|
|
|
char* _model_path; //Path to the 3D model
|
|
osg::ref_ptr<osg::Node> _model; // Pointer to the model
|
|
SGModelPlacement _aip;
|
|
|
|
void Transform();
|
|
};
|
|
|
|
#endif // _FG_AIEntity_HXX
|
|
|