UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
lighting.h
Go to the documentation of this file.
1
4
5
/*
6
Copyright (C) 1997-2001 Id Software, Inc.
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
as published by the Free Software Foundation; either version 2
11
of the License, or (at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17
See the GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23
*/
24
25
#pragma once
26
27
#include "
common/shared.h
"
28
#include "
common/bspfile.h
"
29
#include "
common/polylib.h
"
30
31
#define MAX_PATCHES 65000
/* larger will cause 32 bit overflows */
32
33
typedef
struct
patch_s {
34
dBspSurface_t
*
face
;
35
winding_t
*
winding
;
36
37
vec3_t
origin
;
38
vec3_t
normal
;
39
40
float
area
;
41
vec3_t
light
;
42
43
struct
patch_s*
next
;
44
}
patch_t
;
45
46
extern
patch_t
*
face_patches
[
MAX_MAP_FACES
];
48
extern
vec3_t
face_offset
[
MAX_MAP_FACES
];
49
50
void
BuildFacelights
(
unsigned
int
facenum);
51
void
FinalLightFace
(
unsigned
int
facenum);
52
void
ExportLightmaps
(
const
char
* bspFileName);
53
void
BuildLights
(
void
);
54
55
void
BuildPatches
(
void
);
56
void
SubdividePatches
(
void
);
57
void
CalcTextureReflectivity
(
void
);
58
void
LightWorld
(
void
);
59
void
BuildVertexNormals
(
void
);
60
void
FreePatches
(
void
);
bspfile.h
MAX_MAP_FACES
#define MAX_MAP_FACES
Definition
defines.h:144
face_offset
vec3_t face_offset[MAX_MAP_FACES]
Definition
lightmap.cpp:34
BuildVertexNormals
void BuildVertexNormals(void)
Calculate per-vertex (instead of per-plane) normal vectors. This is done by finding all of the faces ...
Definition
lightmap.cpp:673
BuildLights
void BuildLights(void)
Create lights out of patches and entity lights.
Definition
lightmap.cpp:293
SubdividePatches
void SubdividePatches(void)
Iterate all of the head face patches, subdividing them as necessary.
Definition
patches.cpp:312
face_patches
patch_t * face_patches[MAX_MAP_FACES]
Definition
patches.cpp:30
FinalLightFace
void FinalLightFace(unsigned int facenum)
Add the indirect lighting on top of the direct lighting and save into final map format.
Definition
lightmap.cpp:987
BuildFacelights
void BuildFacelights(unsigned int facenum)
Definition
lightmap.cpp:753
CalcTextureReflectivity
void CalcTextureReflectivity(void)
Calculates the texture color that is used for light emitting surfaces.
Definition
patches.cpp:41
ExportLightmaps
void ExportLightmaps(const char *bspFileName)
Export the day and night lightmap and direction data for the given map.
Definition
lightmap.cpp:963
LightWorld
void LightWorld(void)
Build the lightmap out of light entities and surface lights (patches).
Definition
lighting.cpp:34
FreePatches
void FreePatches(void)
After light sources have been created, patches may be freed.
Definition
patches.cpp:325
BuildPatches
void BuildPatches(void)
Create surface fragments for light-emitting surfaces so that light sources may be computed along them...
Definition
patches.cpp:198
polylib.h
dBspSurface_t
Definition
typedefs.h:403
patch_t
Definition
lighting.h:33
patch_t::winding
winding_t * winding
Definition
lighting.h:35
patch_t::next
struct patch_s * next
Definition
lighting.h:43
patch_t::light
vec3_t light
Definition
lighting.h:41
patch_t::normal
vec3_t normal
Definition
lighting.h:38
patch_t::face
dBspSurface_t * face
Definition
lighting.h:34
patch_t::origin
vec3_t origin
Definition
lighting.h:37
patch_t::area
float area
Definition
lighting.h:40
winding_t
for storing the vertices of the side of a brush or other polygon
Definition
polylib.h:30
shared.h
vec3_t
vec_t vec3_t[3]
Definition
ufotypes.h:39
src
tools
ufo2map
lighting.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0