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
MeshXML Struct Reference

#include <mesh_xml.h>

Classes

struct  ZeLogo
 To save the constructing of a logo. More...
 
struct  ZeTexture
 

Public Types

enum  Names {
  UNKNOWN, MATERIAL, AMBIENT, DIFFUSE,
  SPECULAR, EMISSIVE, MESH, POINTS,
  POINT, LOCATION, NORMAL, POLYGONS,
  LINE, LOD, TRI, QUAD,
  LODFILE, LINESTRIP, TRISTRIP, TRIFAN,
  QUADSTRIP, VERTEX, LOGO, REF,
  POWER, REFLECT, CULLFACE, LIGHTINGON,
  FLATSHADE, TEXTURE, TECHNIQUE, FORCETEXTURE,
  ALPHAMAP, SHAREVERT, ALPHA, RED,
  GREEN, BLUE, X, Y,
  Z, I, J, K,
  S, T, SCALE, BLENDMODE,
  TYPE, ROTATE, WEIGHT, SIZE,
  OFFSET, ANIMATEDTEXTURE, USENORMALS, USETANGENTS,
  REVERSE, POLYGONOFFSET, DETAILTEXTURE, DETAILPLANE,
  FRAMESPERSECOND, STARTFRAME, ALPHATEST
}
 
enum  PointState {
  P_X =0x1, P_Y =0x2, P_Z =0x4, P_I =0x8,
  P_J =0x10, P_K =0x20
}
 Saves which attributes of vertex have been set in XML file. More...
 
enum  VertexState { V_POINT =0x1, V_S =0x2, V_T =0x4 }
 Saves which attributes of vertex have been set in Polygon for XML file. More...
 
enum  LogoState {
  V_TYPE =0x1, V_ROTATE =0x2, V_SIZE =0x4, V_OFFSET =0x8,
  V_REF =0x10
}
 Save if various logo values have been set. More...
 

Public Member Functions

 MeshXML ()
 

Public Attributes

class Flightgroupfg
 
vector< ZeLogologos
 All logos on this unit. More...
 
vector< Namesstate_stack
 
bool sharevert
 
bool usenormals
 
bool usetangents
 
bool reverse
 
bool force_texture
 
int load_stage
 
int point_state
 
int vertex_state
 
Vector scale
 
Vector lodscale
 
vector< ZeTexturedecals
 
string technique
 
bool recalc_norm
 
int num_vertices
 
vector< GFXVertexvertices
 
vector< intvertexcount
 keep count to make averaging easy More...
 
vector< GFXVertexlines
 
vector< GFXVertextris
 
vector< GFXVertexquads
 
vector< vector< GFXVertex > > linestrips
 
vector< vector< GFXVertex > > tristrips
 
vector< vector< GFXVertex > > trifans
 
vector< vector< GFXVertex > > quadstrips
 
int tstrcnt
 
int tfancnt
 
int qstrcnt
 
int lstrcnt
 
vector< intlineind
 
vector< intnrmllinstrip
 
vector< intlinestripind
 
vector< inttriind
 for possible normal computation More...
 
vector< intnrmltristrip
 
vector< inttristripind
 
vector< intnrmltrifan
 
vector< inttrifanind
 
vector< intnrmlquadstrip
 
vector< intquadstripind
 
vector< intquadind
 
vector< inttrishade
 
vector< intquadshade
 
vector< int > * active_shade
 
vector< GFXVertex > * active_list
 
vector< int > * active_ind
 
vector< Mesh * > lod
 
vector< floatlodsize
 
GFXVertex vertex
 
GFXMaterial material
 
int faction
 
Meshmesh
 

Static Public Attributes

static const EnumMap::Pair element_names []
 
static const EnumMap::Pair attribute_names []
 
static const EnumMap element_map
 
static const EnumMap attribute_map
 

Detailed Description

Definition at line 4 of file mesh_xml.h.

Member Enumeration Documentation

Save if various logo values have been set.

Enumerator
V_TYPE 
V_ROTATE 
V_SIZE 
V_OFFSET 
V_REF 

Definition at line 92 of file mesh_xml.h.

