Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include "mesh.h"
#include "mesh_xml.h"
#include "aux_texture.h"
#include "aux_logo.h"
#include "vegastrike.h"
#include <iostream>
#include <fstream>
#include <expat.h>
#include <float.h>
#include <assert.h>
#include "ani_texture.h"
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <values.h>
#include "xml_support.h"
#include "vec.h"
#include "config_xml.h"
#include "vs_globals.h"
#include "cmd/script/mission.h"
#include "cmd/script/flightgroup.h"
#include "hashtable.h"
Go to the source code of this file.
Functions | |
static float | max (float x, float y) |
static float | min (float x, float y) |
enum BLENDFUNC | parse_alpha (const char *tmp) |
bool | shouldreflect (string r) |
void | updateMax (Vector &mn, Vector &mx, const GFXVertex &ver) |
void | LaunchConverter (const char *input, const char *output, const char *args="obc") |
bool | isBFXM (VSFile &f) |
void | CopyFile (VSFile &src, VSFile &dst) |
static void | SumNormal (vector< GFXVertex > &vertices, int i1, int i2, int i3, vector< float > &weights) |
static void | SumLineNormal (vector< GFXVertex > &vertices, int i1, int i2, vector< float > &weights) |
static void | SumNormals (vector< GFXVertex > &vertices, vector< int > &indices, size_t begin, size_t end, POLYTYPE polytype, vector< float > &weights) |
static void | ClearTangents (vector< GFXVertex > &vertices) |
static float | faceTSPolarity (const Vector &T, const Vector &B, const Vector &N) |
static float | faceTSWeight (vector< GFXVertex > &vertices, int i1, int i2, int i3) |
static void | computeTangentspace (vector< GFXVertex > &vertices, int i1, int i2, int i3, Vector &T, Vector &B, Vector &N) |
static void | SumTangent (vector< GFXVertex > &vertices, int i1, int i2, int i3, vector< float > &weights) |
static void | SumTangents (vector< GFXVertex > &vertices, vector< int > &indices, size_t begin, size_t end, POLYTYPE polytype, vector< float > &weights) |
static void | NormalizeTangents (vector< GFXVertex > &vertices, vector< float > &weights) |
static void | NormalizeNormals (vector< GFXVertex > &vertices, vector< float > &weights) |
Variables | |
const bool | USE_RECALC_NORM = true |
const bool | FLAT_SHADE = true |
Hashtable< std::string, std::vector< Mesh * > , MESH_HASTHABLE_SIZE > | bfxmHashTable |
|
static |
Definition at line 1510 of file mesh_xml.cpp.
References Vector.
Referenced by Mesh::PostProcessLoading().
|
static |
Definition at line 1541 of file mesh_xml.cpp.
References GFXVertex::s, GFXVertex::t, t1(), Vector, GFXVertex::x, GFXVertex::y, and GFXVertex::z.
Referenced by SumTangent().
Definition at line 1176 of file mesh_xml.cpp.
References VSFileSystem::VSFile::Read(), sizeof(), and VSFileSystem::VSFile::Write().
Definition at line 1516 of file mesh_xml.cpp.
Referenced by SumTangent().
Definition at line 1524 of file mesh_xml.cpp.
References Vector, GFXVertex::x, GFXVertex::y, and GFXVertex::z.
Referenced by SumTangent().
Definition at line 1165 of file mesh_xml.cpp.
References VSFileSystem::VSFile::GoTo(), and VSFileSystem::VSFile::Read().
void LaunchConverter | ( | const char * | input, |
const char * | output, | ||
const char * | args = "obc" |
||
) |
Definition at line 1128 of file mesh_xml.cpp.
References VSFileSystem::datadir, and VSFileSystem::vs_fprintf().
Definition at line 35 of file mesh_xml.cpp.
Referenced by updateMax().
Definition at line 45 of file mesh_xml.cpp.
Referenced by updateMax().
Definition at line 1676 of file mesh_xml.cpp.
References GFXVertex::GetNormal(), GFXVertex::i, GFXVertex::j, GFXVertex::k, UniverseUtil::sqrt(), and v.
Referenced by Mesh::PostProcessLoading().
Definition at line 1654 of file mesh_xml.cpp.
References GFXVertex::tw, GFXVertex::tx, GFXVertex::ty, GFXVertex::tz, v, and Vector.
Referenced by Mesh::PostProcessLoading().
enum BLENDFUNC parse_alpha | ( | const char * | tmp) |
Definition at line 146 of file mesh_xml.cpp.
References CONSTALPHA, CONSTCOLOR, DESTALPHA, DESTCOLOR, INVCONSTALPHA, INVCONSTCOLOR, INVDESTALPHA, INVDESTCOLOR, INVSRCALPHA, INVSRCCOLOR, ONE, SRCALPHA, SRCALPHASAT, SRCCOLOR, and ZERO.
Referenced by Mission::call_unit_launch(), and parse_dual_alpha().
bool shouldreflect | ( | string | r) |
|
static |
Definition at line 1428 of file mesh_xml.cpp.
References Vector, x, y, and z.
Referenced by SumNormals().
|
static |
Definition at line 1398 of file mesh_xml.cpp.
References Vector, x, y, and z.
Referenced by SumNormals().
|
static |
Definition at line 1448 of file mesh_xml.cpp.
References GFXLINE, GFXLINESTRIP, GFXPOINT, GFXPOLY, GFXQUAD, GFXQUADSTRIP, GFXTRI, GFXTRIFAN, GFXTRISTRIP, SumLineNormal(), and SumNormal().
Referenced by Mesh::PostProcessLoading().
|
static |
Definition at line 1572 of file mesh_xml.cpp.
References computeTangentspace(), faceTSPolarity(), faceTSWeight(), GFXVertex::tw, GFXVertex::tx, GFXVertex::ty, GFXVertex::tz, and Vector.
Referenced by SumTangents().
|
static |
Definition at line 1604 of file mesh_xml.cpp.
References GFXLINE, GFXLINESTRIP, GFXPOINT, GFXPOLY, GFXQUAD, GFXQUADSTRIP, GFXTRI, GFXTRIFAN, GFXTRISTRIP, and SumTangent().
Referenced by Mesh::PostProcessLoading().
Definition at line 1116 of file mesh_xml.cpp.
References max(), min(), GFXVertex::x, GFXVertex::y, and GFXVertex::z.
Referenced by Mesh::Fork(), and Mesh::PostProcessLoading().
Hashtable< std::string, std::vector< Mesh* >, MESH_HASTHABLE_SIZE > bfxmHashTable |
Definition at line 1256 of file mesh_xml.cpp.
Referenced by Mesh::LoadMeshes().
const bool FLAT_SHADE = true |
Definition at line 1237 of file mesh_xml.cpp.
Referenced by Mesh::PostProcessLoading().
const bool USE_RECALC_NORM = true |
Definition at line 1236 of file mesh_xml.cpp.