]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added 'readable' version of a particular line of code in shadow volume building
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 10 Jul 2003 04:12:34 +0000 (04:12 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 10 Jul 2003 04:12:34 +0000 (04:12 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3220 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index 4ae9e42001c88272a3db9ee79f02144631a78cd0..daaa1a42517a779426590c058bd757bcad79d4f9 100644 (file)
@@ -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;