Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

tetrahedron.h File Reference

Go to the source code of this file.

Functions

void TH_AASToTetrahedrons (char *filename)


Function Documentation

void TH_AASToTetrahedrons char *  filename  ) 
 

Definition at line 1363 of file tetrahedron.c.

References AAS_LoadAASFile(), Error(), Log_Print(), th_triangle_s::next, th_triangle_s::prev, TH_AASToTriangleMesh(), TH_FreeMaxTH(), TH_InitMaxTH(), TH_TetrahedralDecomposition(), and th_triangle_t.

01364 {
01365     th_triangle_t *triangles, *tri, *lasttri;
01366     int cnt;
01367 
01368     if (!AAS_LoadAASFile(filename, 0, 0))
01369         Error("couldn't load %s\n", filename);
01370 
01371     //
01372     TH_InitMaxTH();
01373     //create a triangle mesh from the solid faces in the AAS file
01374     triangles = TH_AASToTriangleMesh();
01375     //
01376     cnt = 0;
01377     lasttri = NULL;
01378     for (tri = triangles; tri; tri = tri->next)
01379     {
01380         cnt++;
01381         if (tri->prev != lasttri) Log_Print("BAH\n");
01382         lasttri = tri;
01383     } //end for
01384     Log_Print("%6d triangles\n", cnt);
01385     //create a tetrahedral decomposition of the world bounded by triangles
01386     TH_TetrahedralDecomposition(triangles);
01387     //
01388     TH_FreeMaxTH();
01389 } //end of the function TH_AASToTetrahedrons

Here is the call graph for this function:


Generated on Thu Aug 25 13:09:31 2005 for Quake III Arena by  doxygen 1.3.9.1