aboutsummaryrefslogtreecommitdiff
path: root/mp/src/utils/vrad/lightmap.h
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-02 19:31:46 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-02 19:46:31 -0800
commitf56bb35301836e56582a575a75864392a0177875 (patch)
treede61ddd39de3e7df52759711950b4c288592f0dc /mp/src/utils/vrad/lightmap.h
parentMark some more files as text. (diff)
downloadsource-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz
source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/utils/vrad/lightmap.h')
-rw-r--r--mp/src/utils/vrad/lightmap.h282
1 files changed, 141 insertions, 141 deletions
diff --git a/mp/src/utils/vrad/lightmap.h b/mp/src/utils/vrad/lightmap.h
index 0912c43f..a4c698da 100644
--- a/mp/src/utils/vrad/lightmap.h
+++ b/mp/src/utils/vrad/lightmap.h
@@ -1,141 +1,141 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $Workfile: $
-// $Date: $
-//
-//-----------------------------------------------------------------------------
-// $Log: $
-//
-// $NoKeywords: $
-//=============================================================================//
-
-#ifndef LIGHTMAP_H
-#define LIGHTMAP_H
-#pragma once
-
-#include "mathlib/bumpvects.h"
-#include "bsplib.h"
-
-typedef struct
-{
- dface_t *faces[2];
- Vector interface_normal;
- qboolean coplanar;
-} edgeshare_t;
-
-extern edgeshare_t edgeshare[MAX_MAP_EDGES];
-
-
-//==============================================
-
-// This is incremented each time BuildFaceLights and FinalLightFace
-// are called. It's used for a status bar in WorldCraft.
-extern int g_iCurFace;
-
-extern int vertexref[MAX_MAP_VERTS];
-extern int *vertexface[MAX_MAP_VERTS];
-
-struct faceneighbor_t
-{
- int numneighbors; // neighboring faces that share vertices
- int *neighbor; // neighboring face list (max of 64)
-
- Vector *normal; // adjusted normal per vertex
- Vector facenormal; // face normal
-
- bool bHasDisp; // is this surface a displacement surface???
-};
-
-extern faceneighbor_t faceneighbor[MAX_MAP_FACES];
-
-//==============================================
-
-
-struct sample_t
-{
- // in local luxel space
- winding_t *w;
- int s, t;
- Vector2D coord;
- Vector2D mins;
- Vector2D maxs;
- // in world units
- Vector pos;
- Vector normal;
- float area;
-};
-
-struct facelight_t
-{
- // irregularly shaped light sample data, clipped by face and luxel grid
- int numsamples;
- sample_t *sample;
- LightingValue_t *light[MAXLIGHTMAPS][NUM_BUMP_VECTS+1]; // result of direct illumination, indexed by sample
-
- // regularly spaced lightmap grid
- int numluxels;
- Vector *luxel; // world space position of luxel
- Vector *luxelNormals; // world space normal of luxel
- float worldAreaPerLuxel;
-};
-
-extern directlight_t *activelights;
-extern directlight_t *freelights;
-
-extern facelight_t facelight[MAX_MAP_FACES];
-extern int numdlights;
-
-
-//==============================================
-
-struct lightinfo_t
-{
- vec_t facedist;
- Vector facenormal;
-
- Vector facemid; // world coordinates of center
-
- Vector modelorg; // for origined bmodels
-
- Vector luxelOrigin;
- Vector worldToLuxelSpace[2]; // s = (world - luxelOrigin) . worldToLuxelSpace[0], t = (world - luxelOrigin) . worldToLuxelSpace[1]
- Vector luxelToWorldSpace[2]; // world = luxelOrigin + s * luxelToWorldSpace[0] + t * luxelToWorldSpace[1]
-
- int facenum;
- dface_t *face;
-
- int isflat;
- int hasbumpmap;
-};
-
-struct SSE_SampleInfo_t
-{
- int m_FaceNum;
- int m_WarnFace;
- dface_t *m_pFace;
- facelight_t *m_pFaceLight;
- int m_LightmapWidth;
- int m_LightmapHeight;
- int m_LightmapSize;
- int m_NormalCount;
- int m_iThread;
- texinfo_t *m_pTexInfo;
- bool m_IsDispFace;
-
- int m_NumSamples;
- int m_NumSampleGroups;
- int m_Clusters[4];
- FourVectors m_Points;
- FourVectors m_PointNormals[ NUM_BUMP_VECTS + 1 ];
-};
-
-extern void InitLightinfo( lightinfo_t *l, int facenum );
-
-void FreeDLights();
-
-void ExportDirectLightsToWorldLights();
-
-
-#endif // LIGHTMAP_H
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $Date: $
+//
+//-----------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef LIGHTMAP_H
+#define LIGHTMAP_H
+#pragma once
+
+#include "mathlib/bumpvects.h"
+#include "bsplib.h"
+
+typedef struct
+{
+ dface_t *faces[2];
+ Vector interface_normal;
+ qboolean coplanar;
+} edgeshare_t;
+
+extern edgeshare_t edgeshare[MAX_MAP_EDGES];
+
+
+//==============================================
+
+// This is incremented each time BuildFaceLights and FinalLightFace
+// are called. It's used for a status bar in WorldCraft.
+extern int g_iCurFace;
+
+extern int vertexref[MAX_MAP_VERTS];
+extern int *vertexface[MAX_MAP_VERTS];
+
+struct faceneighbor_t
+{
+ int numneighbors; // neighboring faces that share vertices
+ int *neighbor; // neighboring face list (max of 64)
+
+ Vector *normal; // adjusted normal per vertex
+ Vector facenormal; // face normal
+
+ bool bHasDisp; // is this surface a displacement surface???
+};
+
+extern faceneighbor_t faceneighbor[MAX_MAP_FACES];
+
+//==============================================
+
+
+struct sample_t
+{
+ // in local luxel space
+ winding_t *w;
+ int s, t;
+ Vector2D coord;
+ Vector2D mins;
+ Vector2D maxs;
+ // in world units
+ Vector pos;
+ Vector normal;
+ float area;
+};
+
+struct facelight_t
+{
+ // irregularly shaped light sample data, clipped by face and luxel grid
+ int numsamples;
+ sample_t *sample;
+ LightingValue_t *light[MAXLIGHTMAPS][NUM_BUMP_VECTS+1]; // result of direct illumination, indexed by sample
+
+ // regularly spaced lightmap grid
+ int numluxels;
+ Vector *luxel; // world space position of luxel
+ Vector *luxelNormals; // world space normal of luxel
+ float worldAreaPerLuxel;
+};
+
+extern directlight_t *activelights;
+extern directlight_t *freelights;
+
+extern facelight_t facelight[MAX_MAP_FACES];
+extern int numdlights;
+
+
+//==============================================
+
+struct lightinfo_t
+{
+ vec_t facedist;
+ Vector facenormal;
+
+ Vector facemid; // world coordinates of center
+
+ Vector modelorg; // for origined bmodels
+
+ Vector luxelOrigin;
+ Vector worldToLuxelSpace[2]; // s = (world - luxelOrigin) . worldToLuxelSpace[0], t = (world - luxelOrigin) . worldToLuxelSpace[1]
+ Vector luxelToWorldSpace[2]; // world = luxelOrigin + s * luxelToWorldSpace[0] + t * luxelToWorldSpace[1]
+
+ int facenum;
+ dface_t *face;
+
+ int isflat;
+ int hasbumpmap;
+};
+
+struct SSE_SampleInfo_t
+{
+ int m_FaceNum;
+ int m_WarnFace;
+ dface_t *m_pFace;
+ facelight_t *m_pFaceLight;
+ int m_LightmapWidth;
+ int m_LightmapHeight;
+ int m_LightmapSize;
+ int m_NormalCount;
+ int m_iThread;
+ texinfo_t *m_pTexInfo;
+ bool m_IsDispFace;
+
+ int m_NumSamples;
+ int m_NumSampleGroups;
+ int m_Clusters[4];
+ FourVectors m_Points;
+ FourVectors m_PointNormals[ NUM_BUMP_VECTS + 1 ];
+};
+
+extern void InitLightinfo( lightinfo_t *l, int facenum );
+
+void FreeDLights();
+
+void ExportDirectLightsToWorldLights();
+
+
+#endif // LIGHTMAP_H