]> Dogcows Code - chaz/rasterize/blobdiff - tri.c
add support for 3d scenes, depth testing, lighting
[chaz/rasterize] / tri.c
diff --git a/tri.c b/tri.c
deleted file mode 100644 (file)
index e43faa5..0000000
--- a/tri.c
+++ /dev/null
@@ -1,19 +0,0 @@
-
-/*
- * CS5600 University of Utah
- * Charles McGarvey
- * mcgarvey@eng.utah.edu
- */
-
-#include "tri.h"
-
-vec_t tri_barycentric(const tri_t* t, vec_t v)
-{
-    vec_t c = VEC_ZERO;
-    scal_t denom = (t->b.v.y - t->c.v.y) * (t->a.v.x - t->c.v.x) + (t->c.v.x - t->b.v.x) * (t->a.v.y - t->c.v.y);
-    c.x = ((t->b.v.y - t->c.v.y) * (v.x - t->c.v.x) + (t->c.v.x - t->b.v.x) * (v.y - t->c.v.y)) / denom;
-    c.y = ((t->c.v.y - t->a.v.y) * (v.x - t->c.v.x) + (t->a.v.x - t->c.v.x) * (v.y - t->c.v.y)) / denom;
-    c.z = S(1.0) - c.x - c.y;
-    return c;
-}
-
This page took 0.018075 seconds and 4 git commands to generate.