93  {
94  V_TYPE =0x1,
95  V_ROTATE=0x2,
96  V_SIZE =0x4,
97  V_OFFSET=0x8,
98  V_REF =0x10
99  };
Enumerator
UNKNOWN 
MATERIAL 
AMBIENT 
DIFFUSE 
SPECULAR 
EMISSIVE 
MESH 
POINTS 
POINT 
LOCATION 
NORMAL 
POLYGONS 
LINE 
LOD 
TRI 
QUAD 
LODFILE 
LINESTRIP 
TRISTRIP 
TRIFAN 
QUADSTRIP 
VERTEX 
LOGO 
REF 
POWER 
REFLECT 
CULLFACE 
LIGHTINGON 
FLATSHADE 
TEXTURE 
TECHNIQUE 
FORCETEXTURE 
ALPHAMAP 
SHAREVERT 
ALPHA 
RED 
GREEN 
BLUE 
X 
Y 
Z 
I 
J 
K 
S 
T 
SCALE 
BLENDMODE 
TYPE 
ROTATE 
WEIGHT 
SIZE 
OFFSET 
ANIMATEDTEXTURE 
USENORMALS 
USETANGENTS 
REVERSE 
POLYGONOFFSET 
DETAILTEXTURE 
DETAILPLANE 
FRAMESPERSECOND 
STARTFRAME 
ALPHATEST 

Definition at line 6 of file mesh_xml.h.

7  {
8  //elements
9  UNKNOWN,
10  MATERIAL,
11  AMBIENT,
12  DIFFUSE,
13  SPECULAR,
14  EMISSIVE,
15  MESH,
16  POINTS,
17  POINT,
18  LOCATION,
19  NORMAL,
20  POLYGONS,
21  LINE,
22  LOD,
23  TRI,
24  QUAD,
25  LODFILE,
26  LINESTRIP,
27  TRISTRIP,
28  TRIFAN,
29  QUADSTRIP,
30  VERTEX,
31  LOGO,
32  REF,
33  //attributes
34  POWER,
35  REFLECT,
36  CULLFACE,
37  LIGHTINGON,
38  FLATSHADE,
39  TEXTURE,
40  TECHNIQUE,
42  ALPHAMAP,
43  SHAREVERT,
44  ALPHA,
45  RED,
46  GREEN,
47  BLUE,
48  X,
49  Y,
50  Z,
51  I,
52  J,
53  K,
54  S,
55  T,
56  SCALE,
57  BLENDMODE,
58  TYPE,
59  ROTATE,
60  WEIGHT,
61  SIZE,
62  OFFSET,
64  USENORMALS,
66  REVERSE,
71  STARTFRAME,
72  ALPHATEST
73  };

Saves which attributes of vertex have been set in XML file.

Enumerator
P_X 
P_Y 
P_Z 
P_I 
P_J 
P_K 

Definition at line 75 of file mesh_xml.h.

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  };

Saves which attributes of vertex have been set in Polygon for XML file.

Enumerator
V_POINT 
V_S 
V_T 

Definition at line 85 of file mesh_xml.h.

86  {
87  V_POINT=0x1,
88  V_S =0x2,
89  V_T =0x4
90  };

Constructor & Destructor Documentation

MeshXML::MeshXML ( )
inline

Definition at line 128 of file mesh_xml.h.

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  }

Member Data Documentation

vector< int >* MeshXML::active_ind

Definition at line 195 of file mesh_xml.h.

vector< GFXVertex >* MeshXML::active_list

Definition at line 194 of file mesh_xml.h.

vector< int >* MeshXML::active_shade

Definition at line 193 of file mesh_xml.h.

const EnumMap MeshXML::attribute_map
static

Definition at line 126 of file mesh_xml.h.

const EnumMap::Pair MeshXML::attribute_names
static

Definition at line 124 of file mesh_xml.h.

vector< ZeTexture > MeshXML::decals

Definition at line 161 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

const EnumMap MeshXML::element_map
static

Definition at line 125 of file mesh_xml.h.

const EnumMap::Pair MeshXML::element_names
static
Initial value:
= {
EnumMap::Pair( "UNKNOWN", MeshXML::UNKNOWN ),
EnumMap::Pair( "Material", MeshXML::MATERIAL ),
EnumMap::Pair( "LOD", MeshXML::LOD ),
EnumMap::Pair( "Ambient", MeshXML::AMBIENT ),
EnumMap::Pair( "Diffuse", MeshXML::DIFFUSE ),
EnumMap::Pair( "Specular", MeshXML::SPECULAR ),
EnumMap::Pair( "Emissive", MeshXML::EMISSIVE ),
EnumMap::Pair( "Mesh", MeshXML::MESH ),
EnumMap::Pair( "Points", MeshXML::POINTS ),
EnumMap::Pair( "Point", MeshXML::POINT ),
EnumMap::Pair( "Location", MeshXML::LOCATION ),
EnumMap::Pair( "Normal", MeshXML::NORMAL ),
EnumMap::Pair( "Polygons", MeshXML::POLYGONS ),
EnumMap::Pair( "Line", MeshXML::LINE ),
EnumMap::Pair( "Tri", MeshXML::TRI ),
EnumMap::Pair( "Quad", MeshXML::QUAD ),
EnumMap::Pair( "Linestrip", MeshXML::LINESTRIP ),
EnumMap::Pair( "Tristrip", MeshXML::TRISTRIP ),
EnumMap::Pair( "Trifan", MeshXML::TRIFAN ),
EnumMap::Pair( "Quadstrip", MeshXML::QUADSTRIP ),
EnumMap::Pair( "Vertex", MeshXML::VERTEX ),
EnumMap::Pair( "Logo", MeshXML::LOGO ),
EnumMap::Pair( "Ref", MeshXML::REF ),
EnumMap::Pair( "DetailPlane", MeshXML::DETAILPLANE )
}

