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

#include <ShipAI.h>

Inheritance diagram for ShipAI:
SteerAI Director SimObserver DropShipAI FighterAI NavAI StarshipAI

List of all members.

Public Member Functions

 ShipAI (SimObject *s)
virtual ~ShipAI ()
virtual void ExecFrame (double seconds)
virtual int Subframe () const
virtual ShipGetShip () const
virtual ShipGetWard () const
virtual void SetWard (Ship *s)
virtual ShipGetThreat () const
virtual void SetThreat (Ship *s)
virtual ShipGetSupport () const
virtual void SetSupport (Ship *s)
virtual ShipGetRumor () const
virtual void SetRumor (Ship *s)
virtual ShotGetThreatMissile () const
virtual void SetThreatMissile (Shot *s)
virtual InstructionGetNavPoint () const
virtual void SetNavPoint (Instruction *n)
virtual Point GetPatrol () const
virtual void SetPatrol (const Point &p)
virtual void ClearPatrol ()
virtual void ClearRumor ()
virtual void ClearTactical ()
virtual FarcasterGetFarcaster ()
virtual void FindObjective ()
virtual void Splash (const Ship *targ)
virtual void SetTarget (SimObject *targ, System *sub=0)
virtual void DropTarget (double drop_time=1.5)
virtual double DropTime () const
virtual void SetBracket (bool bracket)
virtual void SetIdentify (bool identify)
virtual void SetFormationDelta (const Point &point)
virtual bool Update (SimObject *obj)
virtual const char * GetObserverName () const
virtual int GetAILevel () const
- Public Member Functions inherited from SteerAI
 SteerAI (SimObject *self)
virtual ~SteerAI ()
virtual SimObjectGetTarget () const
virtual SystemGetSubTarget () const
virtual int Type () const
virtual Point GetObjective () const
virtual SimObjectGetOther () const
- Public Member Functions inherited from Director
 Director ()
virtual ~Director ()
- Public Member Functions inherited from SimObserver
virtual ~SimObserver ()
int operator== (const SimObserver &o) const
virtual void Observe (SimObject *obj)
virtual void Ignore (SimObject *obj)

Protected Member Functions

virtual void Navigator ()
virtual bool AvoidTestSingleObject (SimObject *obj, const Point &bearing, double avoid_dist, double &avoid_time, Steer &steer)
virtual Steer AvoidCloseObject (SimObject *obj)
virtual Steer AvoidCollision ()
virtual Steer AvoidTerrain ()
virtual Steer SeekTarget ()
virtual Steer EvadeThreat ()
virtual Point ClosingVelocity ()
virtual void FindObjectiveTarget (SimObject *tgt)
virtual void FindObjectiveNavPoint ()
virtual void FindObjectiveFormation ()
virtual void FindObjectivePatrol ()
virtual void FindObjectiveQuantum ()
virtual void FindObjectiveFarcaster (SimRegion *src, SimRegion *dst)
virtual void AdjustDefenses ()
virtual void FireControl ()
virtual void HelmControl ()
virtual void ThrottleControl ()
virtual void NavlightControl ()
virtual void CheckTarget ()
- Protected Member Functions inherited from SteerAI
virtual int Accumulate (const Steer &steer)
virtual Steer Seek (const Point &point)
virtual Steer Flee (const Point &point)
virtual Steer Avoid (const Point &point, float radius)
virtual Steer Evade (const Point &point, const Point &vel)
virtual Point Transform (const Point &pt)
virtual Point AimTransform (const Point &pt)

Protected Attributes

Shipship
Shipsupport
Shiprumor
Shipthreat
Shotthreat_missile
Instructionnavpt
Point obstacle
TacticalAItactical
Farcasterfarcaster
int engaged_ship_id
int splash_count
Point formation_delta
double slot_dist
double throttle
double old_throttle
double seconds
double drop_time
double brake
DWORD last_avoid_time
DWORD last_call_time
int element_index
int too_close
bool bracket
bool identify
bool hold
bool takeoff
int patrol
Point patrol_loc
int ai_level
- Protected Attributes inherited from SteerAI
int seeking
SimObjectself
SimObjecttarget
Systemsubtarget
SimObjectother
Point obj_w
Point objective
double distance
double az [3]
double el [3]
Steer accumulator
double magnitude
DWORD evade_time
double seek_gain
double seek_damp
int ai_type
- Protected Attributes inherited from SimObserver
List< SimObjectobserve_list

Additional Inherited Members

- Public Types inherited from SteerAI
enum  Type { SEEKER = 1000, FIGHTER, STARSHIP, GROUND }
- Static Public Member Functions inherited from SteerAI
static DirectorCreate (SimObject *, int type)
- Static Public Member Functions inherited from SimObserver
static const char * TYPENAME ()

Detailed Description

Definition at line 31 of file ShipAI.h.


Constructor & Destructor Documentation

ShipAI::ShipAI ( SimObject s)

Definition at line 44 of file ShipAI.cpp.

ShipAI::~ShipAI ( )
virtual

Definition at line 81 of file ShipAI.cpp.


