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

USER.H

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  User.h                                                                              */
00003 /*                                                                                      */
00004 /*  Author: John Pollard                                                                */
00005 /*  Description: User poly's                                                            */
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_USER_H
00023 #define GE_USER_H
00024 
00025 #include <Assert.h>
00026 #include <Windows.h>
00027 
00028 #include "BaseType.h"
00029 #include "Vec3d.h"
00030 #include "XForm3d.h"
00031 #include "Camera.h"
00032 #include "Genesis.h"
00033 #include "World.h"
00034 #include "Surface.h"
00035 
00036 #include "DCommon.h"
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 
00042 #define MAX_USER_VERTS                          4                       
00043 #define USER_MAX_SORTED_POLYS           1024
00044 
00045 //================================================================================
00046 //      Structure defines
00047 //================================================================================
00048 
00049 typedef struct  gePoly
00050 {
00051 #ifdef _DEBUG
00052         struct gePoly   *Self1;
00053 #endif
00054 
00055         geWorld                 *World;
00056         GE_LVertex              Verts[MAX_USER_VERTS];  // Copy of user verts                                   
00057 
00058         geWorld_Leaf    *LeafData;
00059         geFloat                 ZOrder;
00060 
00061         int32                   NumVerts;
00062 
00063         geBitmap                *Bitmap;
00064 
00065         gePoly_Type             Type;                                   // Type of poly
00066         int32                   RenderFlags;                    // Fx of poly
00067 
00068         geFloat                 Scale;                                  // Currently only used for TexturedPoint
00069 
00070         struct gePoly   *Prev;
00071         struct gePoly   *Next;
00072 
00073         struct gePoly   *AddOnceNext;
00074 
00075 #ifdef _DEBUG
00076         struct gePoly   *Self2;
00077 #endif
00078 } gePoly;
00079 
00080 typedef struct User_Info
00081 {
00082         gePoly          *AddPolyOnceList;
00083 } User_Info;
00084 
00085 //================================================================================
00086 //      Function ProtoTypes
00087 //================================================================================
00088 geBoolean       User_EngineInit(geEngine *Engine);
00089 void            User_EngineShutdown(geEngine *Engine);
00090 geBoolean       User_WorldInit(geWorld *World);
00091 void            User_WorldShutdown(geWorld *World);
00092 
00093 geBoolean User_RenderPolyList(gePoly *PolyList);
00094 
00095 GENESISAPI      gePoly *geWorld_AddPolyOnce(    geWorld *World, 
00096                                                                                 GE_LVertex *Verts, 
00097                                                                                 int32 NumVerts, 
00098                                                                                 geBitmap *Bitmap,
00099                                                                                 gePoly_Type Type, 
00100                                                                                 uint32 RenderFlags,
00101                                                                                 geFloat Scale);
00102 GENESISAPI      gePoly *geWorld_AddPoly(        geWorld *World, 
00103                                                                         GE_LVertex *Verts, 
00104                                                                         int32 NumVerts, 
00105                                                                         geBitmap *Bitmap,
00106                                                                         gePoly_Type Type,
00107                                                                         uint32 RenderFlags,
00108                                                                         geFloat Scale);
00109 
00110 GENESISAPI      void geWorld_RemovePoly(geWorld *World, gePoly *Poly);
00111 GENESISAPI      geBoolean gePoly_GetLVertex(gePoly *Poly, int32 Index, GE_LVertex *LVert);
00112 GENESISAPI      geBoolean gePoly_SetLVertex(gePoly *Poly, int32 Index, const GE_LVertex *LVert);
00113 
00114 geBoolean       User_SetCameraInfo(geEngine *Engine, geWorld *World, geCamera *Camera, Frustum_Info *Fi);
00115 geBoolean       User_DestroyOncePolys(geWorld *World);
00116 void            User_DestroyPolyList(geWorld *World, gePoly *List);
00117 
00118 void            User_EngineFillRect(geEngine *Engine, const GE_Rect *Rect, const GE_RGBA *Color);
00119 
00120 #ifdef __cplusplus
00121 }
00122 #endif
00123 
00124 #endif

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