icculus quake2 doxygen
1.0 dev
|
|
Go to the documentation of this file.
40 #define MAX_BMODEL_VERTS 500 // 6K
41 #define MAX_BMODEL_EDGES 1000 // 12K
77 float angle, s, c, temp1[3][3], temp2[3][3], temp3[3][3];
86 angle = angle *
M_PI*2 / 360;
103 angle = angle *
M_PI*2 / 360;
121 angle = angle *
M_PI*2 / 360;
158 bedge_t *psideedges[2], *pnextedge, *ptedge;
159 int i, side, lastside;
160 float dist, frac, lastdist;
166 psideedges[0] = psideedges[1] =
NULL;
172 splitplane = pnode->
plane;
180 for ( ; pedges ; pedges = pnextedge)
182 pnextedge = pedges->
pnext;
186 plastvert = pedges->
v[0];
195 pvert = pedges->
v[1];
204 if (side != lastside)
211 frac = lastdist / (lastdist - dist);
233 ptedge->
pnext = psideedges[lastside];
234 psideedges[lastside] = ptedge;
235 ptedge->
v[0] = plastvert;
236 ptedge->
v[1] = ptvert;
239 ptedge->
pnext = psideedges[side];
240 psideedges[side] = ptedge;
241 ptedge->
v[0] = ptvert;
242 ptedge->
v[1] = pvert;
261 pedges->
pnext = psideedges[side];
262 psideedges[side] = pedges;
277 ptedge->
pnext = psideedges[0];
278 psideedges[0] = ptedge;
283 ptedge->
pnext = psideedges[1];
284 psideedges[1] = ptedge;
292 for (
i=0 ;
i<2 ;
i++)
351 pedges = pmodel->
edges;
353 for (
i=0 ;
i<numsurfaces ;
i++, psurf++)
356 pplane = psurf->
plane;
383 pedge = &pedges[lindex];
390 pedge = &pedges[lindex];
395 pbedge[
j].
pnext = &pbedge[
j+1];
428 for (
i=0 ;
i<numsurfaces ;
i++, psurf++)
431 pplane = psurf->
plane;
457 int i, c, side, *pindex;
458 vec3_t acceptpt, rejectpt;
475 for (
i=0 ;
i<4 ;
i++)
477 if (! (clipflags & (1<<
i)) )
486 rejectpt[0] = (float)node->
minmaxs[pindex[0]];
487 rejectpt[1] = (
float)node->
minmaxs[pindex[1]];
488 rejectpt[2] = (float)node->
minmaxs[pindex[2]];
494 acceptpt[0] = (float)node->
minmaxs[pindex[3+0]];
495 acceptpt[1] = (
float)node->
minmaxs[pindex[3+1]];
496 acceptpt[2] = (float)node->
minmaxs[pindex[3+2]];
502 clipflags &= ~(1<<
i);
void R_RecursiveWorldNode(mnode_t *node, int clipflags)
CONST PIXELFORMATDESCRIPTOR int
int * pfrustum_indexes[4]
msurface_t ** firstmarksurface
float entity_rotation[3][3]
struct mnode_s * children[2]
void R_DrawSolidClippedSubmodelPolygons(model_t *pmodel, mnode_t *topnode)
static qboolean makeclippededge
void R_RecursiveClipBPoly(bedge_t *pedges, mnode_t *pnode, msurface_t *psurf)
void(* Con_Printf)(int print_level, char *str,...)
static mvertex_t * pfrontenter
void R_EntityRotate(vec3_t vec)
void R_RotateBmodel(void)
static mvertex_t * pbverts
static mvertex_t * pfrontexit
unsigned short firstsurface
void R_RenderFace(msurface_t *fa, int clipflags)
clipplane_t view_clipplanes[4]
void R_ConcatRotations(float in1[3][3], float in2[3][3], float out[3][3])
void R_RenderBmodelFace(bedge_t *pedges, msurface_t *psurf)
void R_TransformFrustum(void)
void R_DrawSubmodelPolygons(model_t *pmodel, int clipflags, mnode_t *topnode)
unsigned short numsurfaces
mvertex_t * r_pcurrentvertbase