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

Data Structures

struct  brush_s
 
struct  brushset_s
 

Macros

#define ANGLEEPSILON   0.00001
 
#define DISTEPSILON   0.01
 
#define MAX_HULL_EDGES   MAX_HULL_POINTS * 2
 
#define MAX_HULL_POINTS   256
 
#define NUM_CONTENTS   2
 
#define NUM_HULLS   2
 
#define ZERO_EPSILON   0.001
 

Typedefs

typedef struct brush_s brush_t
 
typedef struct brushset_s brushset_t
 

Functions

brush_tAllocBrush (void)
 Allocate a new brush. More...
 
brushset_tBrush_LoadEntity (entity_t *ent, int hullnum)
 Load the brushes from the entity. More...
 
int FindPlane (const plane_t *dplane, int *side)
 Add a plane to the global list of planes. More...
 
int NormalizePlane (plane_t *dp)
 Make the plane canonical. More...
 
int PlaneTypeForNormal (const vec3_t normal)
 Determine the primary axis of the normal. More...
 

Variables

face_tbrush_faces
 
vec3_t brush_maxs
 
vec3_t brush_mins
 
mface_t faces [MAX_FACES]
 
vec3_t hull_corners [MAX_HULL_POINTS *8]
 
int hull_edges [MAX_HULL_EDGES][2]
 
vec3_t hull_points [MAX_HULL_POINTS]
 
vec3_t hull_size [3][2]
 
int num_hull_edges
 
int num_hull_points
 
int numbrushfaces
 
int numbrushplanes
 
int numbrushplanes
 
plane_t planes [MAX_MAP_PLANES]
 
plane_t planes [MAX_MAP_PLANES]
 

Detailed Description

Macro Definition Documentation

#define ANGLEEPSILON   0.00001
#define DISTEPSILON   0.01
#define MAX_HULL_EDGES   MAX_HULL_POINTS * 2
#define MAX_HULL_POINTS   256
#define NUM_CONTENTS   2
#define NUM_HULLS   2
#define ZERO_EPSILON   0.001

Typedef Documentation

typedef struct brush_s brush_t
typedef struct brushset_s brushset_t

Function Documentation

brush_t * AllocBrush ( void  )

Allocate a new brush.

Returns
Pointer to the new brush.
brushset_t * Brush_LoadEntity ( entity_t ent,
int  hullnum 
)

Load the brushes from the entity.

Parameters
entThe entity from which to load the brushes.
hullnumThe number of the hull for which to load the brushes.
Returns
The brush set holding the brushes loaded from the entity.
int FindPlane ( const plane_t dplane,
int side 
)

Add a plane to the global list of planes.

Make the plane canonical, and add it to the global list of planes if it does not duplicate a plane that is already in the list. If the plane is flipped while being made canonical, side will be set to 1, otherwise side will be 0.

Parameters
dplaneThe plane to add.
sideThe side of the plane that will be front.
Returns
global plane number.
int NormalizePlane ( plane_t dp)

Make the plane canonical.

A cononical plane is one whose normal points towards +inf on its primary axis. The primary axis is that which has the largest magnitude of the vector's components.

Parameters
dpThe plane to make canonical.
Returns
1 if the plane was flipped, otherwise 0.
int PlaneTypeForNormal ( const vec3_t  normal)

Determine the primary axis of the normal.

Parameters
normalMust be canonical.

Variable Documentation

face_t* brush_faces
vec3_t brush_maxs
vec3_t brush_mins
vec3_t hull_corners[MAX_HULL_POINTS *8]
int hull_edges[MAX_HULL_EDGES][2]
vec3_t hull_points[MAX_HULL_POINTS]
vec3_t hull_size[3][2]
Initial value:
= {
{{0, 0, 0}, {0, 0, 0}},
{{-16, -16, -32}, {16, 16, 24}},
{{-32, -32, -64}, {32, 32, 24}}
}
int num_hull_edges
int num_hull_points
int numbrushfaces
int numbrushplanes
int numbrushplanes