Exemplo n.º 1
0
/* tessMeshDeleteMesh( mesh ) will free all storage for any valid mesh.
*/
void tessMeshDeleteMesh( TESSalloc* alloc, TESSmesh *mesh )
{
    deleteBucketAlloc(mesh->edgeBucket);
    deleteBucketAlloc(mesh->vertexBucket);
    deleteBucketAlloc(mesh->faceBucket);

    alloc->memfree( alloc->userData, mesh );
}
Exemplo n.º 2
0
void tessDeleteTess( TESStesselator *tess )
{
	
	struct TESSalloc alloc = tess->alloc;
	
	deleteBucketAlloc( tess->regionPool );

	if( tess->mesh != NULL ) {
		tessMeshDeleteMesh( &alloc, tess->mesh );
		tess->mesh = NULL;
	}
	if (tess->vertices != NULL) {
		alloc.memfree( alloc.userData, tess->vertices );
		tess->vertices = 0;
	}
	if (tess->vertexIndices != NULL) {
		alloc.memfree( alloc.userData, tess->vertexIndices );
		tess->vertexIndices = 0;
	}
	if (tess->elements != NULL) {
		alloc.memfree( alloc.userData, tess->elements );
		tess->elements = 0;
	}

	alloc.memfree( alloc.userData, tess );
}
Exemplo n.º 3
0
/* really tessDictListDeleteDict */
void dictDeleteDict( TESSalloc* alloc, Dict *dict )
{
	deleteBucketAlloc( dict->nodePool );
	alloc->memfree( alloc->userData, dict );
}
Exemplo n.º 4
0
void stackDelete( EdgeStack *stack )
{
    deleteBucketAlloc( stack->nodeBucket );
}