Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
NavAI.h
Go to the documentation of this file.
1
/* Project Starshatter 4.5
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: Stars.exe
6
FILE: NavAI.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Automatic Navigator
13
*/
14
15
#ifndef NavAI_h
16
#define NavAI_h
17
18
#include "
Types.h
"
19
#include "
Geometry.h
"
20
#include "
System.h
"
21
#include "
ShipAI.h
"
22
#include "
Text.h
"
23
24
// +--------------------------------------------------------------------+
25
26
class
Farcaster
;
27
28
// +--------------------------------------------------------------------+
29
30
class
NavAI
:
public
ShipAI
31
{
32
public
:
33
NavAI
(
Ship
* s);
34
virtual
~NavAI
();
35
36
enum
{
DIR_TYPE
= 2000 };
37
virtual
int
Type
()
const
{
return
DIR_TYPE
; }
38
39
virtual
void
ExecFrame
(
double
seconds
);
40
virtual
int
Subframe
()
const
{
return
true
; }
41
void
Disengage
();
42
bool
Complete
()
const
{
return
complete
; }
43
44
protected
:
45
// behaviors:
46
virtual
Steer
SeekTarget
();
47
48
// steering functions:
49
virtual
Point
Transform
(
const
Point
& pt);
50
virtual
Steer
Seek
(
const
Point
& point);
51
virtual
Steer
Flee
(
const
Point
& point);
52
virtual
Steer
Avoid
(
const
Point
& point,
float
radius);
53
virtual
Steer
AvoidTerrain
();
54
55
// accumulate behaviors:
56
virtual
void
Navigator
();
57
virtual
void
FindObjective
();
58
59
virtual
void
HelmControl
();
60
virtual
void
ThrottleControl
();
61
62
bool
complete
;
63
int
drop_state
;
64
int
quantum_state
;
65
int
terrain_warning
;
66
double
brakes
;
67
Farcaster
*
farcaster
;
68
};
69
70
// +--------------------------------------------------------------------+
71
72
73
#endif NavAI_h
74
Stars45
NavAI.h
Generated on Tue Jun 5 2012 20:47:01 for Starshatter_Open by
1.8.1