![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
Go to the source code of this file.
Data Structures | |
struct | portalrecursioninfo_t |
Macros | |
#define | MAXRECURSIVEPORTALPLANES 1024 |
#define | MAXRECURSIVEPORTALS 256 |
#define | Portal_MaxsBoxPolygon(axis, axisvalue, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4) |
#define | Portal_MinsBoxPolygon(axis, axisvalue, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4) |
Functions | |
int | Portal_CheckBox (model_t *model, vec3_t eye, vec3_t a, vec3_t b) |
int | Portal_CheckPolygon (model_t *model, vec3_t eye, float *polypoints, int numpoints) |
static void | Portal_PolygonRecursiveMarkLeafs (mnode_t *node, float *polypoints, int numpoints) |
static int | Portal_PortalThroughPortalPlanes (tinyplane_t *clipplanes, int clipnumplanes, float *targpoints, int targnumpoints, float *out, int maxpoints) |
static void | Portal_RecursiveFindLeafForFlow (portalrecursioninfo_t *info, mnode_t *node) |
static void | Portal_RecursiveFlow (portalrecursioninfo_t *info, mleaf_t *leaf, int firstclipplane, int numclipplanes) |
static int | Portal_RecursiveFlowSearch (mleaf_t *leaf, vec3_t eye, int firstclipplane, int numclipplanes) |
void | Portal_Visibility (model_t *model, const vec3_t eye, int *leaflist, unsigned char *leafpvs, int *numleafspointer, int *surfacelist, unsigned char *surfacepvs, int *numsurfacespointer, const mplane_t *frustumplanes, int numfrustumplanes, int exact, const float *boxmins, const float *boxmaxs, float *updateleafsmins, float *updateleafsmaxs, unsigned char *shadowtrispvs, unsigned char *lighttrispvs, unsigned char *visitingleafpvs) |
Variables | |
static float | boxpoints [4 *3] |
static int | portal_markid = 0 |
static tinyplane_t | portalplanes [MAXRECURSIVEPORTALPLANES] |
static float | portaltemppoints [2][256][3] |
static float | portaltemppoints2 [256][3] |
static int | ranoutofportalplanes |
static int | ranoutofportals |
#define MAXRECURSIVEPORTALPLANES 1024 |
Definition at line 6 of file portals.c.
Referenced by Portal_CheckPolygon(), Portal_RecursiveFlow(), Portal_RecursiveFlowSearch(), and Portal_Visibility().
#define MAXRECURSIVEPORTALS 256 |
Definition at line 7 of file portals.c.
Referenced by Portal_CheckPolygon(), and Portal_Visibility().
Definition at line 195 of file portals.c.
Referenced by Portal_CheckBox().
Definition at line 182 of file portals.c.
Referenced by Portal_CheckBox().
Definition at line 208 of file portals.c.
References a, b, Portal_MaxsBoxPolygon, and Portal_MinsBoxPolygon.
Definition at line 131 of file portals.c.
References Con_Printf(), CrossProduct, tinyplane_t::dist, DotProduct, i, ixtable, MAXRECURSIVEPORTALPLANES, MAXRECURSIVEPORTALS, model, normal, NULL, portal_markid, Portal_PolygonRecursiveMarkLeafs(), Portal_RecursiveFlowSearch(), portalplanes, ranoutofportalplanes, ranoutofportals, v1, v2, VectorAdd, VectorClear, VectorNormalize, VectorScale, and VectorSubtract.
|
static |
Definition at line 99 of file portals.c.
References mnode_t::children, mplane_t::dist, DotProduct, i, mplane_t::normal, mnode_t::plane, portal_markid, and Portal_PolygonRecursiveMarkLeafs().
Referenced by Portal_CheckPolygon(), and Portal_PolygonRecursiveMarkLeafs().
|
static |
Definition at line 17 of file portals.c.
References i, min, normal, NULL, PolygonF_Divide(), portaltemppoints, and w.
Referenced by Portal_RecursiveFlow(), and Portal_RecursiveFlowSearch().
|
static |
Definition at line 405 of file portals.c.
References mnode_t::children, mleaf_t::clusterindex, mplane_t::dist, DotProduct, portalrecursioninfo_t::eye, f, mplane_t::normal, portalrecursioninfo_t::numfrustumplanes, mnode_t::plane, Portal_RecursiveFindLeafForFlow(), and Portal_RecursiveFlow().
Referenced by Portal_RecursiveFindLeafForFlow(), and Portal_Visibility().
|
static |
Definition at line 289 of file portals.c.
References BoxesOverlap, BoxInsideBox, portalrecursioninfo_t::boxmaxs, portalrecursioninfo_t::boxmins, model_t::brush, CHECKPVSBIT, CLEARPVSBIT, surfmesh_t::data_element3i, model_brush_t::data_leafs, model_t::data_surfaces, surfmesh_t::data_vertex3f, tinyplane_t::dist, DotProduct, portalrecursioninfo_t::exact, portalrecursioninfo_t::eye, mleaf_t::firstleafsurface, i, ixtable, portalrecursioninfo_t::leaflist, portalrecursioninfo_t::leafpvs, portalrecursioninfo_t::lighttrispvs, MAXRECURSIVEPORTALPLANES, mleaf_t::maxs, msurface_t::maxs, mleaf_t::mins, msurface_t::mins, portalrecursioninfo_t::model, mportal_t::next, normal, tinyplane_t::normal, msurface_t::num_firsttriangle, msurface_t::num_triangles, portalrecursioninfo_t::numleafs, mleaf_t::numleafsurfaces, mportal_t::numpoints, portalrecursioninfo_t::numsurfaces, mportal_t::past, mportal_t::plane, PlaneDiff, PointInfrontOfTriangle, mportal_t::points, Portal_PortalThroughPortalPlanes(), Portal_RecursiveFlow(), portalplanes, mleaf_t::portals, portaltemppoints2, ranoutofportalplanes, SETPVSBIT, portalrecursioninfo_t::shadowtrispvs, portalrecursioninfo_t::surfacelist, portalrecursioninfo_t::surfacepvs, model_t::surfmesh, TriangleBBoxOverlapsBox, TriangleNormal, portalrecursioninfo_t::updateleafsmaxs, portalrecursioninfo_t::updateleafsmins, v, VectorAdd, VectorClear, VectorCopy, VectorNormalize, VectorScale, and portalrecursioninfo_t::visitingleafpvs.
Referenced by Portal_RecursiveFindLeafForFlow(), and Portal_RecursiveFlow().
|
static |
Definition at line 38 of file portals.c.
References CrossProduct, tinyplane_t::dist, DotProduct, i, ixtable, MAXRECURSIVEPORTALPLANES, mportal_t::next, normal, mportal_t::numpoints, mportal_t::past, mportal_t::plane, PlaneDiff, mportal_t::points, portal_markid, Portal_PortalThroughPortalPlanes(), Portal_RecursiveFlowSearch(), mleaf_t::portalmarkid, portalplanes, mleaf_t::portals, portaltemppoints2, ranoutofportalplanes, v1, v2, VectorAdd, VectorClear, VectorNormalize, VectorScale, and VectorSubtract.
Referenced by Portal_CheckPolygon(), and Portal_RecursiveFlowSearch().
void Portal_Visibility | ( | model_t * | model, |
const vec3_t | eye, | ||
int * | leaflist, | ||
unsigned char * | leafpvs, | ||
int * | numleafspointer, | ||
int * | surfacelist, | ||
unsigned char * | surfacepvs, | ||
int * | numsurfacespointer, | ||
const mplane_t * | frustumplanes, | ||
int | numfrustumplanes, | ||
int | exact, | ||
const float * | boxmins, | ||
const float * | boxmaxs, | ||
float * | updateleafsmins, | ||
float * | updateleafsmaxs, | ||
unsigned char * | shadowtrispvs, | ||
unsigned char * | lighttrispvs, | ||
unsigned char * | visitingleafpvs ) |
Definition at line 423 of file portals.c.
References portalrecursioninfo_t::boxmaxs, portalrecursioninfo_t::boxmins, Con_Print(), Con_Printf(), mplane_t::dist, tinyplane_t::dist, portalrecursioninfo_t::exact, portalrecursioninfo_t::eye, i, portalrecursioninfo_t::leaflist, portalrecursioninfo_t::leafpvs, portalrecursioninfo_t::lighttrispvs, MAXRECURSIVEPORTALPLANES, MAXRECURSIVEPORTALS, model, portalrecursioninfo_t::model, normal, NULL, portalrecursioninfo_t::numfrustumplanes, portalrecursioninfo_t::numleafs, portalrecursioninfo_t::numsurfaces, Portal_RecursiveFindLeafForFlow(), portalplanes, ranoutofportalplanes, ranoutofportals, portalrecursioninfo_t::shadowtrispvs, portalrecursioninfo_t::surfacelist, portalrecursioninfo_t::surfacepvs, portalrecursioninfo_t::updateleafsmaxs, portalrecursioninfo_t::updateleafsmins, VectorCopy, and portalrecursioninfo_t::visitingleafpvs.
Referenced by R_Mod_GetLightInfo().
|
static |
Definition at line 14 of file portals.c.
Referenced by Portal_CheckPolygon(), Portal_PolygonRecursiveMarkLeafs(), and Portal_RecursiveFlowSearch().
|
static |
Definition at line 9 of file portals.c.
Referenced by Portal_CheckPolygon(), Portal_RecursiveFlow(), Portal_RecursiveFlowSearch(), and Portal_Visibility().
|
static |
Definition at line 12 of file portals.c.
Referenced by Portal_PortalThroughPortalPlanes().
|
static |
Definition at line 13 of file portals.c.
Referenced by Portal_RecursiveFlow(), and Portal_RecursiveFlowSearch().
|
static |
Definition at line 10 of file portals.c.
Referenced by Portal_CheckPolygon(), Portal_RecursiveFlow(), Portal_RecursiveFlowSearch(), and Portal_Visibility().
|
static |
Definition at line 11 of file portals.c.
Referenced by Portal_CheckPolygon(), and Portal_Visibility().