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

surface.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: surface.h,v 1.1 2000/05/03 08:49:54 ali Exp ali $
00022  *
00023  * $Log: surface.h,v $
00024  * Revision 1.1  2000/05/03 08:49:54  ali
00025  * Initial revision
00026  *
00027  *
00028  */
00029 #ifndef __SURFACE_H
00030 #define __SURFACE_H
00031 
00032 #include "rvtypes.h"
00033 #include "lookup.h"
00034 
00035 
00037 
00040 class Surface
00041 {
00042 public:
00043   Surface(rvulong stype, rvulong type,
00044           Vector *v0, Vector *v1, Vector *v2, Vector *v3=NULL);
00045 
00046   void createPolyhedron(rvulong);
00047   Vector planarNormal(void);
00048   void createPlane(RV_Plane *, Vector &normal, Vector &pos);
00049 
00050   void write(FILE *);
00051 
00052   void expandGrid(LookupGrid*);
00053 
00055   void enterIntoGrid(LookupGrid*, rvulong myidx);
00056 
00057   bool isInGrid(LookupGrid*, int, int);
00058 
00059 private:
00060   RV_Polyhedron ph;
00061   Vector vecs[4];
00062   Vector orient_vecs[4];
00063   bool   orient_is_waste[4];
00064   rvfloat orient_distance[4];
00065   int nvecs;
00066 };
00067 
00068 #endif

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