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
mesh_xml.h
Go to the documentation of this file.
1 #ifndef __MESH_XML_H__INCLUDED_
2 #define __MESH_XML_H__INCLUDED_
3 
4 struct MeshXML
5 {
6  enum Names
7  {
8  //elements
22  LOD,
23  TRI,
32  REF,
33  //attributes
45  RED,
48  X,
49  Y,
50  Z,
51  I,
52  J,
53  K,
54  S,
55  T,
73  };
76  {
77  P_X=0x1,
78  P_Y=0x2,
79  P_Z=0x4,
80  P_I=0x8,
81  P_J=0x10,
82  P_K=0x20
83  };
86  {
87  V_POINT=0x1,
88  V_S =0x2,
89  V_T =0x4
90  };
92  enum LogoState
93  {
94  V_TYPE =0x1,
95  V_ROTATE=0x2,
96  V_SIZE =0x4,
97  V_OFFSET=0x8,
98  V_REF =0x10
99  };
101  struct ZeLogo
102  {
104  unsigned int type;
106  float rotate;
108  float size;
110  float offset;
112  vector< int > refpnt;
114  vector< float >refweight;
115  };
116  struct ZeTexture
117  {
118  string decal_name;
119  string alpha_name;
121  };
122  class Flightgroup *fg;
123  static const EnumMap::Pair element_names[];
124  static const EnumMap::Pair attribute_names[];
125  static const EnumMap element_map;
126  static const EnumMap attribute_map;
127 
129  : sharevert(false),
130  usenormals(false),
131  usetangents(false),
132  reverse(false),
133  force_texture(false),
134  load_stage(0),
135  point_state(0),
136  vertex_state(0),
137  recalc_norm(false),
138  num_vertices(0),
139  tstrcnt(0),
140  tfancnt(0),
141  qstrcnt(0),
142  lstrcnt(0),
143  faction(0),
144  mesh(0)
145  {
146  }
147 
149  vector< ZeLogo >logos;
150  vector< Names > state_stack;
151  bool sharevert;
154  bool reverse;
161  vector< ZeTexture >decals;
162  string technique;
165  vector< GFXVertex >vertices;
167  vector< int >vertexcount;
168  vector< GFXVertex >lines;
169  vector< GFXVertex >tris;
170  vector< GFXVertex >quads;
171  vector< vector< GFXVertex > >linestrips;
172  vector< vector< GFXVertex > >tristrips;
173  vector< vector< GFXVertex > >trifans;
174  vector< vector< GFXVertex > >quadstrips;
175  int tstrcnt;
176  int tfancnt;
177  int qstrcnt;
178  int lstrcnt;
179  vector< int > lineind;
180  vector< int > nrmllinstrip;
181  vector< int > linestripind;
183  vector< int > triind;
184  vector< int > nrmltristrip;
185  vector< int > tristripind;
186  vector< int > nrmltrifan;
187  vector< int > trifanind;
188  vector< int > nrmlquadstrip;
189  vector< int > quadstripind;
190  vector< int > quadind;
191  vector< int > trishade;
192  vector< int > quadshade;
193  vector< int > *active_shade;
194  vector< GFXVertex > *active_list;
195  vector< int > *active_ind;
196  vector< Mesh* >lod;
197  vector< float >lodsize;
200  int faction;
202 };
203 
204 #endif
205 
206