Mail Archives: djgpp/1997/09/22/23:34:01
> Look_From = (10, 8, -15)
> Look_At = (2, 1, 0)
You also need to specify an up vector so as to orient your camera properly.
You then have to produce a projection matrix based on your view plane normal,
camera up direction and direction vector.
An excellent example for you to work off is in Michael Abrash's code which
accompanied his Dr Dobbs Journal article on clipping. The source code can
be found at ftp://ftp.idsoftware.com/mikeab/ or something like that.
His code has in it code for production of a projection matrix based on
roll, pitch and yaw angles - which can easily be modified to your code which
already has vectors.
Take a look at his code and let me know if you need further help...
Leathal.
- Raw text -