home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!amdahl!rtech!pacbell.com!sgiblab!swrinde!gatech!uflorida!maple.circa.ufl.edu!LIONESS
- From: lioness@maple.circa.ufl.edu
- Newsgroups: comp.graphics
- Subject: Difference between object and camera matrix
- Message-ID: <38405@uflorida.cis.ufl.edu>
- Date: 27 Jan 93 19:43:21 GMT
- Sender: news@uflorida.cis.ufl.edu
- Reply-To: lioness@maple.circa.ufl.edu
- Organization: Center for Instructional and Research Computing Activities
- Lines: 34
- Nntp-Posting-Host: maple.circa.ufl.edu
-
-
- Yo. I am trying to derive a camera matrix* from an object matrix**.
- To do this I am deriving the VUP, VRIGHT, and VFORWARD vectors
- from the object by doing this:
-
- VECTOR vf(0,0,1), vup(0,1,0), vright(1,0,0);
-
- vright = vright * object_matrix;
- vup = vup * object_matrix;
- vf = vf * object_matrix;
-
- I then translate these vectors doing:
-
- vector.x -= object.x;
- vector.y -= object.y;
- vector.z -= object.z;
-
- I finally normalize them. So, I have three normalized direction vectors
- that represent the object's orientation. How do I take these and make a
- camera matrix?
-
- Thanks,
-
- Brian
-
- PS Please reply in e-mail, since my newserver is about 1 week behind in
- getting new news.
-
- * camera matrix being the matrix used to move a world coordinate system
- to a camera relative coordinate system
-
- ** object matrix being the matrix used to move a local/object relative
- coordinate system into the world
-
-