|
cbufcube.h00001 /* 00002 Copyright (C) 2000 by Jorrit Tyberghein 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public 00015 License along with this library; if not, write to the Free 00016 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #ifndef __CS_CBUFCUBE_H__ 00020 #define __CS_CBUFCUBE_H__ 00021 00022 class csClipper; 00023 00024 #include "csengine/cbuffer.h" 00025 #include "csengine/pol2d.h" 00026 #include "csgeom/polyclip.h" 00027 00032 class csCBufferPersp : public csCBuffer 00033 { 00034 private: 00036 bool DoPerspective (csVector3* verts, int num_verts, 00037 csPolygon2D& persp); 00038 00039 public: 00041 csCBufferPersp (int sx, int sy, int nlines) : csCBuffer (sx, sy, nlines) { } 00042 00047 bool InsertPolygon (csVector3* verts, int num_verts, csClipper* clipper = NULL); 00048 00053 bool TestPolygon (csVector3* verts, int num_verts, csClipper* clipper = NULL); 00054 }; 00055 00059 class csCBufferCube 00060 { 00061 private: 00063 csCBufferPersp* trees[6]; 00065 csBoxClipper* clipper; 00066 00067 public: 00069 csCBufferCube (int dim); 00070 00074 ~csCBufferCube (); 00075 00079 void MakeEmpty (); 00080 00084 bool IsFull (); 00085 00094 bool InsertPolygon (csVector3* verts, int num_verts); 00095 00103 bool TestPolygon (csVector3* verts, int num_verts); 00104 }; 00105 00106 #endif // __CS_CBUFCUBE_H__ 00107 Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000 |