Re: LOS
- Posted by jesse kint <jk2000 at PA.NET> Aug 25, 1998
- 613 views
-----Original Message----- From: Einar Mogen <nord.staernes at ROLLAG.MAIL.TELIA.COM> To: EUPHORIA at cwisserver1.mcs.muohio.edu <EUPHORIA at cwisserver1.mcs.muohio.edu> Date: Monday, August 24, 1998 7:05 PM Subject: LOS >I need a FAST routine that can check "line of sight" between two points. >This is for use in Hayes. I want to track a straight line from a to b, and >if somewhere on the way this line hits the wall, the routine returns 0. Else >it returns 1. > >The sequence LEVEL is a 2D sequence, and to see if a given point lies on a >wall, you can do this: > >if LEVEL[ypos/20+1][xpos/20+1] then > -- just hit the wall >end if > >Can someone help me with this? > >Einar > you should find your self a good ray tracer!