home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sgi / misc / 345 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.6 KB

  1. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!hplabs!unix!unix.sri.com!lau
  2. From: lau@sunset.ai.sri.com (Stephen Lau)
  3. Newsgroups: comp.sys.sgi.misc
  4. Subject: Help with matrix stack
  5. Message-ID: <LAU.93Jan21125414@sunset.ai.sri.com>
  6. Date: 21 Jan 93 20:54:14 GMT
  7. Sender: news@unix.SRI.COM
  8. Distribution: comp
  9. Organization: SRI International, Menlo Park, CA
  10. Lines: 29
  11.  
  12.  
  13. I'm trying to use the matrix stack to construct a transformation
  14. matrix that converts an object's coordinates to window coordinates.
  15.  
  16. I've done it manually, constructing my own matrices and converting
  17. the coordinates, but what I really want to do is to utilize some
  18. of the GL calls, namely perspective, rotate, translate, scale and
  19. lookat.
  20.  
  21. I would like to call perspective() and lookat() and then somehow get
  22. this combined transformation matrix and use it to do my own coordinate
  23. transformations and clipping. Is this possible?
  24.  
  25. I've tried calling perspective() and lookat() and then getmatrix(), but
  26. the resulting matrix doesn't transform it to window coordinates, only to
  27. local world coordinates. This is part of the way, but I'm missing the final
  28. step that then projects this to window coordinates. 
  29.  
  30. Any help would be most appreciated.
  31.  
  32. Steve
  33.  
  34. -------------------------------------------------------------------------------
  35. Stephen Lau                 lau@ai.sri.com| 
  36. SRI International                         | "Frosted milk with cereal and juice
  37. 333 Ravenswood Ave., Menlo Park, CA. 94025|  forms a complete breakfast!"
  38. (415) 859-2925              (415) 326-6200|            - Ren & Stimpy     
  39. -------------------------------------------------------------------------------
  40.  
  41.