configure.ac: Add checks for Flex/Yacc/Bison and other furry animals, for the new...
[platform/upstream/gst-plugins-good.git] / gst / goom / v3d.c
1 #include "v3d.h"
2
3 void
4 v3d_to_v2d (v3d * v3, int nbvertex, int width, int height, float distance,
5     v2d * v2)
6 {
7   int i;
8
9   for (i = 0; i < nbvertex; ++i) {
10     if (v3[i].z > 2) {
11       int Xp, Yp;
12
13       F2I ((distance * v3[i].x / v3[i].z), Xp);
14       F2I ((distance * v3[i].y / v3[i].z), Yp);
15       v2[i].x = Xp + (width >> 1);
16       v2[i].y = -Yp + (height >> 1);
17     } else
18       v2[i].x = v2[i].y = -666;
19   }
20 }