   Binary Space Partitioning
  Hi I have got a question,I am learning programming with DirectX and C++ and in the book I have red, that there is something like a BSP tree.I have googled this subject and found lot about this.Now my question: Do I realy need to know how to devide am map in a BSP tree??for example for collision detection or so??Or is there in DirectX something that helps me to detect a collision??Is a BSP built in the DirectX or do I have to programm it on my own??Thanks   
Quote:Original post by KirjuxaDo I realy need to know how to devide am map in a BSP tree??No. There's lots of different data strucutures that can be used instead of BSP trees. The simplest one is a flat array! Some games use KD-trees, oct-trees, etc...Interestingly, BSP trees were first used in first-person shooters because they allowed geometry to be quickly sorted from back-to-front, which allowed rendering without a Z-buffer (because Z-buffering was too slow at the time).Quote:for example for collision detection or so??Spatial partitioning algorithms like BSP are useful for making collision detection (and many other graphics and physics problems) perform faster, but it's not required.[Edited by - Hodgman on May 18, 2010 5:51:18 AM];  All right, thanks for the fast answer,but actually there is nothing built in the DirectX to make such a data structure.Because my problem is that I am now at a point when I have to detect a collision and do not want to make it on my own by checking a collision with every object i have on the map. Isn't in DirectX nothing like checkCollision(col_ray) or so??Thanks   ;  You could use a physics engine to do the collision detection for you. Try Newton Game Dynamics or similar.   ;  Ah ok thanks, well it seems I have to learn a lot more about game programming.Thanks for the replies   