Index: GTP/trunk/App/Demos/Illum/Ogre/src/GameToolsRaytraceDemo/include/GameToolsRaytraceDemo.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Ogre/src/GameToolsRaytraceDemo/include/GameToolsRaytraceDemo.h	(revision 1691)
+++ GTP/trunk/App/Demos/Illum/Ogre/src/GameToolsRaytraceDemo/include/GameToolsRaytraceDemo.h	(revision 1712)
@@ -40,4 +40,5 @@
 	SceneNode* copperSphereNode;
 	SceneNode* aluSphereNode;
+	SceneNode* centerSphereNode;
 	SceneNode* lightNode;
 	Light* light;
@@ -50,4 +51,5 @@
 																SceneNode* copperSphereNode,
 																SceneNode* aluSphereNode,
+																SceneNode* centerSphereNode,
 																Light* light)
         :ExampleFrameListener(window, maincam) 
@@ -59,4 +61,5 @@
 		this->copperSphereNode = copperSphereNode;
 		this->aluSphereNode = aluSphereNode;
+		this->centerSphereNode = centerSphereNode;
 		this->lightNode = lightNode;
 		this->light = light;
@@ -93,4 +96,22 @@
 		}
 	*/
+		if (mInputDevice->isKeyDown(KC_SPACE))
+        {
+			mTimeUntilNextToggle = 2;
+			static bool first = true;
+			first = !first;
+			goldSphereNode->setVisible(first,true);
+			goldSphereNode->setVisible(!first,false);
+			aluSphereNode->setVisible(first,true);
+			aluSphereNode->setVisible(!first,false);
+			silverSphereNode->setVisible(first,true);
+			silverSphereNode->setVisible(!first,false);
+			copperSphereNode->setVisible(first,true);
+			copperSphereNode->setVisible(!first,false);
+			centerSphereNode->setVisible(first,true);
+			centerSphereNode->setVisible(!first,false);
+			
+		
+		}
 
 		return ExampleFrameListener::processUnbufferedKeyInput(evt);
@@ -157,4 +178,5 @@
 	SceneNode* copperSphereNode;
 	SceneNode* aluSphereNode;
+	SceneNode* centerSphereNode;
 	Light* mainLight;
 
@@ -200,9 +222,18 @@
 		//init objects
 		Entity* kupola = mSceneMgr->createEntity("kupola", "kupola.mesh");
-		Entity* athene = mSceneMgr->createEntity("athene", "head.mesh");
-		Entity* goldSphere = mSceneMgr->createEntity("goldSphere", "head.mesh");
-		Entity* silverSphere = mSceneMgr->createEntity("silverSphere", "head.mesh");
-		Entity* copperSphere = mSceneMgr->createEntity("copperSphere", "head.mesh");
-		Entity* aluSphere = mSceneMgr->createEntity("aluSphere", "head.mesh");
+	
+		Entity* centerHead = mSceneMgr->createEntity("centerHead", "head.mesh");
+		Entity* goldHead = mSceneMgr->createEntity("goldHead", "head.mesh");
+		Entity* silverHead = mSceneMgr->createEntity("silverHeade", "head.mesh");
+		Entity* copperHead = mSceneMgr->createEntity("copperHead", "head.mesh");
+		Entity* aluHead = mSceneMgr->createEntity("aluHead", "head.mesh");
+
+		Entity* centerSphere = mSceneMgr->createEntity("centerSphere", "sphere.mesh");
+		Entity* goldSphere = mSceneMgr->createEntity("goldSphere", "sphere.mesh");
+		Entity* silverSphere = mSceneMgr->createEntity("silverSphere", "sphere.mesh");
+		Entity* copperSphere = mSceneMgr->createEntity("copperSphere", "sphere.mesh");
+		Entity* aluSphere = mSceneMgr->createEntity("aluSphere", "sphere.mesh");
+
+
 
 		kupola->setCastShadows(false);
@@ -229,25 +260,39 @@
 		//kupolaNode->scale(2,2,2);		
 		//kupolaNode->setPosition(0,100,0);
-		SceneNode* atheneNode = rootNode->createChildSceneNode("athene");
-		atheneNode->attachObject(athene);
-		//atheneNode->setScale(3.5,5.5,5.5);
-		atheneNode->setScale(4,4,4);
-		//atheneNode->setScale(0.5,0.5,0.5);
-		AxisAlignedBox bbox = athene->getBoundingBox();
-		atheneNode->setPosition(0, 100,0);
+
+		centerSphereNode = rootNode->createChildSceneNode("centerSphere");
+		SceneNode* centerHeadNode = centerSphereNode->createChildSceneNode("centerHead");
+		centerSphereNode->setPosition(0, 100,0);
+		centerHeadNode->attachObject(centerHead);
+		centerSphereNode->attachObject(centerSphere);
+		centerSphereNode->setScale(0.4,0.4,0.4);
+		centerHeadNode->setScale(8,8,8);		
+		centerHeadNode->setVisible(false, false);
 		
 
 		goldSphereNode = rootNode->createChildSceneNode( "goldSphere" );
