All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Go to the documentation of this file.
1 #pragma once
3 // Potentially visible sets are used to optimize the rendering performance by culling primitives which aren't visible.
4 // They get precomputed using static geometry.
5 // So for really dynamic worlds one would probably need a different solution.
7 #include "inexor/shared/geom.hpp" // for ivec, vec (ptr only)
9 struct stream;
11 extern void clearpvs();
12 extern bool pvsoccluded(const ivec &bbmin, const ivec &bbmax);
13 extern bool pvsoccludedsphere(const vec &center, float radius);
14 extern bool waterpvsoccluded(int height);
15 extern void setviewcell(const vec &p);
16 extern void savepvs(stream *f);
17 extern void loadpvs(stream *f, int numpvs);
18 extern int getnumviewcells();
20 static inline bool pvsoccluded(const ivec &bborigin, int size)
21 {
22  return pvsoccluded(bborigin, ivec(bborigin).add(size));
23 }
int getnumviewcells()
Definition: pvs.cpp:1346
GLenum GLsizei GLsizei height
Definition: glexts.hpp:291
void clearpvs()
Definition: pvs.cpp:1042
ICOMMAND * f(float *a, float *b), floatret(*a **b)
void setviewcell(const vec &p)
Definition: pvs.cpp:1021
vector with 3 floats and some useful methods.
Definition: geom.hpp:110
bool pvsoccludedsphere(const vec &center, float radius)
Definition: pvs.cpp:1264
Legacy file system streams.
Definition: stream.hpp:22
GLuint GLuint GLintptr GLsizeiptr size
Definition: glexts.hpp:412
void loadpvs(stream *f, int numpvs)
Definition: pvs.cpp:1325
mathmatics for vectors, matrices, quaterions and more
bool pvsoccluded(const ivec &bbmin, const ivec &bbmax)
Definition: pvs.cpp:1259
3-dimensional INTEGER vectors
Definition: geom.hpp:1226
void savepvs(stream *f)
Definition: pvs.cpp:1295
bool waterpvsoccluded(int height)
Definition: pvs.cpp:1271