UFO: Alien Invasion
Loading...
Searching...
No Matches
r_lighting.h
Go to the documentation of this file.
1
4
5/*
6 Copyright(c) 1997-2001 Id Software, Inc.
7 Copyright(c) 2002 The Quakeforge Project.
8 Copyright(c) 2006 Quake2World.
9
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License
12 as published by the Free Software Foundation; either version 2
13 of the License, or(at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
19 See the GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 */
25
26#pragma once
27
29typedef struct lighting_s {
30 /* Cache */
34
35 /* Lights */
39
40 /* Shadows */
41 bool inShadow;
42 /* Stencil shadow (not necessarily from the sun) */
46
47#define LIGHTING_MAX_SHADOW_DISTANCE 128.0
48#define CACHE_CLEAR_TRESHOLD 2.0
#define MAX_ENTITY_LIGHTS
Definition r_entity.h:28
a light source
Definition r_light.h:29
lighting structure which contains static and dynamic lighting info for entities
Definition r_lighting.h:29
vec3_t shadowOrigin
Definition r_lighting.h:43
bool inShadow
Definition r_lighting.h:41
vec3_t lastCachePos
Definition r_lighting.h:31
int numCachedLights
Definition r_lighting.h:33
const light_t * cachedLights[MAX_ENTITY_LIGHTS]
Definition r_lighting.h:32
int lastLitFrame
Definition r_lighting.h:38
int lastShadowedFrame
Definition r_lighting.h:44
int numLights
Definition r_lighting.h:37
const light_t * lights[MAX_ENTITY_LIGHTS]
Definition r_lighting.h:36
vec_t vec3_t[3]
Definition ufotypes.h:39