您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ FreeWinding函数代码示例

51自学网 2021-06-01 20:48:54
  C++
这篇教程C++ FreeWinding函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中FreeWinding函数的典型用法代码示例。如果您正苦于以下问题:C++ FreeWinding函数的具体用法?C++ FreeWinding怎么用?C++ FreeWinding使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了FreeWinding函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: WriteBrushMap

/*==================WriteBrushMap==================*/void WriteBrushMap (char *name, bspbrush_t *list){	FILE	*f;	side_t	*s;	int		i;	winding_t	*w;	Sys_Printf ("writing %s/n", name);	f = fopen (name, "wb");	if (!f)		Error ("Can't write %s/b", name);	fprintf (f, "{/n/"classname/" /"worldspawn/"/n");	for ( ; list ; list=list->next )	{		fprintf (f, "{/n");		for (i=0,s=list->sides ; i<list->numsides ; i++,s++)		{			w = BaseWindingForPlane (mapplanes[s->planenum].normal, mapplanes[s->planenum].dist);			fprintf (f,"( %i %i %i ) ", (int)w->p[0][0], (int)w->p[0][1], (int)w->p[0][2]);			fprintf (f,"( %i %i %i ) ", (int)w->p[1][0], (int)w->p[1][1], (int)w->p[1][2]);			fprintf (f,"( %i %i %i ) ", (int)w->p[2][0], (int)w->p[2][1], (int)w->p[2][2]);			fprintf (f, "%s 0 0 0 1 1/n", texinfo[s->texinfo].texture);			FreeWinding (w);		}		fprintf (f, "}/n");	}	fprintf (f, "}/n");	fclose (f);}
开发者ID:ChunHungLiu,项目名称:GtkRadiant,代码行数:40,


示例2: Q3_FaceOnWinding

//===========================================================================// returns the amount the face and the winding overlap//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================float Q3_FaceOnWinding(dsurface_t *surface, winding_t *winding){	int i;	float dist, area;	dplane_t plane;	vec_t *v1, *v2;	vec3_t normal, edgevec;	winding_t *w;	//copy the winding before chopping	w = CopyWinding(winding);	//retrieve the surface plane	Q3_SurfacePlane(surface, plane.normal, &plane.dist);	//chop the winding with the surface edge planes	for (i = 0; i < surface->numVerts && w; i++)	{		v1 = drawVerts[surface->firstVert + ((i) % surface->numVerts)].xyz;		v2 = drawVerts[surface->firstVert + ((i+1) % surface->numVerts)].xyz;		//create a plane through the edge from v1 to v2, orthogonal to the		//surface plane and with the normal vector pointing inward		VectorSubtract(v2, v1, edgevec);		CrossProduct(edgevec, plane.normal, normal);		VectorNormalize(normal);		dist = DotProduct(normal, v1);		//		ChopWindingInPlace(&w, normal, dist, -0.1); //CLIP_EPSILON	} //end for	if (w)	{		area = WindingArea(w);		FreeWinding(w);		return area;	} //end if	return 0;} //end of the function Q3_FaceOnWinding
开发者ID:kingtiger01,项目名称:openmohaa-1,代码行数:42,


示例3: OutputPortal

