Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Bolt.h
Go to the documentation of this file.
1 /* Project nGenEx
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: nGenEx.lib
6  FILE: Bolt.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  3D Bolt (Polygon) Object
13 */
14 
15 #ifndef Bolt_h
16 #define Bolt_h
17 
18 #include "Graphic.h"
19 #include "Polygon.h"
20 
21 // +--------------------------------------------------------------------+
22 
23 class Bolt : public Graphic
24 {
25 public:
26  static const char* TYPENAME() { return "Bolt"; }
27 
28  Bolt(double len=16, double wid=1, Bitmap* tex=0, int share=0);
29  virtual ~Bolt();
30 
31  // operations
32  virtual void Render(Video* video, DWORD flags);
33  virtual void Update();
34 
35  // accessors / mutators
36  virtual void SetOrientation(const Matrix& o);
37  void SetDirection(const Point& v);
38  void SetEndPoints(const Point& from, const Point& to);
39  void SetTextureOffset(double from, double to);
40 
41  virtual void TranslateBy(const Point& ref);
42 
43  double Shade() const { return shade; }
44  void SetShade(double s) { shade = s; }
45  virtual bool IsBolt() const { return true; }
46 
47 protected:
48  double length;
49  double width;
50  double shade;
51 
56  int shared;
57 
60 };
61 
62 // +--------------------------------------------------------------------+
63 
64 #endif Bolt_h
65