-		//goldSphereNode->scale(0.3,0.3,0.3);
-		goldSphereNode->scale(2,2,2);
+		SceneNode* goldHeadNode = goldSphereNode->createChildSceneNode( "goldHead" );
+		goldSphereNode->scale(0.3,0.3,0.3);
+		goldHeadNode->setScale(8,8,8);
+		goldHeadNode->setVisible(false, false);
+
 		silverSphereNode = rootNode->createChildSceneNode( "silverSphere" );
-		//silverSphereNode->scale(0.3,0.3,0.3);
-		silverSphereNode->scale(2,2,2);
+		SceneNode* silverHeadNode = silverSphereNode->createChildSceneNode( "silverHead" );
+		silverSphereNode->scale(0.3,0.3,0.3);
+		silverHeadNode->setScale(8,8,8);
+		silverHeadNode->setVisible(false, false);
+
+		aluSphereNode = rootNode->createChildSceneNode( "aluSphere" );
+		SceneNode* aluHeadNode = aluSphereNode->createChildSceneNode( "aluHead" );
+		aluSphereNode->scale(0.3,0.3,0.3);
+		aluHeadNode->setScale(8,8,8);
+		aluHeadNode->setVisible(false, false);
+
 		copperSphereNode = rootNode->createChildSceneNode( "copperSphere" );
-		//copperSphereNode->scale(0.3,0.3,0.3);
-		copperSphereNode->scale(2,2,2);
-		aluSphereNode = rootNode->createChildSceneNode( "aluSphere" );
-		//aluSphereNode->scale(0.3,0.3,0.3);
-		aluSphereNode->scale(2,2,2);
+		SceneNode* copperHeadNode = copperSphereNode->createChildSceneNode( "copperHead" );
+		copperSphereNode->scale(0.3,0.3,0.3);
+		copperHeadNode->setScale(8,8,8);
+		copperHeadNode->setVisible(false, false);
+		
 
 		goldSphereNode->attachObject(goldSphere);
@@ -255,4 +300,10 @@
 		aluSphereNode->attachObject(aluSphere);
 		copperSphereNode->attachObject(copperSphere);
+		
+		goldHeadNode->attachObject(goldHead);
+		silverHeadNode->attachObject(silverHead);
+		aluHeadNode->attachObject(aluHead);
+		copperHeadNode->attachObject(copperHead);
+	
 
 		goldSphereNode->_updateBounds();
@@ -261,6 +312,12 @@
 		copperSphereNode->_updateBounds();
 
+		goldHeadNode->_updateBounds();
+		silverHeadNode->_updateBounds();
+		aluHeadNode->_updateBounds();
+		copperHeadNode->_updateBounds();
+
 		kupolaNode->_updateBounds();
-		atheneNode->_updateBounds();
+		centerSphereNode->_updateBounds();
+		centerHeadNode->_updateBounds();
 
 		//Init lights
@@ -279,18 +336,18 @@
 		bbs->setMaterialName("Flare");
 		mainLightNode->attachObject(bbs);
+		
+		silverSphere->setMaterialName("EnvMetals/Silver");
+		copperSphere->setMaterialName("EnvMetals/Copper");
+		goldSphere->setMaterialName("EnvMetals/Gold");
 		aluSphere->setMaterialName("EnvMetals/Alu");
-		copperSphere->setMaterialName("EnvMetals/Copper");
-		
-		{
-			Material* oldmat = (Material*) MaterialManager::getSingleton().getByName("EnvMetals/Gold").getPointer();
-			Material* newmat = oldmat->clone("gold1").getPointer();
-			Material* newmat2 = oldmat->clone("gold2").getPointer();
-
-			goldSphere->setMaterialName(newmat->getName());
-			silverSphere->setMaterialName(newmat2->getName());
-		}
-
-		athene->setMaterialName("GameTools/CausticGlass");
-		//athene->setMaterialName("GameTools/CubeMap/Diffuse");
+
+		aluHead->setMaterialName("EnvMetals/Alu");
+		copperHead->setMaterialName("EnvMetals/Copper");
+		goldHead->setMaterialName("EnvMetals/Gold");
+		silverHead->setMaterialName("EnvMetals/Silver");
+			
+
+		centerSphere->setMaterialName("GameTools/CausticGlass");
+		centerHead->setMaterialName("GameTools/CausticGlass");
 		
 		OgreIlluminationManager::getSingleton().initTechniques();
@@ -309,4 +366,5 @@
 											copperSphereNode,
 											aluSphereNode,
+											centerSphereNode,
 											mainLight);
 		mFrameListener->setPriority(1);
