Changeset 2405 for GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo/include
- Timestamp:
- 06/05/07 01:59:59 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo/include/PRMDemo.h
r2334 r2405 26 26 #include "SceneSerializer.h" 27 27 28 Light* blueLight; 28 29 29 30 // Listener class for frame updates … … 54 55 bool result = ExampleFrameListener::frameStarted(evt); 55 56 framecount++; 57 58 static float t = 0; 59 float dt = evt.timeSinceLastFrame / 4.0; 60 t += dt; 61 62 //blueLight->setDirection(sin(t),sin(t),cos(t)); 63 blueLight->getParentSceneNode()->setPosition(30 * sin(t), 1, 30 * cos(t)); 56 64 57 65 return result; … … 81 89 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Basic"); 82 90 ResourceGroupManager::getSingleton().initialiseResourceGroup("PostProc"); 83 //ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Demo");91 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_PathMap"); 84 92 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_PathMapDemo"); 85 93 } … … 225 233 OgreIlluminationManager::getSingleton().setMainCamera(mCamera); 226 234 OgreIlluminationManager::getSingleton().setMainViewport(mWindow->getViewport(0)); 227 OgreIlluminationManager::getSingleton().setShadowMap Size(512);228 OgreIlluminationManager::getSingleton().setShadowMapMaterialName( "GTP/Basic/Distance_Normalized");235 OgreIlluminationManager::getSingleton().setShadowMapMaterialName(Light::LT_SPOTLIGHT, "GTP/Basic/Distance_Normalized"); 236 OgreIlluminationManager::getSingleton().setShadowMapMaterialName(Light::LT_POINT, "GTP/Basic/Distance_Normalized"); 229 237 OgreIlluminationManager::getSingleton().setFocusingSM(false); 230 238 OgreIlluminationManager::getSingleton().setShadowMapSize(512); … … 253 261 254 262 //createPlane("p","GTP/Basic/ShadowReceiver/Depth",Vector3(0,-0.3,0),Vector2(150,150)); 255 263 /* 256 264 mainLight = mSceneMgr->createLight("MainLight"); 257 265 mainLight->setType(Light::LT_SPOTLIGHT); 258 mainLight->setCastShadows( false);259 mainLight->setDiffuseColour(ColourValue( 0.5,0.8,1,1));266 mainLight->setCastShadows(true); 267 mainLight->setDiffuseColour(ColourValue(1.0,0.5,0.3,1)); 260 268 mainLight->setSpecularColour(ColourValue::White); 261 269 mainLightNode = rootNode->createChildSceneNode(); 262 270 263 271 mainLightNode->setPosition(30,1,0.0); 264 mainLight->setPosition(30,0,0);265 mainLight->setPowerScale( 300);272 //mainLight->setPosition(30,1,0); 273 mainLight->setPowerScale(200); 266 274 mainLight->setDirection(-1, 0, 0); 267 275 mainLight->setSpotlightOuterAngle(Radian(Degree(90))); 268 mainLight->setAttenuation( 50, 0, 1, 0);276 mainLight->setAttenuation(200, 0, 0, 1); 269 277 mainLightNode->attachObject(mainLight); 270 271 272 273 274 Light* blueLight = mSceneMgr->createLight("BlueLight"); 275 blueLight->setType(Light::LT_SPOTLIGHT); 276 blueLight->setCastShadows(false); 277 blueLight->setDiffuseColour(ColourValue(0.0,0.1,1,1)); 278 */ 279 blueLight = mSceneMgr->createLight("BlueLight"); 280 blueLight->setType(Light::LT_POINT); 281 blueLight->setCastShadows(true); 282 blueLight->setDiffuseColour(ColourValue(1,1,1,1)); 278 283 blueLight->setSpecularColour(ColourValue::White); 279 284 SceneNode* blueLightNode = rootNode->createChildSceneNode(); 280 285 281 286 blueLightNode->setPosition(-30,1,0.0); 282 blueLight->setPosition(-30,0,0);283 blueLight->setPowerScale( 300);284 blueLight->setDirection(1, 0, 0);285 blueLight->setSpotlightOuterAngle(Radian(Degree(90)));286 blueLight->setAttenuation( 50, 0, 1, 0);287 //blueLight->setPosition(-30,1,0); 288 blueLight->setPowerScale(200); 289 // blueLight->setDirection(1, 0, 0); 290 // blueLight->setSpotlightOuterAngle(Radian(Degree(90))); 291 blueLight->setAttenuation(200, 0, 0, 1); 287 292 blueLightNode->attachObject(blueLight); 288 293
Note: See TracChangeset
for help on using the changeset viewer.