Mail Archives: djgpp/1999/12/24/20:39:05
Thanks to Gautier !
I tried your site, but Im just a starting "programmer" :) and I was not able
to find the information, I need.
My Engine is really simple and there must also be a simple solution .
Mabe I'm making a basic error. So I will explain it nearer. (Remember that
Im using Allegro!)
I've got an array FACE which includes a number of arrays QUAD, that
include
the 4 vertex points (x,y,z,color) .(Actually I'm just using faces with 4
points)
Let's say there are already the correct coordinates in the FACE array.
(Because this is working properly).
The main loop, calls the control_function, that checks for key input and
creates a transformation_matrix.
then the matrix is applied to all the points.
After that I use qsort() and sort the QUAD's in the FACE array.
Then,with quad3d(..) i put everything to a bitmap and then to screen.
First I was just checking the z-coordinate but it worked just partly. :(
So I tried to calculate the distance from the (0,0,0) coordinate to the
points (using simply Pythagoras formula)
But it was also bad. :(((.
I don't know what to do.
Sorry for the long letter. Pleaseeeee Help me .
Its Christmas !
P.S.: Merry Christmas and a Happy new Year to anybody who will try to help
me. :))
- Raw text -