From: rambetter Date: Tue, 28 Dec 2010 20:05:50 +0000 (+0000) Subject: Undoing revision 375 because it did not offer measured accuracy improvements X-Git-Tag: xonotic-v0.7.0~16^2~12^2~29 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=52fd922c647893355465b683ede13370a94f6793 Undoing revision 375 because it did not offer measured accuracy improvements in the q3map2 math calculations. git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@376 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- diff --git a/regression_tests/q3map2/disappearing_sliver2/README.txt b/regression_tests/q3map2/disappearing_sliver2/README.txt index c0d4eaa6..55f9b51d 100644 --- a/regression_tests/q3map2/disappearing_sliver2/README.txt +++ b/regression_tests/q3map2/disappearing_sliver2/README.txt @@ -66,3 +66,18 @@ is this: As you can see, all points but one have an increase in accuracy. This is still not accurate enough in my opinion, but is a step in the right direction. + + +MORE NOTES: +=========== + +I attempted to improve upon revision 371 by streamlining the code in +BaseWindingForPlane() some more. Those attempts were committed as r375. +After revision 375: + + (6784.09375000 16241.01757812 -1722.04687500) + (6144.00000000 16082.99414062 -1443.00390625) + (6144.00000000 16122.00000000 -1424.00097656) + +Revision 375 has since been reverted (undone) because of the loss in +accuracy. diff --git a/tools/quake3/common/polylib.c b/tools/quake3/common/polylib.c index 83cc9ed9..839f7ea5 100644 --- a/tools/quake3/common/polylib.c +++ b/tools/quake3/common/polylib.c @@ -253,9 +253,13 @@ winding_t *BaseWindingForPlane (vec3_t normal, vec_t dist) vright[2] = normal[1]; break; } - // NOTE: vright is NOT a unit vector at this point. - VectorSetLength(vright, MAX_WORLD_COORD * 2, vright); CrossProduct(normal, vright, vup); + + // IMPORTANT NOTE: vright and vup are NOT unit vectors at this point. + // However, normal, vup, and vright are pairwise perpendicular. + + VectorSetLength(vup, MAX_WORLD_COORD * 2, vup); + VectorSetLength(vright, MAX_WORLD_COORD * 2, vright); VectorScale(normal, dist, org); w = AllocWinding(4);