Definition at line 123 of file mesh_xml.h.

int MeshXML::faction

Definition at line 200 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

class Flightgroup* MeshXML::fg

Definition at line 122 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

bool MeshXML::force_texture

Definition at line 155 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes().

vector< int > MeshXML::lineind

Definition at line 179 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

vector< GFXVertex > MeshXML::lines

Definition at line 168 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

vector< int > MeshXML::linestripind

Definition at line 181 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

vector< vector< GFXVertex > > MeshXML::linestrips

Definition at line 171 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

int MeshXML::load_stage

Definition at line 156 of file mesh_xml.h.

vector< Mesh* > MeshXML::lod

Definition at line 196 of file mesh_xml.h.

Vector MeshXML::lodscale

Definition at line 160 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes().

vector< float > MeshXML::lodsize

Definition at line 197 of file mesh_xml.h.

vector< ZeLogo > MeshXML::logos

All logos on this unit.

Definition at line 149 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes().

int MeshXML::lstrcnt

Definition at line 178 of file mesh_xml.h.

GFXMaterial MeshXML::material

Definition at line 199 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

Mesh* MeshXML::mesh

Definition at line 201 of file mesh_xml.h.

vector< int > MeshXML::nrmllinstrip

Definition at line 180 of file mesh_xml.h.

vector< int > MeshXML::nrmlquadstrip

Definition at line 188 of file mesh_xml.h.

vector< int > MeshXML::nrmltrifan

Definition at line 186 of file mesh_xml.h.

vector< int > MeshXML::nrmltristrip

Definition at line 184 of file mesh_xml.h.

int MeshXML::num_vertices

Definition at line 164 of file mesh_xml.h.

int MeshXML::point_state

Definition at line 157 of file mesh_xml.h.

int MeshXML::qstrcnt

Definition at line 177 of file mesh_xml.h.

vector< int > MeshXML::quadind

Definition at line 190 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

vector< GFXVertex > MeshXML::quads

Definition at line 170 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

vector< int > MeshXML::quadshade

Definition at line 192 of file mesh_xml.h.

Referenced by Mesh::PostProcessLoading().

vector< int > MeshXML::quadstripind

Definition at line 189 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

vector< vector< GFXVertex > > MeshXML::quadstrips

Definition at line 174 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

bool MeshXML::recalc_norm

Definition at line 163 of file mesh_xml.h.

bool MeshXML::reverse

Definition at line 154 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes().

Vector MeshXML::scale

Definition at line 159 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

bool MeshXML::sharevert

Definition at line 151 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

vector< Names > MeshXML::state_stack

Definition at line 150 of file mesh_xml.h.

string MeshXML::technique

Definition at line 162 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

int MeshXML::tfancnt

Definition at line 176 of file mesh_xml.h.

vector< int > MeshXML::trifanind

Definition at line 187 of file mesh_xml.h.

Referenced by Mesh::PostProcessLoading().

vector< vector< GFXVertex > > MeshXML::trifans

Definition at line 173 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

vector< int > MeshXML::triind

for possible normal computation

Definition at line 183 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

vector< GFXVertex > MeshXML::tris

Definition at line 169 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

vector< int > MeshXML::trishade

Definition at line 191 of file mesh_xml.h.

Referenced by Mesh::PostProcessLoading().

vector< int > MeshXML::tristripind

Definition at line 185 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

vector< vector< GFXVertex > > MeshXML::tristrips

Definition at line 172 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

int MeshXML::tstrcnt

Definition at line 175 of file mesh_xml.h.

bool MeshXML::usenormals

Definition at line 152 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().

bool MeshXML::usetangents

Definition at line 153 of file mesh_xml.h.

Referenced by Mesh::PostProcessLoading().

GFXVertex MeshXML::vertex

Definition at line 198 of file mesh_xml.h.

int MeshXML::vertex_state

Definition at line 158 of file mesh_xml.h.

vector< int > MeshXML::vertexcount

keep count to make averaging easy

Definition at line 167 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes().

vector< GFXVertex > MeshXML::vertices

Definition at line 165 of file mesh_xml.h.

Referenced by Mesh::LoadMeshes(), and Mesh::PostProcessLoading().


The documentation for this struct was generated from the following files: