Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Explosion.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: Explosion.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Explosion Sprite class
13 */
14 
15 #ifndef Explosion_h
16 #define Explosion_h
17 
18 #include "Types.h"
19 #include "Geometry.h"
20 #include "SimObject.h"
21 #include "Sound.h"
22 
23 // +--------------------------------------------------------------------+
24 
25 class Solid;
26 class Particles;
27 class System;
28 
29 // +--------------------------------------------------------------------+
30 
31 class Explosion : public SimObject,
32 public SimObserver
33 {
34 public:
35  static const char* TYPENAME() { return "Explosion"; }
36 
37  enum Type { SHIELD_FLASH = 1,
42  HULL_FIRE = 6,
45  SMALL_FIRE = 9,
52  };
53 
54  Explosion(int type, const Vec3& pos, const Vec3& vel,
55  float exp_scale, float part_scale,
56  SimRegion* rgn=0, SimObject* source=0);
57  virtual ~Explosion();
58 
59  static void Initialize();
60  static void Close();
61 
62  virtual void ExecFrame(double seconds);
64 
65  virtual void Activate(Scene& scene);
66  virtual void Deactivate(Scene& scene);
67 
68  virtual bool Update(SimObject* obj);
69  virtual const char* GetObserverName() const;
70 
71 protected:
72  int type;
74 
75  float scale;
76  float scale1;
77  float scale2;
78 
81 };
82 
83 #endif Explosion_h
84