Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
BIH Struct Reference

#include <bih.hpp>

Classes

struct  mesh
 
struct  node
 
struct  tri
 
struct  tribb
 

Public Types

enum  { MESH_NOCLIP = 1<<0, MESH_ALPHA = 1<<1, MESH_CULLFACE = 1<<2 }
 

Public Member Functions

 BIH (vector< mesh > &buildmeshes)
 
 ~BIH ()
 
void build (mesh &m, ushort *indices, int numindices, const ivec &vmin, const ivec &vmax)
 
bool traverse (const vec &o, const vec &ray, float maxdist, float &dist, int mode)
 
bool traverse (const mesh &m, const vec &o, const vec &ray, const vec &invray, float maxdist, float &dist, int mode, node *curnode, float tmin, float tmax)
 
bool triintersect (const mesh &m, int tidx, const vec &mo, const vec &mray, float maxdist, float &dist, int mode)
 
void preload ()
 

Public Attributes

meshmeshes
 
int nummeshes
 
nodenodes
 
int numnodes
 
tribbtribbs
 
int numtris
 
vec bbmin
 
vec bbmax
 
vec center
 
float radius
 
float entradius
 

Class Documentation

struct BIH::tri
Class Members
ushort vert[3]

Member Enumeration Documentation

anonymous enum
Enumerator
MESH_NOCLIP 
MESH_ALPHA 
MESH_CULLFACE 

Constructor & Destructor Documentation

BIH::BIH ( vector< mesh > &  buildmeshes)
BIH::~BIH ( )

References meshes, nodes, and tribbs.

Member Function Documentation

void BIH::build ( mesh m,
ushort indices,
int  numindices,
const ivec vmin,
const ivec vmax 
)
void BIH::preload ( )
bool BIH::traverse ( const vec o,
const vec ray,
float  maxdist,
float &  dist,
int  mode 
)
inline
bool BIH::traverse ( const mesh m,
const vec o,
const vec ray,
const vec invray,
float  maxdist,
float &  dist,
int  mode,
node curnode,
float  tmin,
float  tmax 
)
inline
bool BIH::triintersect ( const mesh m,
int  tidx,
const vec mo,
const vec mray,
float  maxdist,
float &  dist,
int  mode 
)

Member Data Documentation

vec BIH::bbmax

Referenced by BIH().

vec BIH::bbmin

Referenced by BIH().

vec BIH::center

Referenced by BIH().

float BIH::entradius

Referenced by BIH(), and mmintersect().

mesh* BIH::meshes

Referenced by BIH(), traverse(), and ~BIH().

node* BIH::nodes

Referenced by BIH(), and ~BIH().

int BIH::nummeshes

Referenced by BIH(), and traverse().

int BIH::numnodes

Referenced by BIH().

int BIH::numtris

Referenced by BIH().

float BIH::radius

Referenced by BIH().

tribb* BIH::tribbs

Referenced by BIH(), and ~BIH().


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