23 * projete le vertex 3D sur le plan d'affichage
24 * retourne (0,0) si le point ne doit pas etre affiche.
26 * bonne valeur pour distance : 256
28 #define V3D_TO_V2D(v3,v2,width,height,distance) \
32 F2I((distance * v3.x / v3.z),Xp) ; \
33 F2I((distance * v3.y / v3.z),Yp) ; \
34 v2.x = Xp + (width>>1); \
35 v2.y = -Yp + (height>>1); \
37 else v2.x=v2.y=-666; \
40 void v3d_to_v2d(v3d *src, int nbvertex, int width, int height, float distance, v2d *v2_array);
43 * rotation selon Y du v3d vi d'angle a (cosa=cos(a), sina=sin(a))
44 * centerz = centre de rotation en z
46 #define Y_ROTATE_V3D(vi,vf,sina,cosa)\
48 vf.x = vi.x * cosa - vi.z * sina;\
49 vf.z = vi.x * sina + vi.z * cosa;\
56 #define TRANSLATE_V3D(vsrc,vdest)\
63 #define MUL_V3D(lf,v) {v.x*=lf;v.y*=lf;v.z*=lf;}