Member Function Documentation

void ShipAI::AdjustDefenses ( )
protectedvirtual

Definition at line 1329 of file ShipAI.cpp.

Steer ShipAI::AvoidCloseObject ( SimObject obj)
protectedvirtual

Definition at line 1251 of file ShipAI.cpp.

Steer ShipAI::AvoidCollision ( )
protectedvirtual

Reimplemented in StarshipAI.

Definition at line 1036 of file ShipAI.cpp.

Steer ShipAI::AvoidTerrain ( )
protectedvirtual

Reimplemented in NavAI, and FighterAI.

Definition at line 1027 of file ShipAI.cpp.

bool ShipAI::AvoidTestSingleObject ( SimObject obj,
const Point bearing,
double  avoid_dist,
double &  avoid_time,
Steer steer 
)
protectedvirtual

Definition at line 1130 of file ShipAI.cpp.

void ShipAI::CheckTarget ( )
protectedvirtual

Definition at line 1346 of file ShipAI.cpp.

void ShipAI::ClearPatrol ( )
virtual

Definition at line 227 of file ShipAI.cpp.

void ShipAI::ClearRumor ( )
virtual

Definition at line 156 of file ShipAI.cpp.

void ShipAI::ClearTactical ( )
virtual

Definition at line 87 of file ShipAI.cpp.

Point ShipAI::ClosingVelocity ( )
protectedvirtual

Reimplemented from SteerAI.

Reimplemented in FighterAI.

Definition at line 326 of file ShipAI.cpp.

void ShipAI::DropTarget ( double  drop_time = 1.5)
virtual

Reimplemented from SteerAI.

Definition at line 856 of file ShipAI.cpp.

virtual double ShipAI::DropTime ( ) const
inlinevirtual

Definition at line 68 of file ShipAI.h.

Steer ShipAI::EvadeThreat ( )
protectedvirtual

Reimplemented in FighterAI.

Definition at line 1314 of file ShipAI.cpp.

void ShipAI::ExecFrame ( double  seconds)
virtual

Reimplemented from Director.

Reimplemented in NavAI, and FighterAI.

Definition at line 235 of file ShipAI.cpp.

void ShipAI::FindObjective ( )
virtual

Reimplemented from SteerAI.

Reimplemented in NavAI, DropShipAI, FighterAI, and StarshipAI.

Definition at line 359 of file ShipAI.cpp.

void ShipAI::FindObjectiveFarcaster ( SimRegion src,
SimRegion dst 
)
protectedvirtual

Definition at line 686 of file ShipAI.cpp.

void ShipAI::FindObjectiveFormation ( )
protectedvirtual

Definition at line 737 of file ShipAI.cpp.

void ShipAI::FindObjectiveNavPoint ( )
protectedvirtual

Reimplemented in FighterAI.

Definition at line 560 of file ShipAI.cpp.

void ShipAI::FindObjectivePatrol ( )
protectedvirtual

Definition at line 541 of file ShipAI.cpp.

void ShipAI::FindObjectiveQuantum ( )
protectedvirtual

Definition at line 621 of file ShipAI.cpp.

void ShipAI::FindObjectiveTarget ( SimObject tgt)
protectedvirtual

Definition at line 469 of file ShipAI.cpp.

void ShipAI::FireControl ( )
protectedvirtual

Reimplemented in FighterAI, and StarshipAI.

Definition at line 1322 of file ShipAI.cpp.

virtual int ShipAI::GetAILevel ( ) const
inlinevirtual

Definition at line 77 of file ShipAI.h.

virtual Farcaster* ShipAI::GetFarcaster ( )
inlinevirtual

Definition at line 60 of file ShipAI.h.

virtual Instruction* ShipAI::GetNavPoint ( ) const
inlinevirtual

Definition at line 52 of file ShipAI.h.

const char * ShipAI::GetObserverName ( ) const
virtual

Reimplemented from SteerAI.

Definition at line 204 of file ShipAI.cpp.

Point ShipAI::GetPatrol ( ) const
virtual

Definition at line 214 of file ShipAI.cpp.

virtual Ship* ShipAI::GetRumor ( ) const
inlinevirtual

Definition at line 48 of file ShipAI.h.

virtual Ship* ShipAI::GetShip ( ) const
inlinevirtual

Definition at line 40 of file ShipAI.h.

virtual Ship* ShipAI::GetSupport ( ) const
inlinevirtual

Definition at line 46 of file ShipAI.h.

virtual Ship* ShipAI::GetThreat ( ) const
inlinevirtual

Definition at line 44 of file ShipAI.h.

virtual Shot* ShipAI::GetThreatMissile ( ) const
inlinevirtual

Definition at line 50 of file ShipAI.h.

Ship * ShipAI::GetWard ( ) const
virtual

Definition at line 96 of file ShipAI.cpp.

void ShipAI::HelmControl ( )
protectedvirtual

Reimplemented in NavAI, FighterAI, and StarshipAI.

Definition at line 915 of file ShipAI.cpp.

void ShipAI::Navigator ( )
protectedvirtual

Reimplemented from SteerAI.

