Re: [AD] Patch for the documentation of polygon_z_normal()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Elias Pschernig wrote:
In any case, don't forget to re-submit a patch for the polygon_z_normal
docs with all the other things mentioned so far :)

OK. Here's a new patch with the suggested changes. I've removed all references to alternative methods of back-face culling. While I've removed many hyphens, I decided to keep the hyphen in 'back-face' because it was already spelled with a hyphen.

As for the other example I suggested (involving lit vertices), I may not have time to submit one before I go off on another trip.

AE.
--- allegro._tx.old	2005-06-10 14:52:46.208830400 +0200
+++ allegro._tx	2005-06-10 14:48:28.918865600 +0200
@@ -10794,7 +10794,11 @@
    to the viewer, therefore they never need to be drawn. This can cull on 
    average half the polygons from a scene. If the normal is negative the 
    polygon can safely be culled. If it is zero, the polygon is perpendicular 
-   to the screen.
+   to the screen. However, this method of culling back-faces must only be 
+   used once the X and Y coordinates have been projected into screen space 
+   using persp_project() (or if an orthographic (isometric) projection is 
+   being used). Note that this function will fail if the three vertices are
+   co-linear (they lie on the same line) in 3D space.
 
 @@void @apply_matrix(const MATRIX *m, fixed x, y, z, *xout, *yout, *zout);
 @@void @apply_matrix_f(const MATRIX_f *m, float x, y, z, *xout, *yout, *zout);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/