X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=traffic.h;h=98b8c7b57aa0de3df514ac7d13aceecb3076c2b1;hb=b4c9550f206c476bb38b0bb2855d35e6b31bee83;hp=8850306b450d9aa534c3e1c024c058343190c3b3;hpb=6d66c67945f84476d6ac75a0497007cc30bcf58c;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/traffic.h b/traffic.h index 8850306..98b8c7b 100644 --- a/traffic.h +++ b/traffic.h @@ -28,17 +28,6 @@ struct traffic_driver float t, speed; }; -static void eval_bezier_time( v3f p0, v3f p1, v3f h0, v3f h1, float t, v3f p ) -{ - float tt = t*t, - ttt = tt*t; - - v3_muls( p1, ttt, p ); - v3_muladds( p, h1, 3.0f*tt -3.0f*ttt, p ); - v3_muladds( p, h0, 3.0f*ttt -6.0f*tt +3.0f*t, p ); - v3_muladds( p, p0, 3.0f*tt -ttt -3.0f*t +1.0f, p ); -} - static float eval_bezier_length( v3f p0, v3f p1, v3f h0, v3f h1, int res ) { float length = 0.0f, m = 1.0f/(float)res;