X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=tools%2Fquake3%2Fq3map2%2Fsurface_meta.c;h=145e1961cc7ee683fcd89814fdddcbc6e61ec6ad;hb=852882b1cfbbcf418e7b4753ed90c0e911d3f4e1;hp=f3afa1a6caf036b4dc759b596a4f58d77fc1715e;hpb=d2944c4a5ca09faaf6e9c641bb522212b9ad15fe;p=xonotic%2Fnetradiant.git diff --git a/tools/quake3/q3map2/surface_meta.c b/tools/quake3/q3map2/surface_meta.c index f3afa1a6..145e1961 100644 --- a/tools/quake3/q3map2/surface_meta.c +++ b/tools/quake3/q3map2/surface_meta.c @@ -341,6 +341,7 @@ void TriangulatePatchSurface( entity_t *e, mapDrawSurface_t *ds ){ if ( ds->numVerts == 0 || ds->type != SURFACE_PATCH || ( patchMeta == qfalse && !forcePatchMeta ) ) { return; } + /* make a mesh from the drawsurf */ src.width = ds->patchWidth; src.height = ds->patchHeight; @@ -419,6 +420,8 @@ void TriangulatePatchSurface( entity_t *e, mapDrawSurface_t *ds ){ ClassifySurfaces( 1, ds ); } + + #define TINY_AREA 1.0f #define MAXAREA_MAXTRIES 8 int MaxAreaIndexes( bspDrawVert_t *vert, int cnt, int *indexes ){ @@ -589,6 +592,8 @@ int MaxAreaIndexes( bspDrawVert_t *vert, int cnt, int *indexes ){ return -1; } + + /* MaxAreaFaceSurface() - divVerent creates a triangle list using max area indexes @@ -631,6 +636,7 @@ void MaxAreaFaceSurface( mapDrawSurface_t *ds ){ } + /* FanFaceSurface() - ydnar creates a tri-fan from a brush face winding @@ -835,6 +841,7 @@ void StripFaceSurface( mapDrawSurface_t *ds ){ } + /* EmitMetaStatictics vortex: prints meta statistics in general output @@ -851,6 +858,8 @@ void EmitMetaStats(){ Sys_Printf( "%9d meta triangles\n", numMetaTriangles ); } + + /* MakeEntityMetaTriangles() builds meta triangles from brush faces (tristrips and fans) @@ -1468,8 +1477,6 @@ static int AddMetaTriangleToSurface( mapDrawSurface_t *ds, metaTriangle_t *tri, } } - - if ( metaMaxBBoxDistance >= 0 ) { if ( ds->numIndexes > 0 ) { VectorCopy( ds->mins, mins ); @@ -1594,7 +1601,7 @@ static int AddMetaTriangleToSurface( mapDrawSurface_t *ds, metaTriangle_t *tri, ( bi == ds->indexes[ i ] && ci == ds->indexes[ i + 2 ] && ai == ds->indexes[ i + 1 ] ) || ( ci == ds->indexes[ i ] && ai == ds->indexes[ i + 2 ] && bi == ds->indexes[ i + 1 ] ) ) { /* warn about it */ - Sys_Printf( "WARNING: Flipped triangle: (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f)\n", + Sys_FPrintf( SYS_WRN, "WARNING: Flipped triangle: (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f) (%6.0f %6.0f %6.0f)\n", ds->verts[ ai ].xyz[ 0 ], ds->verts[ ai ].xyz[ 1 ], ds->verts[ ai ].xyz[ 2 ], ds->verts[ bi ].xyz[ 0 ], ds->verts[ bi ].xyz[ 1 ], ds->verts[ bi ].xyz[ 2 ], ds->verts[ ci ].xyz[ 0 ], ds->verts[ ci ].xyz[ 1 ], ds->verts[ ci ].xyz[ 2 ] );