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

Data Structures

struct  edgeface_s
 

Macros

#define EDGEFACE_CHUNK   4096
 
#define NUM_HASH   4096
 
#define POINT_EPSILON   0.01
 

Typedefs

typedef struct edgeface_s edgeface_t
 
typedef struct hashvert_s hashvert_t
 

Functions

face_tAllocFace (void)
 Allocate a new face. More...
 
surface_tAllocSurface (void)
 Allocate a new surface. More...
 
void FreeFace (face_t *f)
 Free a face. More...
 
void FreeSurface (surface_t *s)
 Free a surface. More...
 
struct surface_sGatherNodeFaces (struct node_s *headnode)
 Free the current node tree and return a new chain of the surfaces that have inside faces. More...
 
void MakeFaceEdges (struct node_s *headnode)
 Give edges to all the faces in the bsp tree. More...
 
void SubdivideFace (struct visfacet_s *f, struct visfacet_s **prevptr)
 Split any faces that are too big. More...
 

Variables

int c_activefaces
 
int c_activesurfaces
 
int c_cornerverts
 
int c_cornerverts
 
int c_peakfaces
 
int c_peaksurfaces
 
int c_tryedges
 
int c_tryedges
 
edgeface_tedgefaces
 
edgeface_tedgefaces = 0
 
int firstmodeledge
 
int firstmodeledge = 1
 
int firstmodelface
 
int firstmodelface
 
hashvert_thashverts [NUM_HASH]
 
hashvert_thvert_p
 
hashvert_t hvertex [MAX_MAP_VERTS]
 
surface_t newcopy_t
 
int numedgefaces = 0
 
int subdivides
 

Detailed Description

Macro Definition Documentation

#define EDGEFACE_CHUNK   4096
#define NUM_HASH   4096
#define POINT_EPSILON   0.01

Typedef Documentation

typedef struct edgeface_s edgeface_t
typedef struct hashvert_s hashvert_t

Function Documentation

face_t * AllocFace ( void  )

Allocate a new face.

Increases c_activefaces by one.

Returns
Pointer to the new face.
surface_t * AllocSurface ( void  )

Allocate a new surface.

Increases c_activesurfaces by one.

Returns
Pointer to the new surface.
void FreeFace ( face_t f)

Free a face.

Only the first face will be freed. If the face is linked to another face, that face will have to be freed seperately.

Reduces c_activefaces by one.

Parameters
fThe face to free.
void FreeSurface ( surface_t s)

Free a surface.

Only the first surface will be freed. If the surface is linked to another surface, that surface will have to be freed seperately.

Reduces c_activefaces by one.

Parameters
sThe face to free.
surface_t * GatherNodeFaces ( struct node_s headnode)

Free the current node tree and return a new chain of the surfaces that have inside faces.

void MakeFaceEdges ( struct node_s headnode)

Give edges to all the faces in the bsp tree.

Parameters
headnodeThe root of the bsp tree.
void SubdivideFace ( struct visfacet_s f,
struct visfacet_s **  prevptr 
)

Split any faces that are too big.

If the face is > options.subdivide_size in either texture direction, carve off a valid sized piece and insert the remainder in the next link.

Parameters
fThe face to subdivide.
prevptrThe address of the pointer to this face. For nice linked list manipulation.

Variable Documentation

int c_activefaces
int c_activesurfaces
int c_cornerverts
int c_cornerverts
int c_peakfaces
int c_peaksurfaces
int c_tryedges
int c_tryedges
edgeface_t* edgefaces
edgeface_t* edgefaces = 0
int firstmodeledge
int firstmodeledge = 1
int firstmodelface
int firstmodelface
hashvert_t* hashverts[NUM_HASH]
hashvert_t* hvert_p
surface_t newcopy_t
int numedgefaces = 0
int subdivides