Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

SURFACE.H

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  Surface.h                                                                           */
00003 /*                                                                                      */
00004 /*  Author: John Pollard                                                                */
00005 /*  Description: Creates the surfaces for a BSP from the GFX data                       */
00006 /*                                                                                      */
00007 /*  The contents of this file are subject to the Genesis3D Public License               */
00008 /*  Version 1.01 (the "License"); you may not use this file except in                   */
00009 /*  compliance with the License. You may obtain a copy of the License at                */
00010 /*  http://www.genesis3d.com                                                            */
00011 /*                                                                                      */
00012 /*  Software distributed under the License is distributed on an "AS IS"                 */
00013 /*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */
00014 /*  the License for the specific language governing rights and limitations              */
00015 /*  under the License.                                                                  */
00016 /*                                                                                      */
00017 /*  The Original Code is Genesis3D, released March 25, 1999.                            */
00018 /*  Genesis3D Version 1.1 released November 15, 1999                                 */
00019 /*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved           */
00020 /*                                                                                      */
00021 /****************************************************************************************/
00022 #ifndef GE_SURFACE_H
00023 #define GE_SURFACE_H
00024 
00025 #include <Assert.h>
00026 #include <Windows.h>
00027 
00028 #include "BaseType.h"
00029 #include "PtrTypes.h"
00030 #include "Vec3d.h"
00031 #include "DCommon.h"
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 
00037 //================================================================================
00038 //      Structure defines
00039 //================================================================================
00040 
00041 // Surface info carries extra info about a face thats not in GFX_Face (File format face)
00042 typedef struct Surf_SurfInfo
00043 {
00044         DRV_LInfo       LInfo;                                                  // For RDriver use only...
00045 
00046         geVec3d         T2WVecs[2];
00047         geVec3d         TexOrg;
00048 
00049         geVec3d         VMins;
00050         geVec3d         VMaxs;
00051         
00052         int32           VisFrame;
00053         
00054         int32           TexInfo;
00055         
00056         int32           XStep;                                                  // Lightmap step values (1:21:10 fixed)
00057         int32           YStep;
00058         int32           XScale;
00059         int32           YScale;
00060 
00061         geFloat         ShiftU;
00062         geFloat         ShiftV;
00063         
00064         int32           NumLTypes;                                              // Number of lightmap types this face has...
00065         int32           DLightFrame;                                    // == Globals->CurFrame if dlighted
00066         uint32          DLights;                                                // Bit set for each DLight
00067         uint32          Flags;                                                  // Surface Flags (NOTE - This is not the flags from the utilities)
00068 
00069 } Surf_SurfInfo;
00070 
00071 typedef struct Surf_TexVert
00072 {
00073         geFloat         u, v;
00074         geFloat         r, g, b, a;
00075 } Surf_TexVert;
00076 
00077 // Lit vertex
00078 typedef struct
00079 {
00080         geFloat X, Y, Z;                                                                        // 3d vertex
00081         geFloat u, v;                                                                           // Uv's
00082         geFloat r, g, b, a;                                                             // color
00083 } Surf_LVertex;
00084 
00085 // Transformed Lit vertex
00086 typedef struct
00087 {
00088         geFloat x, y, z;                                                                        // screen points
00089         geFloat u, v;                                                                           // Uv's
00090         geFloat r, g, b, a;                                                             // color
00091 } Surf_TLVertex;
00092 
00093 //      Surface Flags
00094 #define         SURFINFO_TRANS                          (1<<0)          // Surface is transparent
00095 #define         SURFINFO_LTYPED                         (1<<1)          // This surface has more than one ltype
00096 #define         SURFINFO_LIGHTMAP                       (1<<2)          // This surface has a lightmap
00097 #define         SURFINFO_WAVY                           (1<<3)          // This surface is a wavy surface
00098 
00099 //================================================================================
00100 //      Function defines
00101 //================================================================================
00102 geBoolean Surf_EngineInit(geEngine *Engine);
00103 void Surf_EngineShutdown(geEngine *Engine);
00104 geBoolean Surf_SetEngine(geEngine *Engine);
00105 geBoolean Surf_SetWorld(geWorld *World);
00106 geBoolean Surf_SetGBSP(World_BSP *BSP);
00107 geBoolean Surf_WorldInit(geWorld *World);
00108 void Surf_WorldShutdown(geWorld *World);
00109 
00110 BOOL Surf_InSurfBoundingBox(Surf_SurfInfo *Surf, geVec3d *Pos, geFloat Box);
00111 
00112 #ifdef __cplusplus
00113 }
00114 #endif
00115 
00116 #endif

Generated on Tue Sep 30 12:36:27 2003 for GTestAndEngine by doxygen 1.3.2