cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/22/23:34:01

From: leathm AT solwarra DOT gbrmpa DOT gov DOT au (Leath Muller)
Message-Id: <199709230327.NAA03695@solwarra.gbrmpa.gov.au>
Subject: Re: Help with virtual camera in 3D
To: gautam AT interlog DOT com (Gautam N. Lad)
Date: Tue, 23 Sep 1997 13:27:24 +1000 (EST)
Cc: djgpp AT delorie DOT com
In-Reply-To: <606fk1$log$1@news.interlog.com> from "Gautam N. Lad" at Sep 22, 97 07:11:48 pm

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019