UFO: Alien Invasion
|
Go to the source code of this file.
Macros | |
#define | PATCH_SUBDIVIDE 64 |
Functions | |
void | CalcTextureReflectivity (void) |
Calculates the texture color that is used for light emitting surfaces. More... | |
static winding_t * | WindingFromFace (const dBspSurface_t *f) |
static bool | HasLight (const dBspSurface_t *f) |
static void | EmissiveLight (patch_t *patch) |
Check for light emitted by texture. More... | |
static void | BuildPatch (int fn, winding_t *w) |
Build a patch for a surface that emits light. More... | |
static entity_t * | EntityForModel (int modnum) |
void | BuildPatches (void) |
Create surface fragments for light-emitting surfaces so that light sources may be computed along them. More... | |
static void | FinishSubdividePatch (patch_t *patch, patch_t *newp) |
static void | SubdividePatch (patch_t *patch) |
Chops the patch by a global grid. More... | |
void | SubdividePatches (void) |
Iterate all of the head face patches, subdividing them as necessary. More... | |
void | FreePatches (void) |
After light sources have been created, patches may be freed. More... | |
Variables | |
static vec3_t | texture_reflectivity [MAX_MAP_TEXINFO] |
patch_t * | face_patches [MAX_MAP_FACES] |
#define PATCH_SUBDIVIDE 64 |
Definition at line 236 of file patches.cpp.
Referenced by SubdividePatch().
Build a patch for a surface that emits light.
fn | The face number of the surface that emits the light |
w | The winding |
Definition at line 145 of file patches.cpp.
References patch_s::area, curTile, EmissiveLight(), patch_s::face, dMapTile_t::faces, Mem_AllocType, patch_s::normal, dBspPlane_t::normal, patch_s::origin, dBspSurface_t::planenum, dMapTile_t::planes, dBspSurface_t::side, VectorCopy, VectorMA(), VectorNegate, patch_s::winding, WindingArea(), and WindingCenter().
Referenced by BuildPatches().
Create surface fragments for light-emitting surfaces so that light sources may be computed along them.
Definition at line 198 of file patches.cpp.
References BuildPatch(), curTile, EntityForModel(), f, face_offset, dMapTile_t::faces, dBspModel_t::firstface, GetVectorForKey(), HasLight(), i, dMapTile_t::models, dBspModel_t::numfaces, dMapTile_t::nummodels, winding_s::numpoints, OBJZERO, winding_s::p, VectorAdd, VectorCopy, and WindingFromFace().
Referenced by LightWorld().
Calculates the texture color that is used for light emitting surfaces.
Definition at line 41 of file patches.cpp.
References Com_sprintf(), curTile, i, Img_LoadImage(), MAX_QPATH, dMapTile_t::numtexinfo, Q_streq, dMapTile_t::texinfo, texinfo_s::texture, texture_reflectivity, VectorCopy, VectorSet, VERB_EXTRA, VERB_NORMAL, and Verb_Printf().
Referenced by main().
Check for light emitted by texture.
Definition at line 130 of file patches.cpp.
References curTile, patch_s::face, patch_s::light, dBspSurface_t::texinfo, dMapTile_t::texinfo, texture_reflectivity, texinfo_s::value, and VectorScale.
Referenced by BuildPatch().
Definition at line 178 of file patches.cpp.
References Com_sprintf(), entities, i, name, num_entities, Q_streq, and ValueForKey().
Referenced by BuildPatches().
Definition at line 238 of file patches.cpp.
References patch_s::area, patch_s::light, patch_s::normal, patch_s::origin, VectorCopy, VectorMA(), patch_s::winding, WindingArea(), and WindingCenter().
Referenced by SubdividePatch().
After light sources have been created, patches may be freed.
Definition at line 325 of file patches.cpp.
References i, MAX_MAP_FACES, Mem_Free, and patch_s::next.
Referenced by LightWorld().
|
inlinestatic |
Definition at line 117 of file patches.cpp.
References curTile, SURF_LIGHT, texinfo_s::surfaceFlags, dBspSurface_t::texinfo, dMapTile_t::texinfo, and texinfo_s::value.
Referenced by BuildPatches().
Chops the patch by a global grid.
Definition at line 266 of file patches.cpp.
References ClipWindingEpsilon(), FinishSubdividePatch(), i, Mem_AllocType, patch_s::next, ON_EPSILON, PATCH_SUBDIVIDE, VectorClear, patch_s::winding, and WindingBounds().
Referenced by SubdividePatches().
Iterate all of the head face patches, subdividing them as necessary.
Definition at line 312 of file patches.cpp.
References i, MAX_MAP_FACES, and SubdividePatch().
Referenced by LightWorld().
|
static |
Definition at line 95 of file patches.cpp.
References AllocWinding(), curTile, dMapTile_t::edges, dBspSurface_t::firstedge, i, dBspSurface_t::numedges, winding_s::numpoints, winding_s::p, dBspVertex_t::point, RemoveColinearPoints(), dMapTile_t::surfedges, v, dBspEdge_t::v, VectorCopy, and dMapTile_t::vertexes.
Referenced by BuildPatches().
patch_t* face_patches[MAX_MAP_FACES] |
Definition at line 30 of file patches.cpp.
Referenced by BuildLights().
|
static |
Definition at line 29 of file patches.cpp.
Referenced by CalcTextureReflectivity(), and EmissiveLight().