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

lookup.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  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  */
00019 
00020 /*
00021  * $Id: lookup.h,v 1.1 2000/05/03 08:49:53 ali Exp ali $
00022  *
00023  * $Log: lookup.h,v $
00024  * Revision 1.1  2000/05/03 08:49:53  ali
00025  * Initial revision
00026  *
00027  *
00028  */
00029 #ifndef __LOOKUP_H
00030 #define __LOOKUP_H
00031 
00032 #include <vector>
00033 #include "rvtypes.h"
00034 #include "vector.h"
00035 //#include "ichain.h"
00036 
00037 
00038 typedef std::vector<rvulong> IndexChain;
00039 
00041 
00046 class LookupGrid
00047 {
00048 public:
00049   LookupGrid(rvulong _size);
00050   ~LookupGrid();
00051 
00052   void expandGrid(Vector &);
00053   void doneSizing(void);
00054 
00055   void write(FILE *);
00056 
00057   IndexChain *lichain(int x, int z);
00058 
00059   int xgridcoord(rvfloat x);
00060   int zgridcoord(rvfloat z);
00061 
00062   Vector gridcoord(int x, int z);
00063 
00064 private:
00065   rvulong size;
00066   rvfloat xlo, xhi, zlo, zhi;
00067   RV_LookupGrid data;
00068   int xsz, zsz;
00069   IndexChain **ichains;
00070 };
00071 
00072 #endif

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