Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Trail.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: Trail.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Missile Trail (Graphic) class
13 */
14 
15 #ifndef Trail_h
16 #define Trail_h
17 
18 #include "Types.h"
19 #include "Geometry.h"
20 #include "Polygon.h"
21 #include "SimObject.h"
22 #include "Graphic.h"
23 
24 // +--------------------------------------------------------------------+
25 
26 class Trail : public Graphic
27 {
28 public:
29  Trail(Bitmap* tex, int n=512);
30  virtual ~Trail();
31 
32  virtual void UpdateVerts(const Point& cam_pos);
33  virtual void Render(Video* video, DWORD flags);
34  virtual void AddPoint(const Point& v);
35  virtual double AverageLength();
36 
37  virtual void SetWidth(double w) { width = w; }
38  virtual void SetDim(int d) { dim = d; }
39 
40 protected:
41  int ntrail;
42  int maxtrail;
44 
45  double length;
46  double width;
47  int dim;
48 
49  int npolys, nverts;
54 
55  double length0, length1;
57 };
58 
59 #endif Trail_h
60