Ejemplo n.º 1
0
Archivo: mesh.c Proyecto: DINKIN/omim
/* tessMeshDeleteMesh( mesh ) will free all storage for any valid mesh.
*/
void tessMeshDeleteMesh( TESSalloc* alloc, TESSmesh *mesh )
{
	TESSface *fHead = &mesh->fHead;

	while( fHead->next != fHead ) {
		tessMeshZapFace( fHead->next );
	}
	assert( mesh->vHead.next == &mesh->vHead );

	alloc->memfree( alloc->userData, mesh );
}
Ejemplo n.º 2
0
/* tessMeshDeleteMesh (mesh)  will free all storage for any valid mesh.
*/
void tessMeshDeleteMesh (TAlloc* alloc, TMesh *mesh) 
{
	TFace *fHead = &mesh->fHead;

	while (fHead->pNext != fHead)  {
		tessMeshZapFace (fHead->pNext) ;
	}
	assert (mesh->vHead.pNext == &mesh->vHead) ;

	alloc->MemFree (alloc->pUserData, mesh) ;
}
Ejemplo n.º 3
0
/* tessMeshDiscardExterior( mesh ) zaps (ie. sets to NULL) all faces
* which are not marked "inside" the polygon.  Since further mesh operations
* on NULL faces are not allowed, the main purpose is to clean up the
* mesh so that exterior loops are not represented in the data structure.
*/
void tessMeshDiscardExterior( TESSmesh *mesh )
{
	TESSface *f, *next;

	/*LINTED*/
	for( f = mesh->fHead.next; f != &mesh->fHead; f = next ) {
		/* Since f will be destroyed, save its next pointer. */
		next = f->next;
		if( ! f->inside ) {
			tessMeshZapFace( mesh, f );
		}
	}
}