From: havoc Date: Thu, 10 Jul 2003 04:12:34 +0000 (+0000) Subject: added 'readable' version of a particular line of code in shadow volume building X-Git-Tag: xonotic-v0.1.0preview~6554 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=314d49a52335bdd87b78f72a361f521027c14826;p=xonotic%2Fdarkplaces.git added 'readable' version of a particular line of code in shadow volume building git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3220 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/r_shadow.c b/r_shadow.c index 4ae9e420..daaa1a42 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -270,6 +270,38 @@ int *R_Shadow_ResizeShadowElements(int numtris) return shadowelements; } +/* +// readable version of some code found below +int checkcastshadowfromedge(int t, int i) +{ + int *te; + float *v[3]; + if (t >= trianglerange_start && t < trianglerange_end) + { + if (t < i && !trianglefacinglight[t]) + return true; + else + return false; + } + else + { + if (t < 0) + return true; + else + { + te = inelement3i + t * 3; + v[0] = invertex3f + te[0] * 3; + v[1] = invertex3f + te[1] * 3; + v[2] = invertex3f + te[2] * 3; + if (!PointInfrontOfTriangle(relativelightorigin, v[0], v[1], v[2])))) + return true; + else + return false; + } + } +} +*/ + int R_Shadow_ConstructShadowVolume(int innumvertices, int trianglerange_start, int trianglerange_end, const int *inelement3i, const int *inneighbor3i, const float *invertex3f, int *outnumvertices, int *outelement3i, float *outvertex3f, const float *relativelightorigin, float projectdistance) { int i, j, tris = 0, numfacing = 0, vr[3], t, outvertices = 0;