FlightGear next
FGAIManager Class Reference

#include <AIManager.hxx>

Inherits SGSubsystem.

Classes

class  Scenario
 

Public Types

typedef std::vector< FGAIBasePtrai_list_type
 

Public Member Functions

 FGAIManager ()
 
virtual ~FGAIManager ()
 
void bind () override
 
void init () override
 
void postinit () override
 
void reinit () override
 
void shutdown () override
 
void unbind () override
 
void update (double dt) override
 
void updateLOD (SGPropertyNode *node)
 update LOD settings of all AI/MP models
 
void attach (const SGSharedPtr< FGAIBase > &model)
 
const FGAIBasecalcCollision (double alt, double lat, double lon, double fuse_range)
 
double get_user_heading () const
 
double get_user_pitch () const
 
double get_user_speed () const
 
double get_wind_from_east () const
 
double get_wind_from_north () const
 
double get_user_roll () const
 
double get_user_agl () const
 
bool loadScenario (const std::string &id)
 
FGAIBasePtr addObject (const SGPropertyNode *definition)
 
bool isVisible (const SGGeod &pos) const
 
FGAIBasePtr getObjectFromProperty (const SGPropertyNode *aProp) const
 given a reference to an /ai/models/<foo>[n] node, return the corresponding AIObject implementation, or NULL.
 
const ai_list_typeget_ai_list () const
 
double calcRangeFt (const SGVec3d &aCartPos, const FGAIBase *aObject) const
 
FGAIAircraftgetUserAircraft () const
 Retrieve the representation of the user's aircraft in the AI manager the position and velocity of this object are slaved to the user's aircraft, so that AI systems such as parking and ATC can see the user and process / avoid correctly.
 
bool isRadarEnabled () const
 
bool enableRadarDebug () const
 
double radarRangeM () const
 

Static Public Member Functions

static const char * staticSubsystemClassId ()
 
static void registerScenarios (SGPropertyNode_ptr root={})
 Static helper to register scenarios.
 
static SGPropertyNode_ptr registerScenarioFile (SGPropertyNode_ptr root, const SGPath &p)
 
static SGPropertyNode_ptr loadScenarioFile (const std::string &id, SGPath &outPath)
 

Friends

class FGSubmodelMgr
 

Detailed Description

Definition at line 25 of file AIManager.hxx.

Member Typedef Documentation

◆ ai_list_type

typedef std::vector<FGAIBasePtr> FGAIManager::ai_list_type

Definition at line 76 of file AIManager.hxx.

Constructor & Destructor Documentation

◆ FGAIManager()

FGAIManager::FGAIManager ( )

Definition at line 106 of file AIManager.cxx.

◆ ~FGAIManager()

FGAIManager::~FGAIManager ( )
virtual

Definition at line 115 of file AIManager.cxx.

Member Function Documentation

◆ addObject()

FGAIBasePtr FGAIManager::addObject ( const SGPropertyNode * definition)

Definition at line 517 of file AIManager.cxx.

◆ attach()

void FGAIManager::attach ( const SGSharedPtr< FGAIBase > & model)

Definition at line 407 of file AIManager.cxx.

◆ bind()

void FGAIManager::bind ( )
override

Definition at line 325 of file AIManager.cxx.

◆ calcCollision()

const FGAIBase * FGAIManager::calcCollision ( double alt,
double lat,
double lon,
double fuse_range )

Definition at line 682 of file AIManager.cxx.

◆ calcRangeFt()

double FGAIManager::calcRangeFt ( const SGVec3d & aCartPos,
const FGAIBase * aObject ) const

Definition at line 733 of file AIManager.cxx.

◆ enableRadarDebug()

bool FGAIManager::enableRadarDebug ( ) const
inline

Definition at line 97 of file AIManager.hxx.

◆ get_ai_list()

const ai_list_type & FGAIManager::get_ai_list ( ) const
inline

Definition at line 77 of file AIManager.hxx.

◆ get_user_agl()

double FGAIManager::get_user_agl ( ) const
inline

