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

electric.h

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  ELECTRIC.H                                                                          */
00003 /*                                                                                      */
00004 /*  Author: Eli Boling                                                                  */
00005 /*  Description: Animated electrical bolt special effect interface                      */
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 ELECTRIC_H
00023 #define ELECTRIC_H
00024 
00025 #ifdef  __cplusplus
00026 extern "C" {
00027 #endif
00028 
00029 #include "Genesis.h"
00030 
00031 #define ELECTRIC_BOLT_REDDOMINANT       0
00032 #define ELECTRIC_BOLT_GREENDOMINANT     1
00033 #define ELECTRIC_BOLT_BLUEDOMINANT      2
00034 
00035 #pragma warning( disable : 4068 )
00036 
00037 typedef struct  _Electric_BoltEffect
00038 {
00039         int                     beInitialized;
00040         int                     beNumPoints;
00041         geFloat         beWildness;
00042 
00043         /* For rendering */
00044         geVec3d         beStart;
00045         geVec3d         beEnd;
00046 
00047         /* For generating the geometry */
00048         geVec3d *       beCenterPoints;
00049         geVec3d *       beCurrentPoint;
00050 
00051         geFloat         beBaseColors[3];
00052         geFloat         beCurrentColors[3];
00053         geFloat         beBaseBlue;
00054         int                     beDecayRate;
00055         int                     beDominantColor;
00056 
00057         int                     beWidth;
00058 
00059 }       _Electric_BoltEffect;
00060 
00061 _Electric_BoltEffect * _Electric_BoltEffectCreate(
00062         int                                     NumPolys,       /* Number of polys, must be power of 2 */
00063         int                                             Width,          /* Width in world units of the bolt */
00064         geFloat                                 Wildness);      /* How wild the bolt is (0 to 1 inclusive) */
00065 
00066 void _Electric_BoltEffectDestroy(_Electric_BoltEffect *Effect);
00067 
00068 void _Electric_BoltEffectAnimate(
00069         _Electric_BoltEffect *  Effect,
00070         const geVec3d *                 start,          /* Starting point of the bolt */
00071         const geVec3d *                 end);           /* Ending point of the bolt */
00072 
00073 void _Electric_BoltEffectRender(
00074         geWorld *                               World,          /* World to render for */
00075         _Electric_BoltEffect *  Effect,         /* Bolt to render */
00076         const geXForm3d *               XForm);         /* Transform of our point of view */
00077 
00078 void _Electric_BoltEffectSetColorInfo(
00079         _Electric_BoltEffect *  Effect,
00080         GE_RGBA *                               BaseColor,              /* Base color of the bolt (2 colors should be the same */
00081         int                                             DominantColor); /* Which color is the one to leave fixed */
00082 
00083 #ifdef  __cplusplus
00084 }
00085 #endif
00086 
00087 #endif
00088 

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