]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - contrib/bobtoolz/CPortals.h
transfer from internal tree r5311 branches/1.4-gpl
[xonotic/netradiant.git] / contrib / bobtoolz / CPortals.h
1 /*\r
2 BobToolz plugin for GtkRadiant\r
3 Copyright (C) 2001 Gordon Biggans\r
4 \r
5 This library is free software; you can redistribute it and/or\r
6 modify it under the terms of the GNU Lesser General Public\r
7 License as published by the Free Software Foundation; either\r
8 version 2.1 of the License, or (at your option) any later version.\r
9 \r
10 This library is distributed in the hope that it will be useful,\r
11 but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
13 Lesser General Public License for more details.\r
14 \r
15 You should have received a copy of the GNU Lesser General Public\r
16 License along with this library; if not, write to the Free Software\r
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
18 */\r
19 \r
20 #include "StdAfx.h"     // Added by ClassView\r
21 \r
22 class CBspPoint {\r
23 public:\r
24         float p[3];\r
25 };\r
26 \r
27 class CBspPortal {\r
28 public:\r
29         CBspPortal();\r
30         ~CBspPortal();\r
31 \r
32         unsigned point_count;\r
33         CBspPoint *point;\r
34         bool Build(char *def, unsigned int pointCnt, bool bInverse);\r
35 };\r
36 \r
37 \r
38 class CBspNode {\r
39 public:\r
40         CBspPortal *portal;\r
41         unsigned int portal_count;\r
42 \r
43         bool AddPortal(char* def, unsigned int pointCnt, bool bInverse);\r
44         unsigned int portal_next;\r
45         CBspNode();\r
46         ~CBspNode();\r
47 };\r
48 \r
49 \r
50 class CPortals {\r
51 public:\r
52 \r
53         CPortals();\r
54         ~CPortals();\r
55 \r
56         void Load(); // use filename in fn\r
57         void Purge();\r
58 \r
59         char fn[PATH_MAX];\r
60         CBspNode *node;\r
61 \r
62         unsigned int node_count;\r
63 };\r