Reimplemented in NavAI, FighterAI, DropShipAI, and StarshipAI.

Definition at line 881 of file ShipAI.cpp.

void ShipAI::NavlightControl ( )
protectedvirtual

Definition at line 1005 of file ShipAI.cpp.

Steer ShipAI::SeekTarget ( )
protectedvirtual

Reimplemented in NavAI, FighterAI, and StarshipAI.

Definition at line 1269 of file ShipAI.cpp.

void ShipAI::SetBracket ( bool  bracket)
virtual

Definition at line 865 of file ShipAI.cpp.

void ShipAI::SetFormationDelta ( const Point point)
virtual

Definition at line 731 of file ShipAI.cpp.

void ShipAI::SetIdentify ( bool  identify)
virtual

Definition at line 872 of file ShipAI.cpp.

virtual void ShipAI::SetNavPoint ( Instruction n)
inlinevirtual

Definition at line 53 of file ShipAI.h.

void ShipAI::SetPatrol ( const Point p)
virtual

Definition at line 220 of file ShipAI.cpp.

void ShipAI::SetRumor ( Ship s)
virtual

Definition at line 144 of file ShipAI.cpp.

void ShipAI::SetSupport ( Ship s)
virtual

Definition at line 132 of file ShipAI.cpp.

void ShipAI::SetTarget ( SimObject targ,
System sub = 0 
)
virtual

Reimplemented from SteerAI.

Definition at line 846 of file ShipAI.cpp.

void ShipAI::SetThreat ( Ship s)
virtual

Definition at line 162 of file ShipAI.cpp.

void ShipAI::SetThreatMissile ( Shot s)
virtual

Definition at line 174 of file ShipAI.cpp.

void ShipAI::SetWard ( Ship s)
virtual

Definition at line 102 of file ShipAI.cpp.

void ShipAI::Splash ( const Ship targ)
virtual

Definition at line 833 of file ShipAI.cpp.

virtual int ShipAI::Subframe ( ) const
inlinevirtual

Reimplemented from Director.

Reimplemented in NavAI, and FighterAI.

Definition at line 38 of file ShipAI.h.

void ShipAI::ThrottleControl ( )
protectedvirtual

Reimplemented in NavAI, FighterAI, and StarshipAI.

Definition at line 949 of file ShipAI.cpp.

bool ShipAI::Update ( SimObject obj)
virtual

Reimplemented from SteerAI.

Definition at line 186 of file ShipAI.cpp.


Member Data Documentation

int ShipAI::ai_level
protected

Definition at line 147 of file ShipAI.h.

bool ShipAI::bracket
protected

Definition at line 140 of file ShipAI.h.

double ShipAI::brake
protected

Definition at line 134 of file ShipAI.h.

double ShipAI::drop_time
protected

Definition at line 133 of file ShipAI.h.

int ShipAI::element_index
protected

Definition at line 138 of file ShipAI.h.

int ShipAI::engaged_ship_id
protected

Definition at line 124 of file ShipAI.h.

Farcaster* ShipAI::farcaster
protected

Reimplemented in NavAI.

Definition at line 123 of file ShipAI.h.

Point ShipAI::formation_delta
protected

Definition at line 127 of file ShipAI.h.

bool ShipAI::hold
protected

Definition at line 142 of file ShipAI.h.

bool ShipAI::identify
protected

Definition at line 141 of file ShipAI.h.

DWORD ShipAI::last_avoid_time
protected

Definition at line 135 of file ShipAI.h.

DWORD ShipAI::last_call_time
protected

Definition at line 136 of file ShipAI.h.

Instruction* ShipAI::navpt
protected

Definition at line 120 of file ShipAI.h.

Point ShipAI::obstacle
protected

Definition at line 121 of file ShipAI.h.

double ShipAI::old_throttle
protected

Definition at line 131 of file ShipAI.h.

int ShipAI::patrol
protected

Definition at line 145 of file ShipAI.h.

Point ShipAI::patrol_loc
protected

Definition at line 146 of file ShipAI.h.

Ship* ShipAI::rumor
protected

Definition at line 117 of file ShipAI.h.

double ShipAI::seconds
protected

Definition at line 132 of file ShipAI.h.

Ship* ShipAI::ship
protected

Definition at line 115 of file ShipAI.h.

double ShipAI::slot_dist
protected

Definition at line 128 of file ShipAI.h.

int ShipAI::splash_count
protected

Definition at line 125 of file ShipAI.h.

Ship* ShipAI::support
protected

Definition at line 116 of file ShipAI.h.

TacticalAI* ShipAI::tactical
protected

Definition at line 122 of file ShipAI.h.

bool ShipAI::takeoff
protected

Definition at line 143 of file ShipAI.h.

Ship* ShipAI::threat
protected

Definition at line 118 of file ShipAI.h.

Shot* ShipAI::threat_missile
protected

Definition at line 119 of file ShipAI.h.

double ShipAI::throttle
protected

Definition at line 130 of file ShipAI.h.

int ShipAI::too_close
protected

Definition at line 139 of file ShipAI.h.


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