Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Farcaster.h
Go to the documentation of this file.
1
/* Project STARSHATTER
2
John DiCamillo
3
Copyright © 1997-2002. All Rights Reserved.
4
5
SUBSYSTEM: Stars.exe
6
FILE: Farcaster.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
*/
13
14
#ifndef Farcaster_h
15
#define Farcaster_h
16
17
#include "
Types.h
"
18
#include "
Geometry.h
"
19
#include "
System.h
"
20
#include "
SimObject.h
"
21
#include "
text.h
"
22
23
// +----------------------------------------------------------------------+
24
25
class
Ship
;
26
class
ShipDesign
;
27
class
Farcaster
;
28
29
// +----------------------------------------------------------------------+
30
31
class
Farcaster
:
public
System
,
public
SimObserver
32
{
33
public
:
34
Farcaster
(
double
capacity
,
double
sink_rate
);
35
Farcaster
(
const
Farcaster
& rhs);
36
virtual
~Farcaster
();
37
38
enum
CONSTANTS
{
NUM_APPROACH_PTS
= 4 };
39
40
virtual
void
ExecFrame
(
double
seconds);
41
void
SetShip
(
Ship
* s) {
ship
= s; }
42
void
SetDest
(
Ship
* d) {
dest
= d; }
43
44
Point
ApproachPoint
(
int
i)
const
{
return
approach_point
[i]; }
45
Point
StartPoint
()
const
{
return
start_point
; }
46
Point
EndPoint
()
const
{
return
end_point
; }
47
48
virtual
void
SetApproachPoint
(
int
i,
Point
loc);
49
virtual
void
SetStartPoint
(
Point
loc);
50
virtual
void
SetEndPoint
(
Point
loc);
51
virtual
void
SetCycleTime
(
double
time);
52
53
virtual
void
Orient
(
const
Physical
* rep);
54
55
// SimObserver:
56
virtual
bool
Update
(
SimObject
* obj);
57
virtual
const
char
*
GetObserverName
()
const
;
58
59
// accessors:
60
const
Ship
*
GetShip
()
const
{
return
ship
; }
61
const
Ship
*
GetDest
()
const
{
return
dest
; }
62
63
int
ActiveState
()
const
{
return
active_state
; }
64
double
WarpFactor
()
const
{
return
warp_fov
; }
65
66
protected
:
67
virtual
void
Jump
();
68
virtual
void
Arrive
(
Ship
* s);
69
70
Ship
*
ship
;
71
Ship
*
dest
;
72
Ship
*
jumpship
;
73
74
Point
start_rel
;
75
Point
end_rel
;
76
Point
approach_rel
[
NUM_APPROACH_PTS
];
77
78
Point
start_point
;
79
Point
end_point
;
80
Point
approach_point
[
NUM_APPROACH_PTS
];
81
82
double
cycle_time
;
83
int
active_state
;
84
double
warp_fov
;
85
86
bool
no_dest
;
87
};
88
89
// +----------------------------------------------------------------------+
90
91
#endif Farcaster_h
92
Stars45
Farcaster.h
Generated on Tue Jun 5 2012 20:46:53 for Starshatter_Open by
1.8.1