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

box.h

Go to the documentation of this file.
00001 /*
00002  *  Part of rvglue source code,
00003  *  Copyright (C) 2001 Gabor Varga (bootes@freemail.hu)
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 #ifndef __BOX_H
00021 #define __BOX_H
00022 
00023 #include "rvtypes.h"
00024 
00026 struct Box
00027 {
00031   void add_safety(rvfloat dist);
00035   bool axis_para(void);
00036 
00037   rvulong id;
00038   rvulong subid;
00039   Vector center;
00040   Matrix_3x3 rotation;
00041   Vector size;
00042 };
00043 
00045 class BoxList
00046 {
00047 public:
00048   BoxList();
00049   ~BoxList();
00050 
00051   void add(Box *box);   // ownership taken
00052   int write_taz(const char *fname, rvfloat grow=0.0);
00053   int write_vis(const char *fname, rvfloat cameraGrow=0.0, rvfloat cubeGrow=0.0);
00054 
00055 private:
00056 
00057   void checkSanity();
00058   void reset();
00059   void grow();
00060 
00061 private:
00062 
00063   int cnt;
00064   int max;
00065   Box **list;   // owned
00066 };
00067 
00068 #endif

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