|
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. | |
| 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. | |
| static void | BuildPatch (int fn, winding_t *w) |
| Build a patch for a surface that emits light. | |
| 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. | |
| static void | FinishSubdividePatch (patch_t *patch, patch_t *newp) |
| static void | SubdividePatch (patch_t *patch) |
| Chops the patch by a global grid. | |
| void | SubdividePatches (void) |
| Iterate all of the head face patches, subdividing them as necessary. | |
| void | FreePatches (void) |
| After light sources have been created, patches may be freed. | |
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_t::area, curTile, EmissiveLight(), patch_t::face, face_patches, Mem_AllocType, dBspPlane_t::normal, patch_t::normal, patch_t::origin, dBspSurface_t::planenum, dBspSurface_t::side, VectorCopy, VectorMA(), VectorNegate, patch_t::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, face_patches, dBspModel_t::firstface, GetVectorForKey(), HasLight(), i, dBspModel_t::numfaces, winding_t::numpoints, OBJZERO, winding_t::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, Q_streq, 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_t::face, patch_t::light, dBspSurface_t::texinfo, texture_reflectivity, dBspTexinfo_t::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_t::area, patch_t::light, patch_t::normal, patch_t::origin, VectorCopy, VectorMA(), patch_t::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 face_patches, i, MAX_MAP_FACES, Mem_Free, and patch_t::next.
Referenced by LightWorld().
|
inlinestatic |
Definition at line 117 of file patches.cpp.
References curTile, f, SURF_LIGHT, dBspTexinfo_t::surfaceFlags, and dBspTexinfo_t::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_t::next, ON_EPSILON, PATCH_SUBDIVIDE, SubdividePatch(), VectorClear, patch_t::winding, and WindingBounds().
Referenced by SubdividePatch(), and SubdividePatches().
Iterate all of the head face patches, subdividing them as necessary.
Definition at line 312 of file patches.cpp.
References face_patches, i, MAX_MAP_FACES, and SubdividePatch().
Referenced by LightWorld().
|
static |
Definition at line 95 of file patches.cpp.
References AllocWinding(), curTile, f, i, winding_t::numpoints, winding_t::p, dBspVertex_t::point, RemoveColinearPoints(), v, and VectorCopy.
Referenced by BuildPatches().
| patch_t* face_patches[MAX_MAP_FACES] |
Definition at line 30 of file patches.cpp.
Referenced by BuildLights(), BuildPatch(), BuildPatches(), FreePatches(), and SubdividePatches().
|
static |
Definition at line 29 of file patches.cpp.
Referenced by CalcTextureReflectivity(), and EmissiveLight().