home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / graphics / 14276 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.4 KB

  1. Path: sparky!uunet!charon.amdahl.com!amdahl!rtech!pacbell.com!sgiblab!swrinde!gatech!uflorida!maple.circa.ufl.edu!LIONESS
  2. From: lioness@maple.circa.ufl.edu
  3. Newsgroups: comp.graphics
  4. Subject: Difference between object and camera matrix
  5. Message-ID: <38405@uflorida.cis.ufl.edu>
  6. Date: 27 Jan 93 19:43:21 GMT
  7. Sender: news@uflorida.cis.ufl.edu
  8. Reply-To: lioness@maple.circa.ufl.edu
  9. Organization: Center for Instructional and Research Computing Activities
  10. Lines: 34
  11. Nntp-Posting-Host: maple.circa.ufl.edu
  12.  
  13.  
  14. Yo.  I am trying to derive a camera matrix* from an object matrix**.
  15. To do this I am deriving the VUP, VRIGHT, and VFORWARD vectors
  16. from the object by doing this:
  17.  
  18. VECTOR vf(0,0,1), vup(0,1,0), vright(1,0,0);
  19.  
  20.    vright = vright * object_matrix;
  21.    vup    = vup * object_matrix;
  22.    vf     = vf * object_matrix;
  23.  
  24.    I then translate these vectors doing:
  25.  
  26.    vector.x -= object.x;
  27.    vector.y -= object.y;
  28.    vector.z -= object.z;
  29.  
  30.    I finally normalize them.  So, I have three normalized direction vectors
  31. that represent the object's orientation.  How do I take these and make a 
  32. camera matrix?
  33.  
  34. Thanks,
  35.  
  36. Brian
  37.  
  38. PS Please reply in e-mail, since my newserver is about 1 week behind in
  39. getting new news.
  40.  
  41. * camera matrix being the matrix used to move a world coordinate system
  42. to a camera relative coordinate system
  43.  
  44. ** object matrix being the matrix used to move a local/object relative
  45. coordinate system into the world
  46.  
  47.