1clip3d_f(3) Allegro manual clip3d_f(3)
2
3
4
6 clip3d_f - Clips the polygon given in vtx using floating point math,
7 Allegro game programming library.
8
10 #include <allegro.h>
11
12
13 int clip3d_f(int type, float min_z, float max_z, int vc, const V3D_f
14 *vtx[], V3D_f *vout[], V3D_f *vtmp[], int out[]);
15
17 Clips the polygon given in `vtx'. The number of vertices is `vc', the
18 result goes in `vout', and `vtmp' and `out' are needed for internal
19 purposes. The pointers in `vtx', `vout' and `vtmp' must point to valid
20 V3D_f structures.
21
22 As additional vertices may appear in the process of clipping, so the
23 size of `vout', `vtmp' and `out' should be at least vc * (1.5 ^ n),
24 where `n' is the number of clipping planes (5 or 6), and `^' denotes
25 "to the power of".
26
27 The frustum (viewing volume) is defined by -z<x<z, -z<y<z,
28 0<min_z<z<max_z. If max_z<=min_z, the z<max_z clipping is not done. As
29 you can see, clipping is done in the camera space, with perspective in
30 mind, so this routine should be called after you apply the camera
31 matrix, but before the perspective projection. The routine will cor‐
32 rectly interpolate u, v, and c in the vertex structure. However, no
33 provision is made for high/truecolor GCOL.
34
36 Returns the number of vertices after clipping is done.
37
38
40 polygon3d(3), clip3d(3), excamera(3), exscn3d(3)
41
42
43
44Allegro version 4.2.3 clip3d_f(3)