Index: GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include/TestKdTreeAppListener.h
===================================================================
--- GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include/TestKdTreeAppListener.h	(revision 1516)
+++ GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include/TestKdTreeAppListener.h	(revision 2382)
@@ -93,4 +93,5 @@
 		SM_KTE,
 		SM_BVH,
+		SM_BIH,
 		SM_OCM,
 		SM_OCT,
@@ -134,5 +135,5 @@
 		mKI(1.0f),
 		mMaxDepth(10),
-		mSceneManager(SM_KDT),
+		mSceneManager(SM_BVH),  //changed cse 
 		mRenderMethod(KdTree::KDRM_GTP_CHC),
 		mBuildMethod(KdTree::KDBM_RECURSIVE),
Index: GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTree.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTree.cpp	(revision 2361)
+++ GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTree.cpp	(revision 2382)
@@ -209,4 +209,6 @@
 	mViewCells = cfDeath.getSetting("viewcells");
 
+	
+
 	tmp = cfDeath.getSetting("shadows");
 	StringUtil::toLowerCase(tmp);
@@ -489,4 +491,5 @@
 			{
 				deaths = mSceneMgr->createEntity(cat(entName, i, j).c_str(),"robot.mesh");
+				//deaths = mSceneMgr->createEntity(cat(entName, i, j).c_str(),"cube.mesh");
 				if (mShadowsEnabled)
 					deaths->setCastShadows(true);
@@ -508,4 +511,5 @@
 				Math::RangeRandom(-planeThreeEights, planeThreeEights));
 			deaths = mSceneMgr->createEntity(cat(entName,666,i),"robot.mesh");
+			//deaths = mSceneMgr->createEntity(cat(entName,666,i),"cube.mesh");
 			if (mShadowsEnabled)
 				deaths->setCastShadows(true);
@@ -528,4 +532,5 @@
 				Math::RangeRandom(-planeThreeEights, planeThreeEights));
 			deaths = mSceneMgr->createEntity(cat(entName,666,i),"razor.mesh");
+			//deaths = mSceneMgr->createEntity(cat(entName,666,i),"cube.mesh");
 			if (mShadowsEnabled)
 				deaths->setCastShadows(true);
@@ -613,4 +618,5 @@
 {
 	// Get the SceneManager
+	mOptions.mSceneManager=3; //changed cse
 	mSceneMgr = mRoot->createSceneManager(
 		KdTreeAppListener::SCENEMANAGERNAME[mOptions.mSceneManager],
@@ -619,12 +625,18 @@
 	if (mOptions.mSceneManager == KdTreeAppListener::SM_KDT || 
 		mOptions.mSceneManager == KdTreeAppListener::SM_KTE ||
-		mOptions.mSceneManager == KdTreeAppListener::SM_BVH)
+		mOptions.mSceneManager == KdTreeAppListener::SM_BVH ||
+		mOptions.mSceneManager == KdTreeAppListener::SM_BIH )
 	{
 		mSceneMgr->setOption("BuildMethod", &mOptions.mBuildMethod);
 		mSceneMgr->setOption("KdTreeMaxDepth", &mOptions.mMaxDepth);
 		mSceneMgr->setOption("KT", &mOptions.mKT);
+		mOptions.mKI=20;
 		mSceneMgr->setOption("KI", &mOptions.mKI);
 		mSceneMgr->setOption("RenderMethod", &mOptions.mRenderMethod);
 		mSceneMgr->setOption("EnhancedVisibility", &mOptions.mEnhancedVisibility);
+		bool show=true;
+		mSceneMgr->setOption("ShowBiHierarchy", &show);
+		mSceneMgr->setOption("ShowAllBoxes", &show);
+		
 	}
 	// set algorithm when scene manager is OCM - numbering is different though
@@ -652,4 +664,8 @@
     mCamera = mSceneMgr->createCamera("PlayerCam");
 	mCamera->setNearClipDistance(1);
+   
+    SceneNode *TempNode=mSceneMgr->getRootSceneNode();//->createChildSceneNode("PlayerCamNode", Vector3(0,0,0));
+	printf("TempNode: %d\n",TempNode);
+
 
 	mCamNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("PlayerCamNode", Vector3(0,0,0));
@@ -901,4 +917,5 @@
 	{
 		SceneNode *node = root->createChildSceneNode("IVSceneNode" + index);
+		
 
 		mIVReader->buildTree(mSceneMgr, node);
Index: GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTreeAppListener.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTreeAppListener.cpp	(revision 2359)
+++ GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTreeAppListener.cpp	(revision 2382)
@@ -19,5 +19,5 @@
 const String KdTreeAppListener::BUILDMETHOD[] = { "RE", "PQ" };
 const String KdTreeAppListener::BUILDMETHODCAPTION[] = { "Recursive", "Priority Queue" };
-const String KdTreeAppListener::SCENEMANAGER[] = { "KDT", "KTE", "BVH", "OCM", "OCT", "TER", "GEN" };
+const String KdTreeAppListener::SCENEMANAGER[] = { "KDT", "KTE", "BVH","BIH", "OCM", "OCT", "TER", "GEN" };
 const String KdTreeAppListener::SCENEMANAGERNAME[] =
 {
@@ -25,4 +25,5 @@
 	"KdTreeTerrainSceneManager",
 	"BvHierarchySceneManager",
+	"BiHierarchySceneManager",
 	"OcclusionCullingSceneManager",
 	"OctreeSceneManager",
@@ -113,5 +114,5 @@
 mFreeMove(false),
 mTopCamFollow(true),
-mShowTree(SHOWTREE_OFF),
+mShowTree(SHOWTREE_ALL),
 // view cells
 mViewCellsLoaded(false),
@@ -1239,5 +1240,5 @@
 		if (evt.timeSinceLastFrame == 0)
 		{
-			mMoveScale = 1;
+			mMoveScale = 0.2;
 			mRotScale = 0.1;
 		}
@@ -1347,4 +1348,5 @@
 		{
 			togglePlayback();
+			saveLog();
 			// exit app when in demo mode
 			if (mOptions.mDemoMode)
