![]() |
torcs - 1.2.2 | ![]() |
00001 /*************************************************************************** 00002 00003 file : grcar.h 00004 created : Mon Aug 21 18:21:15 CEST 2000 00005 copyright : (C) 2000 by Eric Espie 00006 email : torcs@free.fr 00007 version : $Id: grcar.h,v 1.15 2004/02/06 23:08:53 torcs Exp $ 00008 00009 ***************************************************************************/ 00010 00011 /*************************************************************************** 00012 * * 00013 * This program is free software; you can redistribute it and/or modify * 00014 * it under the terms of the GNU General Public License as published by * 00015 * the Free Software Foundation; either version 2 of the License, or * 00016 * (at your option) any later version. * 00017 * * 00018 ***************************************************************************/ 00019 00020 00021 #ifndef _GRCAR_H_ 00022 #define _GRCAR_H_ 00023 00024 typedef struct 00025 { 00026 ssgSimpleState *texture; 00027 GLuint CounterList; 00028 GLuint needleList; 00029 tdble needleXCenter, needleYCenter; 00030 tdble digitXCenter, digitYCenter; 00031 tdble minValue, maxValue; 00032 tdble minAngle, maxAngle; 00033 tdble *monitored; 00034 tdble prevVal; 00035 tdble rawPrev; 00036 int digital; 00037 } tgrCarInstrument; 00038 00039 00040 typedef struct 00041 { 00042 float iconColor[4]; 00043 ssgTransform *carTransform; 00044 ssgSelector *LODSelector; 00045 int LODSelectMask[32]; 00046 float LODThreshold[32]; 00047 ssgSelector *driverSelector; 00048 ssgStateSelector *envSelector; 00049 ssgTransform *wheelPos[4]; 00050 ssgTransform *wheelRot[4]; 00051 ssgColourArray *brkColor[4]; 00052 ssgSelector *wheelselector[4]; 00053 ssgState *wheelTexture; 00054 ssgVtxTableShadow *shadowBase; 00055 ssgVtxTableShadow *shadowCurr; 00056 ssgBranch *shadowAnchor; 00057 tgrSkidmarks *skidmarks; 00058 sgMat4 carPos; 00059 tgrCarInstrument instrument[2]; 00060 tdble distFromStart; 00061 tdble envAngle; 00062 int fireCount; 00063 tdble px; 00064 tdble py; 00065 tdble sx; 00066 tdble sy; 00067 } tgrCarInfo; 00068 00069 extern tgrCarInfo *grCarInfo; 00070 00071 extern void grInitCar(tCarElt *car); 00072 extern void grDrawCar(tCarElt*, tCarElt *, int, int, double curTime, class cGrPerspCamera *curCam); 00073 extern void grDrawShadow(tCarElt *car); 00074 extern void grInitShadow(tCarElt *car); 00075 extern tdble grGetDistToStart(tCarElt *car); 00076 extern void grInitCommonState(void); 00077 00078 #endif /* _GRCAR_H_ */ 00079 00080 00081