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.cpp File Reference
#include <memory.h>
#include "animation.h"
#include "aux_logo.h"
#include "mesh.h"
#include "matrix.h"
#include "camera.h"
#include <assert.h>
#include <math.h>
#include "cmd/nebula_generic.h"
#include <list>
#include <string>
#include <fstream>
#include "vsfilesystem.h"
#include "lin_time.h"
#include "gfxlib.h"
#include "vs_globals.h"
#include "configxml.h"
#include "hashtable.h"
#include "vegastrike.h"
#include "sphere.h"
#include "mesh_xml.h"
#include "gfx/technique.h"
#include <float.h>
#include <algorithm>

Go to the source code of this file.

Macros

#define LOD_HYSTHERESIS_DIVIDER   (20)
 
#define LOD_HYSTHERESIS_MAXENLARGEMENT_FACTOR   (1.1)
 

Enumerations

enum  EX_EXCLUSION { EX_X, EX_Y, EX_Z }
 

Functions

bool OpenWithin (const QVector &query, const Vector &mn, const Vector &mx, const float err, enum EX_EXCLUSION excludeWhich)
 

Variables

Vector mouseline
 
Hashtable< std::string,
std::vector< Mesh * >
, MESH_HASTHABLE_SIZE
bfxmHashTable
 
float const ooPI = 1.00F/3.1415926535F
 

Macro Definition Documentation

#define LOD_HYSTHERESIS_DIVIDER   (20)

Definition at line 49 of file mesh.cpp.

Referenced by Mesh::getLOD().

#define LOD_HYSTHERESIS_MAXENLARGEMENT_FACTOR   (1.1)

Definition at line 50 of file mesh.cpp.

Referenced by Mesh::getLOD().

Enumeration Type Documentation

Enumerator
EX_X 
EX_Y 
EX_Z 

Definition at line 365 of file mesh.cpp.

365 {EX_X, EX_Y, EX_Z};

Function Documentation

bool OpenWithin ( const QVector query,
const Vector mn,
const Vector mx,
const float  err,
enum EX_EXCLUSION  excludeWhich 
)
inline

Definition at line 366 of file mesh.cpp.

References EX_X, EX_Y, and EX_Z.

371 {
372  switch (excludeWhich)
373  {
374  case EX_X:
375  return (query.j >= mn.j-err) && (query.k >= mn.k-err) && (query.j <= mx.j+err) && (query.k <= mx.k+err);
376 
377  case EX_Y:
378  return (query.i >= mn.i-err) && (query.k >= mn.k-err) && (query.i <= mx.i+err) && (query.k <= mx.k+err);
379 
380  case EX_Z:
381  default:
382  return (query.j >= mn.j-err) && (query.i >= mn.i-err) && (query.j <= mx.j+err) && (query.i <= mx.i+err);
383  }
384 }

Variable Documentation

Hashtable< std::string, std::vector< Mesh * >, MESH_HASTHABLE_SIZE > bfxmHashTable

Definition at line 171 of file mesh.cpp.

Referenced by Mesh::LoadMeshes().

Vector mouseline

Definition at line 55 of file mesh.cpp.

Referenced by ClickList::queryShip().

float const ooPI = 1.00F/3.1415926535F

Definition at line 263 of file mesh.cpp.