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

texdef.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) 2001 Gabor Varga (vag) (bootes@freemail.hu)
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  */
00020 
00021 /*
00022  * $Id: texdef.h,v 1.1 2000/05/03 08:48:42 ali Exp ali $
00023  *
00024  * $Log: texdef.h,v $
00025  * Revision 1.1  2000/05/03 08:48:42  ali
00026  * Initial revision
00027  *
00028  *
00029  */
00030 #ifndef __TEXTURE_DEFINITION_H
00031 #define __TEXTURE_DEFINITION_H
00032 
00033 #include <rvtypes.h>
00034 #include "parser.h"
00035 
00036 
00037 #define TEX_UNKNOWN  -10
00038 
00039 
00041 
00045 class TextureDefinition
00046 {
00047 public:
00049   TextureDefinition();
00050   TextureDefinition(rvshort _tex, rvfloat _x0,rvfloat _x1,rvfloat _y0,rvfloat _y1);
00051 
00052 
00065   bool parseTexSpec(const char *str, TextureDefinition *def, Parser &, bool allow_asterisk);
00066 
00072   bool uv_in_def(rvshort sheet, RV_UV *uv);
00073 
00077   void rotateRight();   // vag 2001-05-08
00078 
00080   void printtex(FILE *);
00081 
00082   //protected:
00083   rvfloat x0,x1,y0,y1;
00084 
00086   rvshort tex;
00087 
00088 
00089 private:
00090   bool parseTexLetter(char *buf, Parser &, bool allow_asterisk);
00091   bool parseSingleNum(char *buf, int *num, Parser &);
00092   bool parseNumPair(char *obuf, char sepch, int *i1, int *i2, const char *pairname, Parser &);
00093 };
00094 
00095 
00100 extern TextureDefinition default_src_texdef;
00101 
00102 
00103 
00104 #endif

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