Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
bubble_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_BUBBLE_DISPLAY_H
4 #define VEGASTRIKE_GFX_RADAR_BUBBLE_DISPLAY_H
5 
6 #include <queue>
7 #include "sensor.h"
8 #include "radar.h"
9 #include "dual_display.h"
10 
11 namespace Radar
12 {
13 
14 struct ViewArea;
15 
17 {
18 public:
19  BubbleDisplay();
20 
21  void Draw(const Sensor&, VSSprite *, VSSprite *);
22 
23  void OnDockEnd();
24  void OnJumpBegin();
25  void OnJumpEnd();
26 
27 protected:
28  typedef std::vector<float> ZoomSequence;
29 
30  void DrawBackground(const ViewArea&, float);
31  void DrawTrack(const Sensor&, const ViewArea&, const Track&);
32  void DrawTargetMarker(const Vector&, float);
33 
34  void Animate();
35  void PrepareAnimation(const ZoomSequence&);
36 
37 protected:
38  const float innerSphere;
39  const float outerSphere;
40  float sphereZoom;
41  float radarTime;
43 
45  {
46  float sphereZoom;
47  float duration;
48  };
49  typedef std::queue<AnimationItem> AnimationCollection;
54 };
55 
56 } // namespace Radar
57 
58 #endif