Changeset 1862 for GTP/trunk/App/Demos/Illum/Ogre/src/ReflectionTest
- Timestamp:
- 12/07/06 16:38:48 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/ReflectionTest/include/ReflectionTest.h
r1860 r1862 30 30 #include "FrameCapture.h" 31 31 32 int scene = 1;32 int scene = 3; 33 33 FrameCapture* capture; 34 34 … … 43 43 44 44 public: 45 void setMoveSpeed(float speed){mMoveSpeed = speed;} 45 46 RaytraceDemoListener(RenderWindow* window, Camera* maincam, SceneNode* objectNode) 46 47 :ExampleFrameListener(window, maincam) … … 48 49 { 49 50 this->mMoveSpeed = 0.1; 51 if(scene == 2) 52 this->mMoveSpeed = 1.0; 53 if(scene == 3) 54 this->mMoveSpeed = 5.0; 55 mStatsOn = false; 56 showDebugOverlay(mStatsOn); 57 50 58 framecount = 0; 51 59 this->objectNode = objectNode; … … 280 288 Root::getSingleton()._setCurrentSceneManager(mSceneMgr); 281 289 282 mCamera->setFOVy(Radian(Degree(80 * 3.0 / 4.0)));290 mCamera->setFOVy(Radian(Degree(80 * mWindow->getHeight() / mWindow->getWidth()))); 283 291 mCamera->setFarClipDistance(200); 284 292 mCamera->setNearClipDistance(0.1); … … 295 303 if(scene == 1) createScene1(); 296 304 if(scene == 2) createScene2(); 305 if(scene == 3) createScene3(); 297 306 298 307 OgreIlluminationManager::getSingleton().initTechniques(); … … 362 371 SceneNode* rootNode = mSceneMgr->getRootSceneNode(); 363 372 364 Entity* object = mSceneMgr->createEntity("object", "athene.mesh"); 373 mCamera->setPosition(2.3,7.0,2.3); 374 mCamera->lookAt(Vector3(0,5.75,0.0)); 375 376 Entity* object = mSceneMgr->createEntity("object", "teapot.mesh"); 365 377 object->setMaterialName("MetalTeapotMultipleBounce"); 366 378 objectNode = rootNode->createChildSceneNode(); 367 379 objectNode->attachObject(object); 368 380 //objectNode->scale(0.5,0.5,0.5); 369 objectNode->scale(0.005,0.005,0.005);370 objectNode->setPosition(0, 1.2,0);381 //objectNode->scale(0.005,0.005,0.005); 382 objectNode->setPosition(0,5.75,0.0); 371 383 objectNode->_updateBounds(); 372 384 373 Entity* room = mSceneMgr->createEntity("scene", " difflab.mesh");385 Entity* room = mSceneMgr->createEntity("scene", "terito.mesh"); 374 386 //room->setMaterialName("GameTools/Phong"); 375 387 SceneNode* roomNode = rootNode->createChildSceneNode(); … … 378 390 379 391 mSceneMgr->setShadowTechnique(SHADOWTYPE_NONE); 380 Light* redLight1 = mSceneMgr->createLight("RedLight1"); 381 redLight1->setType(Light::LT_POINT); 382 redLight1->setCastShadows(false); 383 redLight1->setDiffuseColour(ColourValue(1,0.055, 0.0)); 384 redLight1->setPowerScale(1.6); 385 SceneNode* redLightNode1 = rootNode->createChildSceneNode(); 386 redLightNode1->setPosition(0.05,2.361,-1.07); 387 redLightNode1->attachObject(redLight1); 388 389 Light* greenLight1 = mSceneMgr->createLight("GreenLight1"); 390 greenLight1->setType(Light::LT_POINT); 391 greenLight1->setCastShadows(false); 392 greenLight1->setDiffuseColour(ColourValue(0.362,0.783, 0.685)); 393 greenLight1->setPowerScale(2.0); 394 SceneNode* greenLightNode1 = rootNode->createChildSceneNode(); 395 greenLightNode1->setPosition(1.312,1.313,0); 396 greenLightNode1->attachObject(greenLight1); 397 398 Light* mainBlueLight = mSceneMgr->createLight("MainBlueLight"); 399 mainBlueLight->setType(Light::LT_SPOTLIGHT); 400 mainBlueLight->setCastShadows(true); 401 mainBlueLight->setDiffuseColour(ColourValue(0.395,0.766, 1.0)); 402 mainBlueLight->setPowerScale(5.0); 403 mainBlueLight->setSpotlightRange(Degree(0),Degree(160)); 404 mainBlueLight->setAttenuation(2.5, 0, 1, 0); 405 SceneNode* mainBlueLightNode = rootNode->createChildSceneNode(); 406 mainBlueLightNode->setPosition(-0.546,2.095,1.035); 407 //mainBlueLightNode->rotate(Vector3::UNIT_X, Degree(161.396)); 408 //mainBlueLightNode->rotate(Vector3::UNIT_Y, Degree(53.955)); 409 //mainBlueLightNode->rotate(Vector3::UNIT_Z, Degree(-145.065)); 410 mainBlueLight->setDirection(-1.5,-2.0,1.0); 411 mainBlueLightNode->attachObject(mainBlueLight); 392 Light* Light1 = mSceneMgr->createLight("Light1"); 393 Light1->setType(Light::LT_POINT); 394 Light1->setCastShadows(false); 395 Light1->setDiffuseColour(ColourValue(1,1, 1)); 396 Light1->setPowerScale(1.0); 397 SceneNode* LightNode1 = rootNode->createChildSceneNode(); 398 LightNode1->setPosition(1.5,10.3,0); 399 LightNode1->attachObject(Light1); 400 } 401 402 void createScene3(void) 403 { 404 SceneNode* rootNode = mSceneMgr->getRootSceneNode(); 405 406 mCamera->setPosition(6.564,4.328,0.059); 407 mCamera->lookAt(Vector3(0.4,0.16,0.25)); 408 409 Entity* object = mSceneMgr->createEntity("object", "teapot.mesh"); 410 object->setMaterialName("MetalTeapotMultipleBounce"); 411 objectNode = rootNode->createChildSceneNode(); 412 objectNode->attachObject(object); 413 //objectNode->scale(0.5,0.5,0.5); 414 objectNode->scale(2.7,2.7,2.7); 415 objectNode->setPosition(0,0.7,0.0); 416 objectNode->_updateBounds(); 417 418 Entity* room = mSceneMgr->createEntity("scene", "colorcube.mesh"); 419 //room->setMaterialName("GameTools/Phong"); 420 SceneNode* roomNode = rootNode->createChildSceneNode(); 421 roomNode->attachObject(room); 422 roomNode->_updateBounds(); 412 423 } 413 424
Note: See TracChangeset
for help on using the changeset viewer.