Results 1 to 4 of 4

Thread: how do tell if somthing is in view

  1. #1
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    New Zealand
    Posts
    111

    how do tell if somthing is in view

    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).]

  2. #2
    Senior Member Regular Contributor
    Join Date
    Oct 2002
    Location
    San Diego, CA, USA
    Posts
    209

    Re: how do tell if somthing is in view

    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.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    New Zealand
    Posts
    111

    Re: how do tell if somthing is in view

    thanx that worked really well

  4. #4
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    New Zealand
    Posts
    111

    Re: how do tell if somthing is in view

    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?

Similar Threads

  1. Creating multiple planes in 3D view (projection view)
    By Bhoot123 in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 02-20-2018, 02:40 AM
  2. newbie view location / view direction in textfield
    By newsb in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-12-2011, 02:15 PM
  3. Extract view frutum planes from view matrix
    By ei05tbe in forum OpenGL: General
    Replies: 4
    Last Post: 09-18-2010, 06:22 PM
  4. somthing about sky and glusphere
    By beginner620824 in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 03-03-2003, 07:11 AM
  5. Aligning a frustum view with an ortho view
    By Siwko in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 05-22-2001, 04:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean