UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
r_model_brush.h File Reference

brush model loading More...

Go to the source code of this file.

Data Structures

struct  mBspVertex_s
 
struct  mBspHeader_s
 
struct  mBspEdge_s
 
struct  mBspTexInfo_s
 
struct  mBspFlare_s
 
struct  mBspSurface_s
 
struct  mBspSurfaces_s
 surfaces are assigned to arrays based on their primary rendering type and then sorted by world texture index to reduce binds More...
 
struct  mBspNode_s
 
struct  mBspLeaf_s
 
struct  mBspModel_s
 brush model More...
 

Macros

#define MSURF_PLANEBACK   1
 
#define MSURF_LIGHTMAP   2
 
#define opaque_surfaces   sorted_surfaces[S_OPAQUE]
 
#define opaque_warp_surfaces   sorted_surfaces[S_OPAQUE_WARP]
 
#define alpha_test_surfaces   sorted_surfaces[S_ALPHA_TEST]
 
#define blend_surfaces   sorted_surfaces[S_BLEND]
 
#define blend_warp_surfaces   sorted_surfaces[S_BLEND_WARP]
 
#define material_surfaces   sorted_surfaces[S_MATERIAL]
 
#define flare_surfaces   sorted_surfaces[S_FLARE]
 
#define R_AddSurfaceToArray(array, surf)   (array)->surfaces[(array)->count++] = surf
 
#define CONTENTS_NODE   -1
 
#define CONTENTS_PATHFINDING_NODE   -2
 

Typedefs

typedef struct mBspVertex_s mBspVertex_t
 
typedef struct mBspHeader_s mBspHeader_t
 
typedef struct mBspEdge_s mBspEdge_t
 
typedef struct mBspTexInfo_s mBspTexInfo_t
 
typedef struct mBspFlare_s mBspFlare_t
 
typedef struct mBspSurface_s mBspSurface_t
 
typedef struct mBspSurfaces_s mBspSurfaces_t
 surfaces are assigned to arrays based on their primary rendering type and then sorted by world texture index to reduce binds More...
 
typedef struct mBspNode_s mBspNode_t
 
typedef struct mBspLeaf_s mBspLeaf_t
 
typedef struct mBspModel_s mBspModel_t
 brush model More...
 

Enumerations

enum  surfaceArrayType_t {
  S_OPAQUE, S_OPAQUE_WARP, S_ALPHA_TEST, S_BLEND,
  S_BLEND_WARP, S_MATERIAL, S_FLARE, NUM_SURFACES_ARRAYS
}
 

Detailed Description

brush model loading

Definition in file r_model_brush.h.

Macro Definition Documentation

#define alpha_test_surfaces   sorted_surfaces[S_ALPHA_TEST]

Definition at line 157 of file r_model_brush.h.

#define blend_surfaces   sorted_surfaces[S_BLEND]

Definition at line 158 of file r_model_brush.h.

#define blend_warp_surfaces   sorted_surfaces[S_BLEND_WARP]

Definition at line 159 of file r_model_brush.h.

#define CONTENTS_NODE   -1
#define CONTENTS_PATHFINDING_NODE   -2

Definition at line 167 of file r_model_brush.h.

Referenced by R_ModLoadNodes(), R_RecurseWorld(), and R_RecursiveSetModel().

#define flare_surfaces   sorted_surfaces[S_FLARE]

Definition at line 161 of file r_model_brush.h.

#define material_surfaces   sorted_surfaces[S_MATERIAL]

Definition at line 160 of file r_model_brush.h.

#define MSURF_PLANEBACK   1

Definition at line 50 of file r_model_brush.h.

Referenced by R_ModLoadSurfaces().

#define opaque_surfaces   sorted_surfaces[S_OPAQUE]

Definition at line 155 of file r_model_brush.h.

#define opaque_warp_surfaces   sorted_surfaces[S_OPAQUE_WARP]

Definition at line 156 of file r_model_brush.h.

#define R_AddSurfaceToArray (   array,
  surf 
)    (array)->surfaces[(array)->count++] = surf

Definition at line 163 of file r_model_brush.h.

Referenced by R_LoadSurfacesArrays_(), and R_SortSurfacesArrays_().

Typedef Documentation

typedef struct mBspEdge_s mBspEdge_t
typedef struct mBspFlare_s mBspFlare_t
typedef struct mBspHeader_s mBspHeader_t
typedef struct mBspLeaf_s mBspLeaf_t
typedef struct mBspModel_s mBspModel_t

brush model

typedef struct mBspNode_s mBspNode_t
Note
The mBspLeaf_t type shares the same first variables - don't change the order
typedef struct mBspSurface_s mBspSurface_t

surfaces are assigned to arrays based on their primary rendering type and then sorted by world texture index to reduce binds

typedef struct mBspTexInfo_s mBspTexInfo_t

Apply texture with a planar texture mapping

Note
Texture coordinates for a vector v are found with this computation:
1 float u = v[0] * uv[0] + v[1] * uv[1] + v[2] * uv[2] + u_offset
2 float v = v[0] * vv[0] + v[1] * vv[1] + v[2] * vv[2] + v_offset
typedef struct mBspVertex_s mBspVertex_t

in memory representation

Enumeration Type Documentation

Enumerator
S_OPAQUE 
S_OPAQUE_WARP 
S_ALPHA_TEST 
S_BLEND 
S_BLEND_WARP 
S_MATERIAL 
S_FLARE 
NUM_SURFACES_ARRAYS 

Definition at line 143 of file r_model_brush.h.