Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TacticalAI Class Reference

#include <TacticalAI.h>

Inheritance diagram for TacticalAI:
Director FighterTacticalAI StarshipTacticalAI

List of all members.

Public Types

enum  ROE {
  NONE, SELF_DEFENSIVE, DEFENSIVE, DIRECTED,
  FLEXIBLE, AGRESSIVE
}

Public Member Functions

 TacticalAI (ShipAI *ai)
virtual ~TacticalAI ()
virtual void ExecFrame (double seconds)
virtual ROE RulesOfEngagement () const
virtual double ThreatLevel () const
virtual double SupportLevel () const
- Public Member Functions inherited from Director
 Director ()
virtual ~Director ()
virtual int Type () const
virtual int Subframe () const

Protected Member Functions

virtual void CheckOrders ()
virtual bool CheckShipOrders ()
virtual bool ProcessOrders ()
virtual bool CheckFlightPlan ()
virtual bool CheckObjectives ()
virtual void SelectTarget ()
virtual void SelectTargetDirected (Ship *tgt=0)
virtual void SelectTargetOpportunity ()
virtual void CheckTarget ()
virtual void FindThreat ()
virtual void FindSupport ()
virtual void FindFormationSlot (int formation)
virtual bool CanTarget (Ship *tgt)
virtual void ClearRadioOrders ()

Protected Attributes

Shipship
ShipAIship_ai
CarrierAIcarrier_ai
Instructionnavpt
Instructionorders
double agression
ROE roe
int element_index
int action
int exec_time
int directed_tgtid
double threat_level
double support_level

Detailed Description

Definition at line 30 of file TacticalAI.h.


Member Enumeration Documentation

Enumerator:
NONE 
SELF_DEFENSIVE 
DEFENSIVE 
DIRECTED 
FLEXIBLE 
AGRESSIVE 

Definition at line 36 of file TacticalAI.h.


Constructor & Destructor Documentation

TacticalAI::TacticalAI ( ShipAI ai)

Definition at line 43 of file TacticalAI.cpp.

TacticalAI::~TacticalAI ( )
virtual

Definition at line 66 of file TacticalAI.cpp.


Member Function Documentation

bool TacticalAI::CanTarget ( Ship tgt)
protectedvirtual

Definition at line 565 of file TacticalAI.cpp.

bool TacticalAI::CheckFlightPlan ( )
protectedvirtual

Reimplemented in FighterTacticalAI.

Definition at line 353 of file TacticalAI.cpp.

bool TacticalAI::CheckObjectives ( )
protectedvirtual

Definition at line 141 of file TacticalAI.cpp.

void TacticalAI::CheckOrders ( )
protectedvirtual

Definition at line 116 of file TacticalAI.cpp.

bool TacticalAI::CheckShipOrders ( )
protectedvirtual

Definition at line 133 of file TacticalAI.cpp.

void TacticalAI::CheckTarget ( )
protectedvirtual

Definition at line 746 of file TacticalAI.cpp.

void TacticalAI::ClearRadioOrders ( )
protectedvirtual

Definition at line 337 of file TacticalAI.cpp.

void TacticalAI::ExecFrame ( double  seconds)
virtual

Reimplemented from Director.

Reimplemented in StarshipTacticalAI.

Definition at line 74 of file TacticalAI.cpp.

void TacticalAI::FindFormationSlot ( int  formation)
protectedvirtual

Reimplemented in FighterTacticalAI.

Definition at line 920 of file TacticalAI.cpp.

void TacticalAI::FindSupport ( )
protectedvirtual

Reimplemented in StarshipTacticalAI.

Definition at line 890 of file TacticalAI.cpp.

void TacticalAI::FindThreat ( )
protectedvirtual

Reimplemented in FighterTacticalAI, and StarshipTacticalAI.

Definition at line 822 of file TacticalAI.cpp.

bool TacticalAI::ProcessOrders ( )
protectedvirtual

Definition at line 195 of file TacticalAI.cpp.

virtual ROE TacticalAI::RulesOfEngagement ( ) const
inlinevirtual

Definition at line 47 of file TacticalAI.h.

void TacticalAI::SelectTarget ( )
protectedvirtual

Reimplemented in FighterTacticalAI.

Definition at line 420 of file TacticalAI.cpp.

void TacticalAI::SelectTargetDirected ( Ship tgt = 0)
protectedvirtual

Reimplemented in FighterTacticalAI.

Definition at line 517 of file TacticalAI.cpp.

void TacticalAI::SelectTargetOpportunity ( )
protectedvirtual

Reimplemented in FighterTacticalAI.

Definition at line 580 of file TacticalAI.cpp.

virtual double TacticalAI::SupportLevel ( ) const
inlinevirtual

Definition at line 49 of file TacticalAI.h.

virtual double TacticalAI::ThreatLevel ( ) const
inlinevirtual

Definition at line 48 of file TacticalAI.h.


Member Data Documentation

int TacticalAI::action
protected

Definition at line 80 of file TacticalAI.h.

double TacticalAI::agression
protected

Definition at line 77 of file TacticalAI.h.

CarrierAI* TacticalAI::carrier_ai
protected

Definition at line 72 of file TacticalAI.h.

int TacticalAI::directed_tgtid
protected

Definition at line 82 of file TacticalAI.h.

int TacticalAI::element_index
protected

Definition at line 79 of file TacticalAI.h.

int TacticalAI::exec_time
protected

Definition at line 81 of file TacticalAI.h.

Instruction* TacticalAI::navpt
protected

Definition at line 74 of file TacticalAI.h.

Instruction* TacticalAI::orders
protected

Definition at line 75 of file TacticalAI.h.

ROE TacticalAI::roe
protected

Definition at line 78 of file TacticalAI.h.

Ship* TacticalAI::ship
protected

Definition at line 70 of file TacticalAI.h.

ShipAI* TacticalAI::ship_ai
protected

Definition at line 71 of file TacticalAI.h.

double TacticalAI::support_level
protected

Definition at line 85 of file TacticalAI.h.

double TacticalAI::threat_level
protected

Definition at line 84 of file TacticalAI.h.


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