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