Quadtree algo

This is a discussion on Quadtree algo within the Game Programming forums, part of the General Programming Boards category; I think I get the gist of quadtrees...but I'm not sure about certain things. I'm not sure when to stop ...

  1. #1
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,586

    Quadtree algo

    I think I get the gist of quadtrees...but I'm not sure about certain things.

    I'm not sure when to stop in the tree.

    In the example I've shown here I've already discarded possible hundreds or even thousands of vertices. But when do I stop ? Is it simply according to a set size or perhaps my view distance??
    Last edited by VirtualAce; 04-21-2004 at 02:19 PM.

  2. #2
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    If you mean assigning vertices, its up to you on how far down you want to go based on performance. Basicly pick a number of vertices, and stop subdividing when the number of vertices in a quad is lower than the number. You should make this number a parameter rather then hard coding it, so you can try several different numers when youcall the creation routine.

    You see, a very larger mesh would have better formance with many quad divisions. While a smaller mesh would bennefit from a much smaller division.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  3. #3
    Registered User
    Join Date
    Aug 2003
    Posts
    470
    I was thinking of using quadtrees as well. Do you generate a new quadtree every frame or do you keep updating the same quadtree?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Quadtree and Frustum in OpenGL
    By sarah22 in forum Game Programming
    Replies: 2
    Last Post: 05-13-2009, 10:51 PM
  2. flow control algo
    By Mr.Bit in forum C Programming
    Replies: 4
    Last Post: 04-28-2008, 10:32 AM
  3. Maze generation algo
    By VirtualAce in forum Game Programming
    Replies: 7
    Last Post: 03-01-2006, 04:03 AM
  4. Figuring Algo for assignment
    By axon in forum C++ Programming
    Replies: 4
    Last Post: 10-30-2003, 10:03 AM
  5. base conversion algo
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 12-28-2001, 08:28 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21