00001 /****************************************************************************************/ 00002 /* Fog.h */ 00003 /* */ 00004 /* Author: John Pollard */ 00005 /* Description: Fog module */ 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_FOG_H 00023 #define GE_FOG_H 00024 00025 #include <Assert.h> 00026 00027 #include "Vec3d.h" 00028 #include "BaseType.h" 00029 #include "GeTypes.h" 00030 #include "Ram.h" 00031 #include "Errorlog.h" 00032 00033 #ifdef __cplusplus 00034 extern "C" { 00035 #endif 00036 00037 //===================================================================================== 00038 // Defines / Structure defines 00039 //===================================================================================== 00040 typedef struct geFog geFog; 00041 00042 typedef geBoolean SET_ATTR_CB(geFog *Fog); 00043 00044 typedef struct geFog 00045 { 00046 geVec3d Pos; 00047 GE_RGBA Color; 00048 geFloat LightBrightness; 00049 geFloat VolumeBrightness; 00050 geFloat VolumeRadius; 00051 geFloat VolumeRadius2; // *2 00052 geFloat VolumeRadiusSquared; // Radius squared 00053 00054 void *UserData; 00055 00056 SET_ATTR_CB *SetAttrCB; // CB for when geFog_SetAttributes is called 00057 00058 struct geFog *Next; 00059 struct geFog *Prev; 00060 } geFog; 00061 00062 //===================================================================================== 00063 // Function ProtoTypes 00064 //===================================================================================== 00065 GENESISAPI geFog *geFog_Create(SET_ATTR_CB *SetAttrCB); 00066 00067 GENESISAPI void geFog_Destroy(geFog *Fog); 00068 00069 GENESISAPI geBoolean geFog_SetAttributes( geFog *Fog, 00070 const geVec3d *Pos, 00071 GE_RGBA *Color, 00072 geFloat LightBrightness, 00073 geFloat VolumeBrightness, 00074 geFloat VolumeRadius); 00075 00076 GENESISAPI geBoolean geFog_SetUserData(geFog *Fog, void *UserData); 00077 GENESISAPI void *geFog_GetUserData(geFog *Fog); 00078 00079 #ifdef __cplusplus 00080 } 00081 #endif 00082 00083 #endif
1.3.2