Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
plane_display.h
Go to the documentation of this file.
1
// -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
2
3
#ifndef VEGASTRIKE_GFX_RADAR_PLANE_DISPLAY_H
4
#define VEGASTRIKE_GFX_RADAR_PLANE_DISPLAY_H
5
6
#include <vector>
7
#include <queue>
8
#include "
gfx/vec.h
"
9
#include "
gfx/matrix.h
"
10
#include "
sensor.h
"
11
#include "
dual_display.h
"
12
13
class
VSSprite
;
14
struct
GFXColor
;
// Edit from class to struct as defined in gfxlib_struct.
15
16
namespace
Radar
17
{
18
19
struct
ViewArea;
20
21
class
PlaneDisplay
:
public
DualDisplayBase
22
{
23
public
:
24
PlaneDisplay
();
25
26
void
Draw
(
const
Sensor
& sensor,
VSSprite
*,
VSSprite
*);
27
28
void
OnDockEnd
();
29
void
OnJumpEnd
();
30
31
protected
:
32
typedef
std::vector<float>
AngleSequence
;
33
34
void
DrawGround
(
const
Sensor
&,
const
ViewArea
&);
35
void
DrawNear
(
const
Sensor
&,
const
Sensor::TrackCollection
&);
36
void
DrawDistant
(
const
Sensor
&,
const
Sensor::TrackCollection
&);
37
void
DrawTrack
(
const
Sensor
&,
const
ViewArea
&,
const
Track
&,
float
);
38
void
DrawTarget
(
Track::Type::Value
,
const
Vector
&,
const
Vector
&,
float
,
const
GFXColor
&);
39
void
DrawTargetMarker
(
const
Vector
&,
const
Vector
&,
const
Vector
&,
float
,
const
GFXColor
&,
bool
);
40
41
void
Animate
();
42
void
PrepareAnimation
(
const
Vector
&,
const
Vector
&,
const
AngleSequence
&,
const
AngleSequence
&,
const
AngleSequence
&);
43
44
void
CalculateRotation
();
45
Vector
Projection
(
const
ViewArea
&,
const
Vector
&);
46
47
protected
:
48
Vector
finalCameraAngle
;
49
Vector
currentCameraAngle
;
50
Vector
xrotation
;
51
Vector
yrotation
;
52
Vector
zrotation
;
53
std::vector<Vector>
groundPlane
;
54
float
radarTime
;
55
56
// Primitive animation system
57
struct
AnimationItem
58
{
59
float
duration
;
60
Vector
position
;
61
};
62
typedef
std::queue<AnimationItem>
AnimationCollection
;
63
AnimationCollection
animation
;
64
float
lastAnimationTime
;
65
AngleSequence
nothingSequence
;
66
AngleSequence
bounceSequence
;
67
AngleSequence
cosineSequence
;
68
};
69
70
}
// namespace Radar
71
72
#endif
src
gfx
radar
plane_display.h
Generated on Fri May 29 2015 23:07:28 for Vegastrike 0.5.1 rc1 by
1.8.4