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
halo.h
Go to the documentation of this file.
1 #ifndef __HALO_H
2 #define __HALO_H
3 
4 #include "gfxlib.h"
5 #include "vec.h"
6 #include "quaternion.h"
7 
8 #define TranslucentWhite ( GFXColor( 1, 1, 1, .5 ) )
9 #define ZeroQvector ( QVector( 0, 0, 0 ) )
10 
11 class Halo
12 {
13  QVector position;
14  float sizex;
15  float sizey;
16  int decal;
17  int quadnum;
18 public: ~Halo();
19  Halo( const char *texture,
20  const GFXColor &col = TranslucentWhite,
21  const QVector &pos = ZeroQvector,
22  float sizx = 1,
23  float sizy = 1 );
24  void Draw( const Transformation &quat = identity_transformation, const Matrix &m = identity_matrix, float alpha = -1 );
25  static void ProcessDrawQueue();
26  void SetDimensions( float wid, float hei )
27  {
28  sizex = wid;
29  sizey = hei;
30  }
31  void SetPosition( const QVector &k )
32  {
33  position = k;
34  }
36  {
37  return position;
38  }
39  void SetColor( const GFXColor &col );
40  void GetDimensions( float &wid, float &hei )
41  {
42  wid = sizex;
43  hei = sizey;
44  }
45 };
46 
47 #endif
48