/*=============OutputPortal=============*/void OutputPortal(portal_t *p, FILE *glview){	winding_t   *w;	int sides;	sides = PortalVisibleSides(p);	if(!sides)	{		return;	}	c_glfaces++;	w = p->winding;	if(sides == 2)        // back side	{		w = ReverseWinding(w);	}	OutputWinding(w, glview);	if(sides == 2)	{		FreeWinding(w);	}}
开发者ID:Diskutant,项目名称:RTCW-SP,代码行数:33,


示例4: FreePortal

/** * @sa AllocPortal */void FreePortal (portal_t *p){	if (p->winding)		FreeWinding(p->winding);	if (threadstate.numthreads == 1)		c_active_portals--;	Mem_Free(p);}
开发者ID:kevlund,项目名称:ufoai,代码行数:11,


示例5: FreePortal

void FreePortal (portal_t *p){	if (p->winding)		FreeWinding (p->winding);	if (numthreads == 1)		c_active_portals--;	free (p);}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:8,


示例6: FreeBspFace

/*================FreeBspFace================*/void FreeBspFace(bspFace_t * f){	if(f->w)	{		FreeWinding(f->w);	}	free(f);}
开发者ID:otty,项目名称:cake3,代码行数:13,


示例7: CM_ValidateFacet

/*==================CM_ValidateFacetIf the facet isn't bounded by its borders, we screwed up.==================*/static qboolean CM_ValidateFacet( facet_t *facet ) {	float plane[4];	int j;	winding_t   *w;	vec3_t bounds[2];	if ( facet->surfacePlane == -1 ) {		return qfalse;	}	Vector4Copy( planes[ facet->surfacePlane ].plane, plane );	w = BaseWindingForPlane( plane,  plane[3] );	for ( j = 0 ; j < facet->numBorders && w ; j++ ) {		if ( facet->borderPlanes[j] == -1 ) {			FreeWinding( w );			return qfalse;		}		Vector4Copy( planes[ facet->borderPlanes[j] ].plane, plane );		if ( !facet->borderInward[j] ) {			VectorSubtract( vec3_origin, plane, plane );			plane[3] = -plane[3];		}		ChopWindingInPlace( &w, plane, plane[3], 0.1f );	}	if ( !w ) {		return qfalse;      // winding was completely chopped away	}	// see if the facet is unreasonably large	WindingBounds( w, bounds[0], bounds[1] );	FreeWinding( w );	for ( j = 0 ; j < 3 ; j++ ) {		if ( bounds[1][j] - bounds[0][j] > MAX_MAP_BOUNDS ) {			return qfalse;      // we must be missing a plane		}		if ( bounds[0][j] >= MAX_MAP_BOUNDS ) {			return qfalse;		}		if ( bounds[1][j] <= -MAX_MAP_BOUNDS ) {			return qfalse;		}	}	return qtrue;       // winding is fine}
开发者ID:MAN-AT-ARMS,项目名称:iortcw-archive,代码行数:53,


示例8: AAS_CheckFaceWindingPlane

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================void AAS_CheckFaceWindingPlane( tmp_face_t *face ) {	float dist, sign1, sign2;	vec3_t normal;	plane_t *plane;	winding_t *w;	//check if the winding plane is the same as the face plane	WindingPlane( face->winding, normal, &dist );	plane = &mapplanes[face->planenum];	//	sign1 = DotProduct( plane->normal, normal );	//	if ( fabs( dist - plane->dist ) > 0.4 ||		 fabs( normal[0] - plane->normal[0] ) > 0.0001 ||		 fabs( normal[1] - plane->normal[1] ) > 0.0001 ||		 fabs( normal[2] - plane->normal[2] ) > 0.0001 ) {		VectorInverse( normal );		dist = -dist;		if ( fabs( dist - plane->dist ) > 0.4 ||			 fabs( normal[0] - plane->normal[0] ) > 0.0001 ||			 fabs( normal[1] - plane->normal[1] ) > 0.0001 ||			 fabs( normal[2] - plane->normal[2] ) > 0.0001 ) {			Log_Write( "AAS_CheckFaceWindingPlane: face %d winding plane unequal to face plane/r/n",					   face->num );			//			sign2 = DotProduct( plane->normal, normal );			if ( ( sign1 < 0 && sign2 > 0 ) ||				 ( sign1 > 0 && sign2 < 0 ) ) {				Log_Write( "AAS_CheckFaceWindingPlane: face %d winding reversed/r/n",						   face->num );				w = face->winding;				face->winding = ReverseWinding( w );				FreeWinding( w );			} //end if		} //end if		else		{			Log_Write( "AAS_CheckFaceWindingPlane: face %d winding reversed/r/n",					   face->num );			w = face->winding;			face->winding = ReverseWinding( w );			FreeWinding( w );		} //end else	} //end if} //end of the function AAS_CheckFaceWindingPlane
开发者ID:chegestar,项目名称:omni-bot,代码行数:51,


示例9: FreePortal

void FreePortal(portal_t * p) {    if (p->winding)        FreeWinding(p->winding);    if (debug)        SDL_SemWait(semaphores.active_portals);    Mem_Free(p);}
开发者ID:jayschwa,项目名称:quake2world,代码行数:10,


示例10: AAS_TryMergeFaces

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================int AAS_TryMergeFaces( tmp_face_t *face1, tmp_face_t *face2 ) {	winding_t *neww;#ifdef DEBUG	if ( !face1->winding ) {		Error( "face1 %d without winding", face1->num );	}	if ( !face2->winding ) {		Error( "face2 %d without winding", face2->num );	}#endif //DEBUG	   //	if ( face1->faceflags != face2->faceflags ) {		return false;	}	//NOTE: if the front or back area is zero this doesn't mean there's	//a real area. It means there's solid at that side of the face	//if both faces have the same front area	if ( face1->frontarea == face2->frontarea ) {		//if both faces have the same back area		if ( face1->backarea == face2->backarea ) {			//if the faces are in the same plane			if ( face1->planenum == face2->planenum ) {				//if they have both a front and a back area (no solid on either side)				if ( face1->frontarea && face1->backarea ) {					neww = MergeWindings( face1->winding, face2->winding,										  mapplanes[face1->planenum].normal );				} //end if				else				{					//this function is to be found in l_poly.c					neww = TryMergeWinding( face1->winding, face2->winding,											mapplanes[face1->planenum].normal );				} //end else				if ( neww ) {					FreeWinding( face1->winding );					face1->winding = neww;					if ( face2->frontarea ) {						AAS_RemoveFaceFromArea( face2, face2->frontarea );					}					if ( face2->backarea ) {						AAS_RemoveFaceFromArea( face2, face2->backarea );					}					AAS_FreeTmpFace( face2 );					return true;				} //end if			} //end if			else if ( ( face1->planenum & ~1 ) == ( face2->planenum & ~1 ) ) {				Log_Write( "face %d and %d, same front and back area but flipped planes/r/n",						   face1->num, face2->num );			} //end if		} //end if	} //end if	return false;} //end of the function AAS_TryMergeFaces
开发者ID:Sixthly,项目名称:Unvanquished,代码行数:61,


示例11: AAS_SplitFace

//===========================================================================// NOTE: the original face is invalid after splitting//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================void AAS_SplitFace( tmp_face_t *face, vec3_t normal, float dist,					tmp_face_t **frontface, tmp_face_t **backface ) {	winding_t *frontw, *backw;	//	*frontface = *backface = NULL;	ClipWindingEpsilon( face->winding, normal, dist, FACECLIP_EPSILON, &frontw, &backw );#ifdef DEBUG	//	if ( frontw ) {		if ( WindingIsTiny( frontw ) ) {			Log_Write( "AAS_SplitFace: tiny back face/r/n" );			FreeWinding( frontw );			frontw = NULL;		} //end if	} //end if	if ( backw ) {		if ( WindingIsTiny( backw ) ) {			Log_Write( "AAS_SplitFace: tiny back face/r/n" );			FreeWinding( backw );			backw = NULL;		} //end if	} //end if#endif //DEBUG	   //if the winding was split	if ( frontw ) {		//check bounds		( *frontface ) = AAS_AllocTmpFace();		( *frontface )->planenum = face->planenum;		( *frontface )->winding = frontw;		( *frontface )->faceflags = face->faceflags;	} //end if	if ( backw ) {		//check bounds		( *backface ) = AAS_AllocTmpFace();		( *backface )->planenum = face->planenum;		( *backface )->winding = backw;		( *backface )->faceflags = face->faceflags;	} //end if} //end of the function AAS_SplitFace
开发者ID:AdrienJaguenet,项目名称:Enemy-Territory,代码行数:49,


示例12: FreeBrush

/** * @sa AllocBrush */void FreeBrush (bspbrush_t* brushes){	int i;	for (i = 0; i < brushes->numsides; i++)		if (brushes->sides[i].winding)			FreeWinding(brushes->sides[i].winding);	Mem_Free(brushes);	if (threadstate.numthreads == 1)		c_active_brushes--;}
开发者ID:Isaacssv552,项目名称:ufoai,代码行数:14,


示例13: AAS_FreeTmpFace

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================void AAS_FreeTmpFace(tmp_face_t *tmpface){	if (tmpface->l_next) tmpface->l_next->l_prev = tmpface->l_prev;	if (tmpface->l_prev) tmpface->l_prev->l_next = tmpface->l_next;	else tmpaasworld.faces = tmpface->l_next;	//free the winding	if (tmpface->winding) FreeWinding(tmpface->winding);	//free the face	FreeMemory(tmpface);	tmpaasworld.numfaces--;} //end of the function AAS_FreeTmpFace
开发者ID:ArtanAhmeti,项目名称:lab,代码行数:17,


示例14: TestPointAgainstSkySurface

	bool TestPointAgainstSkySurface( Vector const &pt, dface_t *pFace )	{		// Create sky face winding.		winding_t *pWinding = WindingFromFace( pFace, Vector( 0.0f, 0.0f, 0.0f ) );		// Test point in winding. (Since it is at the node, it is in the plane.)		bool bRet = PointInWinding( pt, pWinding );		FreeWinding( pWinding );		return bRet;	}
开发者ID:hitmen047,项目名称:CM2013,代码行数:12,


示例15: MakeNodePortal

/*==================MakeNodePortalcreate the new portal by taking the full plane winding for the cutting planeand clipping it by all of parents of this node==================*/void MakeNodePortal (node_t *node){	portal_t	*new_portal, *p;	winding_t	*w;	Vector		normal;	float		dist = 0.0f;	int			side = 0;	w = BaseWindingForNode (node);	// clip the portal by all the other portals in the node	for (p = node->portals ; p && w; p = p->next[side])		{		if (p->nodes[0] == node)		{			side = 0;			VectorCopy (p->plane.normal, normal);			dist = p->plane.dist;		}		else if (p->nodes[1] == node)		{			side = 1;			VectorSubtract (vec3_origin, p->plane.normal, normal);			dist = -p->plane.dist;		}		else		{			Error ("CutNodePortals_r: mislinked portal");		}		ChopWindingInPlace (&w, normal, dist, 0.1);	}	if (!w)	{		return;	}	if (WindingIsTiny (w))	{		c_tinyportals++;		FreeWinding (w);		return;	}	new_portal = AllocPortal ();	new_portal->plane = mapplanes[node->planenum];	new_portal->onnode = node;	new_portal->winding = w;		AddPortalToNodes (new_portal, node->children[0], node->children[1]);}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:61,


示例16: FreeBrushWindings

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================void FreeBrushWindings(mapbrush_t *brush){	int n;	side_t *side;	//	for (n = 0; n < brush->numsides; n++)	{		side = brush->original_sides + n;		//		if (side->winding) FreeWinding(side->winding);	} //end for} //end of the function FreeBrushWindings
开发者ID:Cpasjuste,项目名称:quake3_pandora_gles,代码行数:18,


示例17: FreeBrush

//===========================================================================//// Parameter:			-// Returns:				-// Changes Globals:		-//===========================================================================void FreeBrush (bspbrush_t *brushes){	int			i;	for (i=0 ; i<brushes->numsides ; i++)		if (brushes->sides[i].winding)			FreeWinding(brushes->sides[i].winding);	if (numthreads == 1)	{		c_active_brushes--;		c_brushmemory -= MemorySize(brushes);		if (c_brushmemory < 0) c_brushmemory = 0;	} //end if	FreeMemory(brushes);} //end of the function FreeBrush
开发者ID:Garux,项目名称:netradiant-custom,代码行数:21,


示例18: RadFreeLights

void RadFreeLights( void ){    light_t        *light, *next;            /* delete lights */    for( light = lights; light; light = next )    {        next = light->next;        if( light->w != NULL )            FreeWinding( light->w );        free( light );    }    numLights = 0;    lights = NULL;}
开发者ID:kimsama,项目名称:minimangalore,代码行数:16,


示例19: TestExpandBrushes

/*================TestExpandBrushesExpands all the brush planes and saves a new map out================*/void TestExpandBrushes(void){	FILE       *f;	side_t     *s;	int        i, j, bn;	winding_t  *w;	char       *name = "expanded.map";	mapbrush_t *brush;	vec_t      dist;	Log_Print("writing %s/n", name);	f = fopen(name, "wb");	if (!f)	{		Error("Can't write %s/n", name);	}	fprintf(f, "{/n/"classname/" /"worldspawn/"/n");	for (bn = 0 ; bn < nummapbrushes ; bn++)	{		brush = &mapbrushes[bn];		fprintf(f, "{/n");		for (i = 0 ; i < brush->numsides ; i++)		{			s    = brush->original_sides + i;			dist = mapplanes[s->planenum].dist;			for (j = 0 ; j < 3 ; j++)				dist += fabs(16 * mapplanes[s->planenum].normal[j]);			w = BaseWindingForPlane(mapplanes[s->planenum].normal, dist);			fprintf(f, "( %i %i %i ) ", (int)w->p[0][0], (int)w->p[0][1], (int)w->p[0][2]);			fprintf(f, "( %i %i %i ) ", (int)w->p[1][0], (int)w->p[1][1], (int)w->p[1][2]);			fprintf(f, "( %i %i %i ) ", (int)w->p[2][0], (int)w->p[2][1], (int)w->p[2][2]);			fprintf(f, "%s 0 0 0 1 1/n", texinfo[s->texinfo].texture);			FreeWinding(w);		}		fprintf(f, "}/n");	}	fprintf(f, "}/n");	fclose(f);	Error("can't proceed after expanding brushes");} //end of the function TestExpandBrushes
开发者ID:morsik,项目名称:war-territory,代码行数:54,


示例20: CM_ValidateFacet

/*==================CM_ValidateFacetIf the facet isn't bounded by its borders, we screwed up.==================*/static qboolean CM_ValidateFacet( facet_t *facet ) {	planeDef_t	plane;	int			j;	winding_t	*w;	bvec3_t		bounds[2];	if ( facet->surfacePlane == -1 ) {		return qfalse;	}	plane=planes[ facet->surfacePlane ].pd;	w = BaseWindingForPlane( plane.normal,  plane.dist );	for ( j = 0 ; j < facet->numBorders && w ; j++ ) {		if ( facet->borderPlanes[j] == -1 ) {			return qfalse;		}		plane=planes[ facet->borderPlanes[j] ].pd;		if ( !facet->borderInward[j] ) {			VectorSubtract( avec3_origin, plane.normal, plane.normal );			plane.dist = -plane.dist;		}		ChopWindingInPlace( &w, plane.normal, plane.dist, BFIXED(0,1) );	}	if ( !w ) {		return qfalse;		// winding was completely chopped away	}	// see if the facet is unreasonably large	WindingBounds( w, bounds[0], bounds[1] );	FreeWinding( w );		for ( j = 0 ; j < 3 ; j++ ) {		if ( bounds[1][j] - bounds[0][j] > BFIXED(MAX_MAP_BOUNDS,0) ) {			return qfalse;		// we must be missing a plane		}		if ( bounds[0][j] >= BFIXED(MAX_MAP_BOUNDS,0) ) {			return qfalse;		}		if ( bounds[1][j] <= -BFIXED(MAX_MAP_BOUNDS,0) ) {			return qfalse;		}	}	return qtrue;		// winding is fine}
开发者ID:Jsoucek,项目名称:q3ce,代码行数:52,


示例21: FixFaceEdges

void FixFaceEdges (face_t *f){	int		i, j, k;	wedge_t	*w;	wvert_t	*v;	vec_t	t1, t2;	if( f->winding->numpoints > MAX_VERTS_ON_SUPERFACE )		Error( "FixFaceEdges: f->winding->numpoints > MAX_VERTS_ON_SUPERFACE" );	superface->original = *f;	superface->numpoints = f->winding->numpoints;	memcpy( superface->points, f->winding->points, sizeof(vec3_t)*f->winding->numpoints );	FreeWinding( f->winding );	// LordHavoc: FIXME: rewrite this mess to find points on edges,	// rather than finding edges that run into polygonsrestart:	for (i=0 ; i < superface->numpoints ; i++)	{		j = (i+1)%superface->numpoints;		w = FindEdge (superface->points[i], superface->points[j], &t1, &t2);		if (!w)			continue;		for (v=w->head.next ; v->t < t1 + T_EPSILON ; v = v->next)		{		}		if (v->t < t2-T_EPSILON)		{			c_tjuncs++;		// insert a new vertex here			for (k = superface->numpoints ; k> j ; k--)				VectorCopy (superface->points[k-1], superface->points[k]);			VectorMA (w->origin, v->t, w->dir, superface->points[j]);			superface->numpoints++;			goto restart;		}	}	// the face might be split into multiple faces because of too many edges	FaceFromSuperface( f );}
开发者ID:Acidburn0zzz,项目名称:KatanaEngine,代码行数:45,


示例22: Q1_FaceOnWinding

//===========================================================================// returns the amount the face and the winding overlap//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================float Q1_FaceOnWinding(q1_dface_t *face, winding_t *winding){    int i, edgenum, side;    float dist, area;    q1_dplane_t plane;    vec_t *v1, *v2;    vec3_t normal, edgevec;    winding_t *w;    //    w = CopyWinding(winding);    memcpy(&plane, &q1_dplanes[face->planenum], sizeof(q1_dplane_t));    //check on which side of the plane the face is    if (face->side)    {        VectorNegate(plane.normal, plane.normal);        plane.dist = -plane.dist;    } //end if    for (i = 0; i < face->numedges && w; i++)    {        //get the first and second vertex of the edge        edgenum = q1_dsurfedges[face->firstedge + i];        side = edgenum > 0;        //if the face plane is flipped        v1 = q1_dvertexes[q1_dedges[abs(edgenum)].v[side]].point;        v2 = q1_dvertexes[q1_dedges[abs(edgenum)].v[!side]].point;        //create a plane through the edge vector, orthogonal to the face plane        //and with the normal vector pointing out of the face        VectorSubtract(v1, v2, edgevec);        CrossProduct(edgevec, plane.normal, normal);        VectorNormalize(normal);        dist = DotProduct(normal, v1);        //        ChopWindingInPlace(&w, normal, dist, 0.9); //CLIP_EPSILON    } //end for    if (w)    {        area = WindingArea(w);        FreeWinding(w);        return area;    } //end if    return 0;} //end of the function Q1_FaceOnWinding
开发者ID:he110world,项目名称:quake3-ios,代码行数:50,


示例23: AAS_MergePlaneFaces

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================void AAS_MergePlaneFaces(tmp_area_t *tmparea, int planenum){    tmp_face_t *face1, *face2, *nextface2;    winding_t  *neww;    int        side1, side2;    for (face1 = tmparea->tmpfaces; face1; face1 = face1->next[side1])    {        side1 = face1->frontarea != tmparea;        if (face1->planenum != planenum)        {            continue;        }        //        for (face2 = face1->next[side1]; face2; face2 = nextface2)        {            side2     = face2->frontarea != tmparea;            nextface2 = face2->next[side2];            //            if ((face2->planenum & ~1) != (planenum & ~1))            {                continue;            }            //            neww = MergeWindings(face1->winding, face2->winding,                                 mapplanes[face1->planenum].normal);            FreeWinding(face1->winding);            face1->winding = neww;            if (face2->frontarea)            {                AAS_RemoveFaceFromArea(face2, face2->frontarea);            }            if (face2->backarea)            {                AAS_RemoveFaceFromArea(face2, face2->backarea);            }            AAS_FreeTmpFace(face2);            //            nextface2 = face1->next[side1];        } //end for    } //end for} //end of the function AAS_MergePlaneFaces
开发者ID:morsik,项目名称:war-territory,代码行数:48,


示例24: WriteBSPBrushMap

void WriteBSPBrushMap( char *name, brush_t *list ){	FILE        *f;	side_t      *s;	int i;	winding_t   *w;	/* note it */	Sys_Printf( "Writing %s/n", name );	/* open the map file */	f = fopen( name, "wb" );	if ( f == NULL ) {		Error( "Can't write %s/b", name );	}	fprintf( f, "{/n/"classname/" /"worldspawn/"/n" );	for ( ; list ; list = list->next )	{		fprintf( f, "{/n" );		for ( i = 0,s = list->sides ; i < list->numsides ; i++,s++ )		{			// TODO: See if we can use a smaller winding to prevent resolution loss.			// Is WriteBSPBrushMap() used only to decompile maps?			w = BaseWindingForPlane( mapplanes[s->planenum].normal, mapplanes[s->planenum].dist );			fprintf( f,"( %i %i %i ) ", (int)w->p[0][0], (int)w->p[0][1], (int)w->p[0][2] );			fprintf( f,"( %i %i %i ) ", (int)w->p[1][0], (int)w->p[1][1], (int)w->p[1][2] );			fprintf( f,"( %i %i %i ) ", (int)w->p[2][0], (int)w->p[2][1], (int)w->p[2][2] );			fprintf( f, "notexture 0 0 0 1 1/n" );			FreeWinding( w );		}		fprintf( f, "}/n" );	}	fprintf( f, "}/n" );	fclose( f );}
开发者ID:xonotic,项目名称:netradient,代码行数:41,


示例25: OutputPortal

/*=============OutputPortal=============*/void OutputPortal (portal_t *p, FileHandle_t glview){	winding_t	*w;	int		sides;	sides = PortalVisibleSides (p);	if (!sides)		return;	c_glfaces++;	w = p->winding;	if (sides == 2)		// back side		w = ReverseWinding (w);	OutputWinding (w, glview);	if (sides == 2)		FreeWinding(w);}
开发者ID:chrizonix,项目名称:RCBot2,代码行数:26,


示例26: AAS_FlipFace

//===========================================================================//// Parameter:				-// Returns:					-// Changes Globals:		-//===========================================================================void AAS_FlipFace(tmp_face_t *face){	tmp_area_t *frontarea, *backarea;	winding_t *w;	frontarea = face->frontarea;	backarea = face->backarea;	//must have an area at both sides before flipping is allowed	if (!frontarea || !backarea) return;	//flip the face winding	w = face->winding;	face->winding = ReverseWinding(w);	FreeWinding(w);	//flip the face plane	face->planenum ^= 1;	//flip the face areas	AAS_RemoveFaceFromArea(face, frontarea);	AAS_RemoveFaceFromArea(face, backarea);	AAS_AddFaceSideToArea(face, 1, frontarea);	AAS_AddFaceSideToArea(face, 0, backarea);} //end of the function AAS_FlipFace
开发者ID:ArtanAhmeti,项目名称:lab,代码行数:27,



注:本文中的FreeWinding函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ FreeXid函数代码示例
C++ FreeString函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。