Definition at line 54 of file AIManager.hxx.

◆ get_user_heading()

double FGAIManager::get_user_heading ( ) const
inline

Definition at line 48 of file AIManager.hxx.

◆ get_user_pitch()

double FGAIManager::get_user_pitch ( ) const
inline

Definition at line 49 of file AIManager.hxx.

◆ get_user_roll()

double FGAIManager::get_user_roll ( ) const
inline

Definition at line 53 of file AIManager.hxx.

◆ get_user_speed()

double FGAIManager::get_user_speed ( ) const
inline

Definition at line 50 of file AIManager.hxx.

◆ get_wind_from_east()

double FGAIManager::get_wind_from_east ( ) const
inline

Definition at line 51 of file AIManager.hxx.

◆ get_wind_from_north()

double FGAIManager::get_wind_from_north ( ) const
inline

Definition at line 52 of file AIManager.hxx.

◆ getObjectFromProperty()

FGAIBasePtr FGAIManager::getObjectFromProperty ( const SGPropertyNode * aProp) const

given a reference to an /ai/models/<foo>[n] node, return the corresponding AIObject implementation, or NULL.

Definition at line 588 of file AIManager.cxx.

◆ getUserAircraft()

FGAIAircraft * FGAIManager::getUserAircraft ( ) const

Retrieve the representation of the user's aircraft in the AI manager the position and velocity of this object are slaved to the user's aircraft, so that AI systems such as parking and ATC can see the user and process / avoid correctly.

Definition at line 739 of file AIManager.cxx.

◆ init()

void FGAIManager::init ( )
override

Definition at line 120 of file AIManager.cxx.

◆ isRadarEnabled()

bool FGAIManager::isRadarEnabled ( ) const
inline

Definition at line 92 of file AIManager.hxx.

◆ isVisible()

bool FGAIManager::isVisible ( const SGGeod & pos) const

Definition at line 436 of file AIManager.cxx.

◆ loadScenario()

bool FGAIManager::loadScenario ( const std::string & id)

Definition at line 598 of file AIManager.cxx.

◆ loadScenarioFile()

SGPropertyNode_ptr FGAIManager::loadScenarioFile ( const std::string & id,
SGPath & outPath )
static

Definition at line 655 of file AIManager.cxx.

◆ postinit()

void FGAIManager::postinit ( )
override

Definition at line 260 of file AIManager.cxx.

◆ radarRangeM()

double FGAIManager::radarRangeM ( ) const
inline

Definition at line 102 of file AIManager.hxx.

◆ registerScenarioFile()

SGPropertyNode_ptr FGAIManager::registerScenarioFile ( SGPropertyNode_ptr root,
const SGPath & p )
static

Definition at line 210 of file AIManager.cxx.

◆ registerScenarios()

void FGAIManager::registerScenarios ( SGPropertyNode_ptr root = {})
static

Static helper to register scenarios.

This has to happen very early because we need carrier scenarios to start the position-init process for a carrier start.

Definition at line 163 of file AIManager.cxx.

◆ reinit()

void FGAIManager::reinit ( )
override

Definition at line 284 of file AIManager.cxx.

◆ shutdown()

void FGAIManager::shutdown ( )
override

Definition at line 296 of file AIManager.cxx.

◆ staticSubsystemClassId()

static const char * FGAIManager::staticSubsystemClassId ( )
inlinestatic

Definition at line 41 of file AIManager.hxx.

◆ unbind()

void FGAIManager::unbind ( )
override

Definition at line 332 of file AIManager.cxx.

◆ update()

void FGAIManager::update ( double dt)
override

Definition at line 352 of file AIManager.cxx.

◆ updateLOD()

void FGAIManager::updateLOD ( SGPropertyNode * node)

update LOD settings of all AI/MP models

Definition at line 401 of file AIManager.cxx.

Friends And Related Symbol Documentation

◆ FGSubmodelMgr

friend class FGSubmodelMgr
friend

Definition at line 109 of file AIManager.hxx.


The documentation for this class was generated from the following files: