]> icculus.org git repositories - divverent/netradiant.git/blob - contrib/bobtoolz/CPortals.h
Merge branch 'osxnetradiant'
[divverent/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         ~CBspPortal();
29
30         unsigned point_count;
31         CBspPoint *point;
32         bool Build(char *def, unsigned int pointCnt, bool bInverse);
33 };
34
35
36 class CBspNode {
37 public:
38         CBspPortal *portal;
39         unsigned int portal_count;
40
41         bool AddPortal(char* def, unsigned int pointCnt, bool bInverse);
42         unsigned int portal_next;
43         CBspNode();
44         ~CBspNode();
45 };
46
47
48 #define NAME_MAX 255
49
50 class CPortals {
51 public:
52
53         CPortals();
54         ~CPortals();
55
56         void Load(); // use filename in fn
57         void Purge();
58
59         char fn[NAME_MAX];
60         CBspNode *node;
61
62         unsigned int node_count;
63 };