I stayed up til 7am last night trying to get my spatial partitioning to work and I think I've got it. It works with a few test objects, but I'm still not sure about it. I don't want to go onto the rest of my project and have this break down later, so I was wondering if anyone wouldn't mind checking it out to see if it looks alright. It might not be the most efficient overall, but it certainly cuts back on drawing nonetheless.
Here's my Scene class. The update function has the rotating view just to give me an idea of what's going on. I've yet to get my camera system hooked into it yet.
http://xna.multigan.com/pastebin/?page=view&id=1176239957
And here's my PlaneSpaceTreeNode class. I tried commenting most of what I was doing when adding scene nodes so that someone reading it wouldn't have too much trouble understanding what I was going for.
http://xna.multigan.com/pastebin/?page=view&id=1176239970
Thanks for any advice or proofreads.
Nick Gravelyn -- Microsoft XNA MVP
XNA Wiki |
Zune Games