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
aux_logo.h
Go to the documentation of this file.
1 /*
2  * Vega Strike
3  * Copyright (C) 2001-2002 Daniel Horn
4  *
5  * http://vegastrike.sourceforge.net/
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */
21 #ifndef LOGO_H_
22 #define LOGO_H_
23 
24 #include "matrix.h"
25 #include "gfxlib.h"
26 #include "hashtable.h"
27 #include <vector>
28 
29 //struct glVertex;
30 class Mesh;
31 class Texture;
32 class Vector;
33 class Logo
34 {
35  int numlogos;
36 //glVertex **LogoCorner;
37  GFXVertexList *vlist;
38  Texture *Decal;
39  static Hashtable< int, Logo, 257 >decalHash;
40  Logo() {}
41 protected:
42  friend class Mesh;
43  int refcount; //number of references to draw_queue
44  Logo *owner_of_draw_queue; //owner of the draw_queue
45  vector< DrawContext > *draw_queue;
47  void ProcessDrawQueue();
48 public: Logo( int numberlogos,
49  Vector *center,
50  Vector *normal,
51  float *sizes,
52  float *rotations,
53  float offset,
54  Texture *Dec,
55  Vector *Ref );
56  Logo( const Logo &rval )
57  {
58  *this = rval;
59  }
60  ~Logo();
61  void SetDecal( Texture *decal );
62  void Draw( const Matrix &m );
63 };
64 #endif
65