View Full Version : how do tell if somthing is in view
11-11-2002, 10:45 PM
how do i tell if something eg the point (0,0,0),after lots of rotations and translations, is actually drawn in the window
can this be done easily??
[This message has been edited by jono_123 (edited 11-20-2002).]
11-12-2002, 12:45 PM
Relatively easy, check out the frustum culling tutorial at http://www.gametutorials.com. Anyways, the basic idea is, you get the equations for the planes which define the bottom, top, left, right, front and back of your viewing frustum. Then you check to see if your point is to one side or the other of each of those planes. This is done easily if the normal to the plane points inwards, into your viewing frustum. Once you have established that, you know whether or not your point is in view.
11-16-2002, 06:51 PM
thanx that worked really well
11-17-2002, 08:47 PM
ok new problem: if this way i can tell if point (0,0,0) is in view but say there is a wall in front of it and i can not see it on the screen how do i test for this?
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.