i am working on my own 3d game, and just like to use a octree or bsp for it.
so, i read many pages about the topic - and understood it.
implemented the bsp in my system and tested it.
fine so far .... BUT !
i have a BSP tree now... how do i connect objects / triangles / verteces to it...
i have this structs that represent a node or a leaf... they know parent and child ...
but once i found the node, i wanne know whats inside it ....
but how do i connect the objects in my world to it ????
should every node have a array
or should a object have a member
and what if i like to keep this informaions for triangles or even vertexes ?
i miss the last hint to get this right.... this is not mentioned in any of the tutorials i have read.
i just wanne know how you would solve the collision detection in a game like counterstrike ? thinkmabout the buildings eg. so there are walls with doors - caves , and so on....
so i had 2 ideas beside coll detect with every triangle.
one is to have a invisible geometry that encapsulates every space you cant access ( walls, ... ) and use isInside() function to check every frame ( in octree of course )
second is to draw boxes above every solid element using its normals and test for pointInside() this triangle boxes - again of course with octree preselect.
i have these ideas but bevor i start implement it , imwanne hear how you do it... maybe i just did not thought of a more simple idea..