Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

polygon.h

Go to the documentation of this file.
00001 /*
00002  *  Part of rvglue source code,
00003  *  Copyright (C) 2000 Alexander Kroeller (alilein@gmx.de)
00004  *  Copyright (C) 2000 Christer Sundin (ces) (christer@sundin.nu)
00005  *  Copyright (C) 2001 Gabor Varga (vag) (bootes@freemail.hu)
00006  *
00007  *  This program is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; either version 2 of the License, or
00010  *  (at your option) any later version.
00011  *
00012  *  This program is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *  GNU General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License
00018  *  along with this program; if not, write to the Free Software
00019  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020  */
00021 
00022 /*
00023  * $Id: polygon.h,v 1.2 2000/05/03 09:19:57 ali Exp ali $
00024  *
00025  * $Log: polygon.h,v $
00026  * Revision 1.2  2000/05/03 09:19:57  ali
00027  * ces sync
00028  *
00029  * Revision 1.1  2000/05/03 08:49:53  ali
00030  * Initial revision
00031  */
00032 #ifndef __POLYGON_H
00033 #define __POLYGON_H
00034 
00035 #include "rvtypes.h"
00036 
00037 
00038 #define TEP_PWALL      1
00039 #define TEP_RWALL      2
00040 #define TEP_CARIMG     4
00041 #define TEP_FLOOR      8
00042 #define TEP_FLOOR2    16  // ces 2000-04-13
00043 #define TEP_LAMP      32
00044 #define TEP_BOX       64
00045 #define TEP_TRACK    128
00046 #define TEP_PIPE     256  // ces 2000-04-13
00047 #define TEP_BCEIL    512  // ces 2000-04-13
00048 #define TEP_BRAIL   1024  // ces 2000-04-13
00049 
00050 
00051 #define SURF_NOCOLL   -2
00052 #define TEX_INVISIBLE -2
00053 
00054 class Mesh;
00055 
00060 enum EnvMapType
00061 {
00062 
00063   On,       
00064   Off,      
00065   Disabled  
00066 };
00067 
00068 
00070 class Polygon
00071 {
00072 public:
00073   friend class PolygonModifier;
00074 
00075 public:
00076   Polygon(Mesh *p, RV_Poly *d);  // ces 2000-04-13
00077 
00078   Polygon(Mesh *, FILE *, bool is_IM, bool is_Instance);
00079 
00085   Polygon(Mesh *, Polygon *);
00086 
00087 
00093   void setTransparency(rvulong);
00095   void setSurface(rvlong);
00096 
00097   void turnInvisible(void);
00098   bool isInvisible(void);
00099   void setNoColl(void);
00100   bool isNoColl(void);
00101 
00108   int numverts(void);
00109 
00110   void setTEColor(rvulong);
00111 
00112   void write(FILE *, bool is_IM, bool is_Instance);
00113 
00115   int detTEPart(void);
00116 
00117   void shiftVIndices(rvushort);
00118 
00119   bool isInTexture(rvshort page, rvfloat ulo, rvfloat uhi, rvfloat vlo, rvfloat vhi);
00120 
00126   int vertidx(int);
00127 
00128   Mesh *parent;
00129 
00130 
00131 
00132 
00133 private:
00135   bool teheur_BlueWall(void);
00137   bool teheur_Lamp(void);
00139   bool teheur_Floor(void);
00141   bool teheur_Floor2(void);
00143   bool teheur_RWall(void);
00145   bool teheur_Box(void);
00147   bool teheur_CarImage(void);
00149   bool teheur_Pipe(void);
00151   bool teheur_BCeil(void);
00153   bool teheur_BRail(void);
00154 
00155 public:
00157   rvlong surface;
00159   rvlong ncp_type;
00160 
00161   EnvMapType envmap;
00162   RVColor env_color;
00163   RV_Poly data;
00165   rvfloat lower_coll;   // vag 2001-06-28
00166 };
00167 
00168 
00169 #endif

Generated at Mon Jul 2 16:54:58 2001 for rvtmod/rvglue by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000