QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Portal Functions

A portal is the polygonal interface between two leaf nodes, regardless of the contents of the two leaf nodes. More...

Data Structures

struct  portal_s
 

Macros

#define PORTALFILE   "PRT1-AM"
 

Typedefs

typedef struct portal_s portal_t
 

Functions

portal_tAllocPortal (void)
 Allocate a new portal. More...
 
void FreeAllPortals (struct node_s *node)
 Free all portals from a node and its decendents. More...
 
void FreePortal (portal_t *p)
 Free a portal. More...
 
void PortalizeWorld (struct node_s *headnode)
 Builds the exact polyhedrons for the nodes and leafs. More...
 
void PortalizeWorldDetail (struct node_s *headnode)
 Builds the exact polyhedrons for the nodes and leafs. More...
 
void WritePortalfile (struct node_s *headnode)
 Write the map's portals to the portal file. More...
 

Variables

int c_activeportals
 
int c_peakportals
 
int num_realleafs
 
int num_visleafs
 
int num_visportals
 
struct node_s outside_node
 
node_t outside_node
 
FILE * pf
 

Detailed Description

A portal is the polygonal interface between two leaf nodes, regardless of the contents of the two leaf nodes.

Decision nodes will not have portals on them, though as part of the portal building process, they will temporarily have portals.

Macro Definition Documentation

#define PORTALFILE   "PRT1-AM"

Typedef Documentation

typedef struct portal_s portal_t

Function Documentation

portal_t * AllocPortal ( void  )

Allocate a new portal.

Increases c_activeportals by one.

Returns
Pointer to the new portal.
void FreeAllPortals ( struct node_s node)

Free all portals from a node and its decendents.

Parameters
nodeThe node from which to remove and free portals.
void FreePortal ( portal_t p)

Free a portal.

Only the first portal will be freed. If the portal is linked to other portals, those portals will have to be freed seperately.

Reduces c_activeportals by one.

Parameters
pThe portal to free.
void PortalizeWorld ( struct node_s headnode)

Builds the exact polyhedrons for the nodes and leafs.

Parameters
headnodeThe root of the world bsp.
void PortalizeWorldDetail ( struct node_s headnode)

Builds the exact polyhedrons for the nodes and leafs.

Like PortalizeWorld, but stop at detail nodes - Alexander Malmberg.

Parameters
headnodeThe root of the world bsp.
void WritePortalfile ( struct node_s headnode)

Write the map's portals to the portal file.

Parameters
headnodeThe root of the map's bsp.

Variable Documentation

int c_activeportals
int c_peakportals
int num_realleafs
int num_visleafs
int num_visportals
struct node_s outside_node
node_t outside_node
FILE* pf