Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
octree.hpp
Go to the documentation of this file.
1 // 6-directional octree heightfield map format
2 
3 #pragma once
4 
5 #include <boost/algorithm/clamp.hpp> // for clamp
6 
7 #include "inexor/network/SharedVar.hpp" // for SharedVar
8 #include "inexor/shared/cube_loops.hpp" // for loopi
9 #include "inexor/shared/cube_types.hpp" // for uchar, uint, ushort
10 #include "inexor/shared/cube_vector.hpp" // for vector
11 #include "inexor/shared/ents.hpp" // for entity
12 #include "inexor/shared/geom.hpp" // for ivec, ivec::(anonymous unio...
13 
14 struct vertex;
15 
16 struct elementset
17 {
21 };
22 
23 enum
24 {
25  EMID_NONE = 0,
29 };
30 
32 {
37  union
38  {
39  short index;
40  short depth;
41  };
42  union
43  {
44  entity *light;
45  ushort envmap;
46  uchar ends;
47  };
48 };
49 
50 struct vertinfo
51 {
52  ushort x, y, z, u, v, norm;
53 
54  void setxyz(ushort a, ushort b, ushort c) { x = a; y = b; z = c; }
55  void setxyz(const ivec &v) { setxyz(v.x, v.y, v.z); }
56  void set(ushort a, ushort b, ushort c, ushort s = 0, ushort t = 0, ushort n = 0) { setxyz(a, b, c); u = s; v = t; norm = n; }
57  void set(const ivec &v, ushort s = 0, ushort t = 0, ushort n = 0) { set(v.x, v.y, v.z, s, t, n); }
58  ivec getxyz() const { return ivec(x, y, z); }
59 };
60 
61 enum
62 {
63  LAYER_TOP = (1<<5),
64  LAYER_BOTTOM = (1<<6),
65  LAYER_DUP = (1<<7),
66 
68 
70 };
71 
73 
75 {
76  uchar lmid[2];
78 
80  bool used() const { return lmid[0] != LMID_AMBIENT || lmid[1] != LMID_AMBIENT || numverts&~LAYER_TOP; }
83 };
84 
88 
89 struct grasstri
90 {
91  vec v[4];
92  int numv;
96  float radius;
97  float minz, maxz;
99 };
100 
102 {
103  void *owner;
106 };
107 
108 struct vtxarray;
109 
111 {
116  int distance;
118  int size;
120 
121  octaentities(const ivec &o, int size) : query(nullptr), o(o), size(size), bbmin(o), bbmax(o)
122  {
123  bbmin.add(size);
124  }
125 };
126 
127 enum
128 {
133 };
134 
135 enum
136 {
137  MERGE_ORIGIN = 1<<0,
138  MERGE_PART = 1<<1,
139  MERGE_USE = 1<<2
140 };
141 
142 struct vtxarray
143 {
146  vtxarray *next, *rnext; // linked list of visible VOBs
147  vertex *vdata; // vertex data
148  ushort voffset; // offset into vertex data
149  ushort *edata, *skydata; // vertex indices
150  uint vbuf, ebuf, skybuf; // VBOs
151  ushort minvert, maxvert; // DRE info
152  elementset *eslist; // List of element indices sets (range) per texture
153  materialsurface *matbuf; // buffer of material surfaces
155  double skyarea;
157  int size; // location and size of cube.
158  ivec geommin, geommax; // BB of geom
159  ivec shadowmapmin, shadowmapmax; // BB of shadowmapped surfaces
160  ivec matmin, matmax; // BB of any materials
161  ivec bbmin, bbmax; // BB of everything including children
168  bool shadowed;
169 };
170 
171 struct cube;
172 
174 {
175  vec o, r, v[8];
176  plane p[12];
177  uchar side[12];
179  const cube *owner;
180  int version;
181 };
182 
184 {
186 
187  bool empty() const { return u1 >= u2 || v1 >= v2; }
188 };
189 
190 struct tjoint
191 {
192  int next;
195 };
196 
197 struct cubeext
198 {
199  vtxarray *va; // vertex array for children, or NULL
200  octaentities *ents; // map entities inside cube
201  surfaceinfo surfaces[6]; // render info for each surface
202  int tjoints; // linked list of t-joints
203  uchar maxverts; // allocated space for verts
204 
205  vertinfo *verts() { return (vertinfo *)(this+1); }
206 };
207 
208 struct cube
209 {
210  cube *children; // points to 8 cube structures which are its children, or NULL. -Z first, then -Y, -X
211  cubeext *ext; // extended info for the cube
212  union
213  {
214  uchar edges[12]; // edges of the cube, each uchar is 2 4bit values denoting the range.
215  // see documentation jpgs for more info.
216  uint faces[3]; // 4 edges of each dimension together representing 2 perpendicular faces
217  };
218  ushort texture[6]; // one for each face. same order as orient.
219  ushort material; // empty-space material
220  uchar merged; // merged faces of the cube
221  union
222  {
223  uchar escaped; // mask of which children have escaped merges
224  uchar visible; // visibility info for faces
225  };
226 };
227 
229 
231 struct selinfo
232 {
233  int corner;
234  int cx, cxs, cy, cys;
235  ivec o, s;
236  int grid, orient;
237  selinfo() : corner(0), cx(0), cxs(0), cy(0), cys(0), o(0, 0, 0), s(0, 0, 0), grid(8), orient(0) {}
238  int size() const { return s.x*s.y*s.z; }
239  int us(int d) const { return s[d]*grid; }
240  bool operator==(const selinfo &sel) const { return o==sel.o && s==sel.s && grid==sel.grid && orient==sel.orient; }
241  bool validate()
242  {
243  using boost::algorithm::clamp;
244  if(grid <= 0 || grid >= worldsize) return false;
245  if(o.x >= worldsize || o.y >= worldsize || o.z >= worldsize) return false;
246  if(o.x < 0) { s.x -= (grid - 1 - o.x)/grid; o.x = 0; }
247  if(o.y < 0) { s.y -= (grid - 1 - o.y)/grid; o.y = 0; }
248  if(o.z < 0) { s.z -= (grid - 1 - o.z)/grid; o.z = 0; }
249  s.x = clamp(s.x, 0, (worldsize - o.x)/grid);
250  s.y = clamp(s.y, 0, (worldsize - o.y)/grid);
251  s.z = clamp(s.z, 0, (worldsize - o.z)/grid);
252  return s.x > 0 && s.y > 0 && s.z > 0;
253  }
254 };
255 
256 struct block3
257 {
258  ivec o, s;
259  int grid, orient;
260  block3() {}
261  block3(const selinfo &sel) : o(sel.o), s(sel.s), grid(sel.grid), orient(sel.orient) {}
262  cube *c() { return (cube *)(this+1); }
263  int size() const { return s.x*s.y*s.z; }
264 };
265 
266 struct editinfo
267 {
269  editinfo() : copy(nullptr) {}
270 };
271 
272 struct undoent { int i; entity e; };
273 struct undoblock // undo header, all data sits in payload
274 {
276  int size, timestamp, numents; // if numents is 0, is a cube undo record, otherwise an entity undo record
277 
278  block3 *block() { return (block3 *)(this + 1); }
280  {
281  block3 *ub = block();
282  return (uchar *)(ub->c() + ub->size());
283  }
284  undoent *ents() { return (undoent *)(this + 1); }
285 };
286 
287 extern cube *worldroot; // the world data. only a ptr to 8 cubes (ie: like cube.children above)
288 extern int wtris, wverts, vtris, vverts, glde, gbatches, rplanes;
290 
291 const uint F_EMPTY = 0; // all edges in the range (0,0)
292 const uint F_SOLID = 0x80808080; // all edges in the range (0,8)
293 
294 #define isempty(c) ((c).faces[0]==F_EMPTY)
295 #define isentirelysolid(c) ((c).faces[0]==F_SOLID && (c).faces[1]==F_SOLID && (c).faces[2]==F_SOLID)
296 #define setfaces(c, face) { (c).faces[0] = (c).faces[1] = (c).faces[2] = face; }
297 #define solidfaces(c) setfaces(c, F_SOLID)
298 #define emptyfaces(c) setfaces(c, F_EMPTY)
299 
300 #define edgemake(a, b) ((b)<<4|a)
301 #define edgeget(edge, coord) ((coord) ? (edge)>>4 : (edge)&0xF)
302 #define edgeset(edge, coord, val) ((edge) = ((coord) ? ((edge)&0xF)|((val)<<4) : ((edge)&0xF0)|(val)))
303 
304 #define cubeedge(c, d, x, y) ((c).edges[(((d)<<2)+((y)<<1)+(x))])
305 
306 #define octadim(d) (1<<(d)) // creates mask for bit of given dimension
307 #define octacoord(d, i) (((i)&octadim(d))>>(d))
308 #define oppositeocta(d, i) ((i)^octadim(D[d]))
309 #define octaindex(d,x,y,z) (((z)<<D[d])+((y)<<C[d])+((x)<<R[d]))
310 #define octastep(x, y, z, scale) (((((z)>>(scale))&1)<<2) | ((((y)>>(scale))&1)<<1) | (((x)>>(scale))&1))
311 
312 static inline uchar octaboxoverlap(const ivec &o, int size, const ivec &bbmin, const ivec &bbmax)
313 {
314  uchar p = 0xFF; // bitmask of possible collisions with octants. 0 bit = 0 octant, etc
315  ivec mid = ivec(o).add(size);
316  if(mid.z <= bbmin.z) p &= 0xF0; // not in a -ve Z octant
317  else if(mid.z >= bbmax.z) p &= 0x0F; // not in a +ve Z octant
318  if(mid.y <= bbmin.y) p &= 0xCC; // not in a -ve Y octant
319  else if(mid.y >= bbmax.y) p &= 0x33; // etc..
320  if(mid.x <= bbmin.x) p &= 0xAA;
321  else if(mid.x >= bbmax.x) p &= 0x55;
322  return p;
323 }
324 
325 #define loopoctabox(o, size, bbmin, bbmax) uchar possible = octaboxoverlap(o, size, bbmin, bbmax); loopi(8) if(possible&(1<<i))
326 #define loopoctaboxsize(o, size, bborigin, bbsize) uchar possible = octaboxoverlap(o, size, bborigin, ivec(bborigin).add(bbsize)); loopi(8) if(possible&(1<<i))
327 
328 enum
329 {
330  O_LEFT = 0,
336 };
337 
338 #define dimension(orient) ((orient)>>1)
339 #define dimcoord(orient) ((orient)&1)
340 #define opposite(orient) ((orient)^1)
341 
342 enum
343 {
351 };
352 
353 #define GENCUBEVERTS(x0,x1, y0,y1, z0,z1) \
354  GENCUBEVERT(0, x1, y1, z0) \
355  GENCUBEVERT(1, x0, y1, z0) \
356  GENCUBEVERT(2, x0, y1, z1) \
357  GENCUBEVERT(3, x1, y1, z1) \
358  GENCUBEVERT(4, x1, y0, z1) \
359  GENCUBEVERT(5, x0, y0, z1) \
360  GENCUBEVERT(6, x0, y0, z0) \
361  GENCUBEVERT(7, x1, y0, z0)
362 
363 #define GENFACEVERTX(o,n, x,y,z, xv,yv,zv) GENFACEVERT(o,n, x,y,z, xv,yv,zv)
364 #define GENFACEVERTSX(x0,x1, y0,y1, z0,z1, c0,c1, r0,r1, d0,d1) \
365  GENFACEORIENT(0, GENFACEVERTX(0,0, x0,y1,z1, d0,r1,c1), GENFACEVERTX(0,1, x0,y1,z0, d0,r1,c0), GENFACEVERTX(0,2, x0,y0,z0, d0,r0,c0), GENFACEVERTX(0,3, x0,y0,z1, d0,r0,c1)) \
366  GENFACEORIENT(1, GENFACEVERTX(1,0, x1,y1,z1, d1,r1,c1), GENFACEVERTX(1,1, x1,y0,z1, d1,r0,c1), GENFACEVERTX(1,2, x1,y0,z0, d1,r0,c0), GENFACEVERTX(1,3, x1,y1,z0, d1,r1,c0))
367 #define GENFACEVERTY(o,n, x,y,z, xv,yv,zv) GENFACEVERT(o,n, x,y,z, xv,yv,zv)
368 #define GENFACEVERTSY(x0,x1, y0,y1, z0,z1, c0,c1, r0,r1, d0,d1) \
369  GENFACEORIENT(2, GENFACEVERTY(2,0, x1,y0,z1, c1,d0,r1), GENFACEVERTY(2,1, x0,y0,z1, c0,d0,r1), GENFACEVERTY(2,2, x0,y0,z0, c0,d0,r0), GENFACEVERTY(2,3, x1,y0,z0, c1,d0,r0)) \
370  GENFACEORIENT(3, GENFACEVERTY(3,0, x0,y1,z0, c0,d1,r0), GENFACEVERTY(3,1, x0,y1,z1, c0,d1,r1), GENFACEVERTY(3,2, x1,y1,z1, c1,d1,r1), GENFACEVERTY(3,3, x1,y1,z0, c1,d1,r0))
371 #define GENFACEVERTZ(o,n, x,y,z, xv,yv,zv) GENFACEVERT(o,n, x,y,z, xv,yv,zv)
372 #define GENFACEVERTSZ(x0,x1, y0,y1, z0,z1, c0,c1, r0,r1, d0,d1) \
373  GENFACEORIENT(4, GENFACEVERTZ(4,0, x0,y0,z0, r0,c0,d0), GENFACEVERTZ(4,1, x0,y1,z0, r0,c1,d0), GENFACEVERTZ(4,2, x1,y1,z0, r1,c1,d0), GENFACEVERTZ(4,3, x1,y0,z0, r1,c0,d0)) \
374  GENFACEORIENT(5, GENFACEVERTZ(5,0, x0,y0,z1, r0,c0,d1), GENFACEVERTZ(5,1, x1,y0,z1, r1,c0,d1), GENFACEVERTZ(5,2, x1,y1,z1, r1,c1,d1), GENFACEVERTZ(5,3, x0,y1,z1, r0,c1,d1))
375 #define GENFACEVERTSXY(x0,x1, y0,y1, z0,z1, c0,c1, r0,r1, d0,d1) \
376  GENFACEVERTSX(x0,x1, y0,y1, z0,z1, c0,c1, r0,r1, d0,d1) \
377  GENFACEVERTSY(x0,x1, y0,y1, z0,z1, c0,c1, r0,r1, d0,d1)
378 #define GENFACEVERTS(x0,x1, y0,y1, z0,z1, c0,c1, r0,r1, d0,d1) \
379  GENFACEVERTSXY(x0,x1, y0,y1, z0,z1, c0,c1, r0,r1, d0,d1) \
380  GENFACEVERTSZ(x0,x1, y0,y1, z0,z1, c0,c1, r0,r1, d0,d1)
381 
Definition: octree.hpp:348
int numents
Definition: octree.hpp:276
Definition: octree.hpp:64
ushort v
Definition: octree.hpp:52
surfaceinfo surfaces[6]
Definition: octree.hpp:201
vtxarray * va
Definition: octree.hpp:199
uchar orient
Definition: octree.hpp:36
int size() const
Definition: octree.hpp:238
Definition: octree.hpp:25
ivec bbmin
Definition: octree.hpp:161
Definition: octree.hpp:72
occludequery * query
Definition: octree.hpp:114
ivec geommin
Definition: octree.hpp:158
int gbatches
Definition: octarender.cpp:1235
vertex * vdata
Definition: octree.hpp:147
uchar curvfc
Definition: octree.hpp:162
Definition: octree.hpp:72
int cy
Definition: octree.hpp:234
void * owner
Definition: octree.hpp:103
int numv
Definition: octree.hpp:92
Definition: octree.hpp:72
Selection info: the marked area when editing.
Definition: octree.hpp:231
cubeext * ext
Definition: octree.hpp:211
vec center
Definition: octree.hpp:95
uint ebuf
Definition: octree.hpp:150
octaentities * rnext
Definition: octree.hpp:115
unsigned int uint
Definition: cube_types.hpp:9
ushort lmid
Definition: octree.hpp:18
uint skybuf
Definition: octree.hpp:150
Definition: octree.hpp:72
int distance
Definition: octree.hpp:154
Definition: octree.hpp:132
ushort material
Definition: octree.hpp:35
int cx
Definition: octree.hpp:234
int glde
Definition: octarender.cpp:1235
int cxs
Definition: octree.hpp:234
block3()
Definition: octree.hpp:260
Definition: octree.hpp:183
Definition: octree.hpp:137
Definition: octree.hpp:74
ushort texture
Definition: octree.hpp:98
SharedVar< int > worldsize
ivec & add(int n)
Definition: geom.hpp:1269
int distance
Definition: octree.hpp:116
Definition: octree.hpp:173
ushort * edata
Definition: octree.hpp:149
octaentities(const ivec &o, int size)
Definition: octree.hpp:121
Definition: octree.hpp:331
ushort texture
Definition: octree.hpp:18
Definition: cubemap.cpp:202
uchar layer
Definition: octree.hpp:19
GLintptr GLsizeiptr length
Definition: glexts.hpp:354
Definition: octree.hpp:349
bool empty() const
Definition: octree.hpp:187
ushort offset
Definition: octree.hpp:193
int grid
Definition: octree.hpp:259
vector< int > mapmodels
Definition: octree.hpp:112
ushort minvert
Definition: octree.hpp:151
int size() const
Definition: octree.hpp:263
occludequery * query
Definition: octree.hpp:163
Definition: octree.hpp:344
Definition: octree.hpp:72
Definition: octree.hpp:190
Definition: octree.hpp:16
uchar maxverts
Definition: octree.hpp:203
int explicitsky
Definition: octree.hpp:154
ushort * skydata
Definition: octree.hpp:149
const uint F_EMPTY
Definition: octree.hpp:291
Definition: octree.hpp:31
Definition: octree.hpp:110
uchar merged
Definition: octree.hpp:220
static uchar octaboxoverlap(const ivec &o, int size, const ivec &bbmin, const ivec &bbmax)
Definition: octree.hpp:312
int totalverts() const
Definition: octree.hpp:79
Definition: octree.hpp:89
editinfo()
Definition: octree.hpp:269
ivec shadowmapmin
Definition: octree.hpp:159
Definition: octree.hpp:65
persistent map entity.
Definition: ents.hpp:66
int texs
Definition: octree.hpp:154
Definition: octree.hpp:138
ushort v1
Definition: octree.hpp:185
int orient
Definition: octree.hpp:236
octaentities * next
Definition: octree.hpp:115
Definition: octree.hpp:67
ushort u
Definition: octree.hpp:52
vector< octaentities * > mapmodels
Definition: octree.hpp:164
int sky
Definition: octree.hpp:154
uchar occluded
Definition: octree.hpp:162
vector< int > other
Definition: octree.hpp:113
ushort u2
Definition: octree.hpp:185
plane p[12]
Definition: octree.hpp:176
int next
Definition: octree.hpp:192
4-dimensional float vector all methods stay basicly the same but with an extra dimension ...
Definition: geom.hpp:343
Definition: octree.hpp:330
int orient
Definition: octree.hpp:259
int alphafronttris
Definition: octree.hpp:154
Definition: octree.hpp:335
int vverts
Definition: octarender.cpp:1235
unsigned short ushort
Definition: cube_types.hpp:8
ivec bbmax
Definition: octree.hpp:119
Definition: octree.hpp:101
plane surface
Definition: octree.hpp:94
ivec bbmin
Definition: octree.hpp:119
Definition: octree.hpp:256
Definition: octree.hpp:131
Definition: octree.hpp:346
int i
Definition: octree.hpp:272
ushort csize
Definition: octree.hpp:34
float minz
Definition: octree.hpp:97
elementset * eslist
Definition: octree.hpp:152
void setxyz(const ivec &v)
Definition: octree.hpp:55
vtxarray * rnext
Definition: octree.hpp:146
vec v[8]
Definition: octree.hpp:175
GLuint index
Definition: glexts.hpp:412
selinfo()
Definition: octree.hpp:237
vtxarray * next
Definition: octree.hpp:146
Definition: octree.hpp:130
undoblock * prev
Definition: octree.hpp:275
ushort minvert[2]
Definition: octree.hpp:20
int mergelevel
Definition: octree.hpp:166
ivec s
Definition: octree.hpp:235
uint vbuf
Definition: octree.hpp:150
ivec shadowmapmax
Definition: octree.hpp:159
ushort envmap
Definition: octree.hpp:18
cube * worldroot
Definition: octa.cpp:33
int size
Definition: octree.hpp:157
vector with 3 floats and some useful methods.
Definition: geom.hpp:110
vec4 tcu
Definition: octree.hpp:93
uint id
Definition: octree.hpp:104
uchar * gridmap()
Definition: octree.hpp:279
Definition: octree.hpp:272
ushort u1
Definition: octree.hpp:185
int alphafront
Definition: octree.hpp:154
vec r
Definition: octree.hpp:175
uchar dim
Definition: octree.hpp:19
uint dynlightmask
Definition: octree.hpp:167
Definition: octree.hpp:332
bool operator==(const selinfo &sel) const
Definition: octree.hpp:240
Definition: octree.hpp:347
int tjoints
Definition: octree.hpp:202
int corner
Definition: octree.hpp:233
Definition: octree.hpp:72
ushort skip
Definition: octree.hpp:35
vec v[4]
Definition: octree.hpp:91
int skyfaces
Definition: octree.hpp:154
int skyclip
Definition: octree.hpp:154
Definition: octree.hpp:27
vertinfo * verts()
Definition: octree.hpp:205
int texmask
Definition: octree.hpp:154
uchar visible
Definition: octree.hpp:36
int blendtris
Definition: octree.hpp:154
Definition: octree.hpp:334
int cys
Definition: octree.hpp:234
int size
Definition: octree.hpp:118
ushort lmid
Definition: octree.hpp:98
ivec geommax
Definition: octree.hpp:158
Definition: octree.hpp:139
const uint F_SOLID
Definition: octree.hpp:292
ivec matmax
Definition: octree.hpp:160
int d
Definition: octaedit.cpp:1749
void t(T x, const char *cmp)
Definition: utilTest.cpp:52
entity e
Definition: octree.hpp:272
vec4 tcv
Definition: octree.hpp:93
void brighten()
Definition: octree.hpp:82
Definition: octree.hpp:333
int selchildcount
the amount of selected child cubes they will be displayed in the bottom left of you screen in coopedi...
Definition: octaedit.cpp:376
float radius
Definition: octree.hpp:96
int alphabacktris
Definition: octree.hpp:154
ivec bbmax
Definition: octree.hpp:161
unsigned char uchar
Basic type definitions.
Definition: cube_types.hpp:7
int fragments
Definition: octree.hpp:105
undoblock * next
Definition: octree.hpp:275
uchar edge
Definition: octree.hpp:194
int allocnodes
Definition: octa.cpp:34
static const surfaceinfo ambientsurface
Definition: octree.hpp:85
void setxyz(ushort a, ushort b, ushort c)
Definition: octree.hpp:54
ivec getxyz() const
Definition: octree.hpp:58
GLuint GLuint GLintptr GLsizeiptr size
Definition: glexts.hpp:412
void clear()
Definition: octree.hpp:81
ivec o
Definition: octree.hpp:33
int timestamp
Definition: octree.hpp:276
Definition: octree.hpp:197
materialsurface * matbuf
Definition: octree.hpp:153
undoent * ents()
Definition: octree.hpp:284
Definition: octree.hpp:63
int allocva
Definition: octarender.cpp:1234
int alphaback
Definition: octree.hpp:154
block3 * block()
Definition: octree.hpp:278
uchar numverts
Definition: octree.hpp:77
int tris
Definition: octree.hpp:154
block3(const selinfo &sel)
Definition: octree.hpp:261
int us(int d) const
Definition: octree.hpp:239
ivec o
Definition: octree.hpp:258
ivec o
Definition: octree.hpp:156
ushort voffset
Definition: octree.hpp:148
ushort y
Definition: octree.hpp:52
int vtris
Definition: octarender.cpp:1235
ushort maxvert[2]
Definition: octree.hpp:20
int version
Definition: octree.hpp:180
Definition: world.hpp:82
vector< vtxarray * > children
Definition: octree.hpp:145
SharedVar wrapper for primitive/immutable objects.
Definition: SharedVar.hpp:55
block3 * copy
Definition: octree.hpp:268
ushort z
Definition: octree.hpp:52
cube * children
Definition: octree.hpp:210
int wtris
Definition: octarender.cpp:1235
Definition: octree.hpp:26
int selchildmat
Definition: octaedit.cpp:377
bool validate()
Definition: octree.hpp:241
ivec matmin
Definition: octree.hpp:160
vtxarray * parent
Definition: octree.hpp:144
int blends
Definition: octree.hpp:154
float maxz
Definition: octree.hpp:97
int size
Definition: octree.hpp:276
ivec s
Definition: octree.hpp:258
Definition: octree.hpp:266
Definition: octree.hpp:129
vec o
Definition: octree.hpp:175
int hasmerges
Definition: octree.hpp:166
static const surfaceinfo brightbottomsurface
Definition: octree.hpp:87
Definition: octree.hpp:28
static const surfaceinfo brightsurface
Definition: octree.hpp:86
static map entities ("entity") and dynamic entities (players/monsters, "dynent") the gamecode extends...
cube * c()
Definition: octree.hpp:262
int matsurfs
Definition: octree.hpp:154
void set(const ivec &v, ushort s=0, ushort t=0, ushort n=0)
Definition: octree.hpp:57
ushort norm
Definition: octree.hpp:52
ushort rsize
Definition: octree.hpp:34
ushort maxvert
Definition: octree.hpp:151
mathmatics for vectors, matrices, quaterions and more
octaentities * ents
Definition: octree.hpp:200
int rplanes
Definition: water.cpp:710
int wverts
Definition: octarender.cpp:1235
Definition: octree.hpp:69
Definition: octree.hpp:273
selinfo sel
Bot Movement, according to waypoints (saved within the map in an excluded file).
Definition: octaedit.cpp:162
Definition: octree.hpp:142
int grid
Definition: octree.hpp:236
void set(ushort a, ushort b, ushort c, ushort s=0, ushort t=0, ushort n=0)
Definition: octree.hpp:56
Definition: octree.hpp:72
uchar side[12]
Definition: octree.hpp:177
Definition: geom.hpp:1121
double skyarea
Definition: octree.hpp:155
uchar visible
Definition: octree.hpp:178
bool shadowed
Definition: octree.hpp:168
bool used() const
Definition: octree.hpp:80
3-dimensional INTEGER vectors
Definition: geom.hpp:1226
GLenum GLenum GLuint texture
Definition: glexts.hpp:296
uchar size
Definition: octree.hpp:178
const cube * owner
Definition: octree.hpp:179
Definition: octree.hpp:208
Definition: octree.hpp:350
ushort x
Definition: octree.hpp:52
int verts
Definition: octree.hpp:154
ushort material
Definition: octree.hpp:219
vector< grasstri > grasstris
Definition: octree.hpp:165
ivec o
Definition: octree.hpp:117
uchar lmid[2]
Definition: octree.hpp:76
ushort v2
Definition: octree.hpp:185
Definition: octree.hpp:345
Definition: octree.hpp:50
uchar verts
Definition: octree.hpp:77
ivec o
Definition: octree.hpp:235