I am working on a project which has a bsp collision system. I have written the collision system, but I need the root node of the bsp tree, so I can parse it and extract the brush info from each subsequent node etc.
However, when I perform a call to getLevel() to obtain the BspLevel (from which I will then get the root node) I am returned a NULL pointer. The general ordering of the code is:
Code: Select all
BspSceneManager *mSceneMgr;
mSceneMgr = (BspSceneManager*)mRoot->getSceneManager(ST_INTERIOR);
mSceneMgr -> setWorldGeometry(q3Level);
BspLevel *tLevel = mSceneMgr -> getLevel();http://www.cs.bris.ac.uk/home/ss2191/bsp.hh
I can load the map and the program runs, so I know its not to do with the problem with the loading of the map data. I inititally thought it could be to do with the casting..but I can't see how it couldn't work or how it could be done any other way.
I have spent hours on this thing and cannot for the life of me see why this is the case. I know it will be some sort of school boy error, as the code is simple. But I simply cannot see it. Hopefully a few fresh pair of eyes will spot it straight away
Thanks in advance all.
