level/csg4.c
/*
=================
ClipInside

Clips all of the faces in the inside list, possibly moving them to the
outside list or spliting it into a piece in each list.

Faces exactly on the plane will stay inside unless overdrawn by later brush

frontside is the side of the plane that holds the outside list
=================
*/
ClipInside
Clips all of the faces in the inside list, possibly moving them to the
outside list or spliting it into a piece in each list.

Faces exactly on the plane will stay inside unless overdrawn by later brush

frontside is the side of the plane that holds the outside list
ClipInside Clips all of the faces in the inside list possibly moving them to the outside list or spliting it into a piece in each list . Faces exactly on the plane will stay inside unless overdrawn by later brush frontside is the side of the plane that holds the outside list
static void ClipInside( int splitplane, int frontside, bool precedence )
{
	face_t	*f, *next;
	face_t	*frags[2];
	face_t	*insidelist;
	plane_t *split = &mapplanes[splitplane];
	insidelist = NULL;
	for( f = inside; f; f = next ) 
	{
		next = f->next;
		if( f->planenum == splitplane ) 
		{
			if( frontside != f->planeside || precedence ) 
			{
				frags[frontside] = NULL;
				frags[!frontside] = f;
			} 
			else 
			{
				frags[frontside] = f;
				frags[!frontside] = NULL;
			}
		} else {
			SplitFace( f, split, &frags[0], &frags[1] );
		}
		if( frags[frontside] ) {
			frags[frontside]->next = outside;
			outside = frags[frontside];
		}
		if( frags[!frontside] ) {
			frags[!frontside]->next = insidelist;
			insidelist = frags[!frontside];
		}
	}
	inside = insidelist;
}
static void ClipInside ( int splitplane , int frontside , bool precedence ) { face_t * f , * next ; face_t * frags [ 2 ] ; face_t * insidelist ; plane_t * split = & mapplanes [ splitplane ] ; insidelist = NULL ; for ( f = inside ; f ; f = next ) { next = f -> next ; if ( f -> planenum == splitplane ) { if ( frontside != f -> planeside || precedence ) { frags [ frontside ] = NULL ; frags [ ! frontside ] = f ; } else { frags [ frontside ] = f ; frags [ ! frontside ] = NULL ; } } else { SplitFace ( f , split , & frags [ 0 ] , & frags [ 1 ] ) ; } if ( frags [ frontside ] ) { frags [ frontside ] -> next = outside ; outside = frags [ frontside ] ; } if ( frags [ ! frontside ] ) { frags [ ! frontside ] -> next = insidelist ; insidelist = frags [ ! frontside ] ; } } inside = insidelist ; }
ClipInside
Clips all of the faces in the inside list, possibly moving them to the
outside list or spliting it into a piece in each list.
ClipInside Clips all of the faces in the inside list possibly moving them to the outside list or spliting it into a piece in each list .
// exactly on, handle special // allways clip off opposite faceing // leave it on the outside // proper split