
Surface
Description: Creates the surfaces for a BSP from the GFX data
Source file: ...\genesis3d\OpenSource\Source\World\SURFACE.h
Contents:
Functions:
EngineInit, EngineShutdown, SetEngine, SetWorld, SetGBSP, WorldInit, WorldShutdown, InSurfBoundingBox
Types:
Surf_SurfInfo, Surf_TexVert, Surf_LVertex, Surf_TLVertex
Constants:
Changes for Genesis3D v1.6:
type float converted to geFloat

Types:
// Surface info carries extra info about a face thats not in
GFX_Face (File format face)
Surf_SurfInfo
- typedef struct Surf_SurfInfo {
DRV_LInfo LInfo; // For RDriver use only...
geVec3d T2WVecs[2];
geVec3d TexOrg;
geVec3d VMins;
geVec3d VMaxs;
int32 VisFrame;
int32 TexInfo;
int32 XStep; // Lightmap step values (1:21:10 fixed)
int32 YStep;
int32 XScale;
int32 YScale;
float ShiftU;
float ShiftV;
int32 NumLTypes; // Number of lightmap types this face has...
int32 DLightFrame; // == Globals->CurFrame if dlighted
uint32 DLights; // Bit set for each DLight
uint32 Flags; // Surface Flags (NOTE - This is not the flags from the utilities)
} Surf_SurfInfo;
- Return to Contents
Surf_TexVert
- typedef struct Surf_TexVert {
float u, v;
float r, g, b, a;
} Surf_TexVert;
- Return to Contents
-
- Surf_LVertex
- // Lit vertex
- typedef struct {
float X, Y, Z; // 3d vertex
float u, v; // Uv's
float r, g, b, a; // color
} Surf_LVertex;
- Return to Contents
-
- Surf_TLVertex
- // Transformed Lit vertex
- typedef struct {
float x, y, z; // screen points
float u, v; // Uv's
float r, g, b, a; // color
} Surf_TLVertex;
Return to Contents

Constants:
// Surface Flags
- #define SURFINFO_TRANS (1<<0) // Surface is transparent
- #define SURFINFO_LTYPED (1<<1) // This surface has more than one ltype
- #define SURFINFO_LIGHTMAP (1<<2) // This surface has a lightmap
- #define SURFINFO_WAVY (1<<3) // This surface is a wavy surface

Functions:

geBoolean Surf_EngineInit(geEngine *Engine);
Return to Contents

void
Surf_EngineShutdown(geEngine *Engine);
Return to Contents

geBoolean Surf_SetEngine(geEngine *Engine);
Return to Contents

geBoolean Surf_SetWorld(geWorld *World);
Return to Contents

geBoolean Surf_SetGBSP(World_BSP *BSP);
Return to Contents

geBoolean Surf_WorldInit(geWorld *World);
Return to Contents

void
Surf_WorldShutdown(geWorld *World);
Return to Contents

BOOL
Surf_InSurfBoundingBox(Surf_SurfInfo *Surf, geVec3d *Pos, float Box);
Return to Contents
