Re: spinning "E" demo questions, for ray casting & surface rendering
- Posted by achury May 19, 2009
- 1069 views
Look at this image
http://imgbin.org/index.php?page=image&id=521
Upper image is the user looking to the computer screen.
Lower is your virtual camera in your virtual world. The image is projected on a virtual screen. The position of the screen is between the camera and the object.
From this point of view, the coordinate of the user is the same coordinate of the camera.
My proposal is to check each point on the virtual screen (each point on your real screen or window), project a line from camera to this point and continue the same line to check if collides any polygon of the object.