Changeset 1423 for GTP/trunk/App/Demos/Illum
- Timestamp:
- 09/21/06 08:34:44 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/src/HierarchicalSystem
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/HierarchicalSystem/include/HierarchicalSystem.h
r1331 r1423 33 33 34 34 unsigned long framecount; 35 35 SceneNode* lightNode; 36 36 37 public: 37 ParticleDemoFrameListener(RenderWindow* window, Camera* maincam )38 ParticleDemoFrameListener(RenderWindow* window, Camera* maincam, SceneNode* lightNode) 38 39 :ExampleFrameListener(window, maincam) 39 40 40 41 { 42 this->lightNode = lightNode; 41 43 framecount = 0; 42 44 } … … 45 47 { 46 48 bool result = ExampleFrameListener::frameStarted(evt); 49 50 float t = (float) framecount / 50.0; 51 float r = 150; 52 lightNode->setPosition( r * sin(t), r * sin(5 * t) , r * cos(t)); 53 47 54 framecount++; 48 55 return result; … … 122 129 123 130 Root::getSingleton()._setCurrentSceneManager(mSceneMgr); 124 mCamera->setPosition(0,100,240); 131 mCamera->setPosition(0,0,100); 132 mCamera->setDirection(0,0,-1); 125 133 mCamera->setFOVy(Radian(Degree(80))); 126 //mCamera->setFarClipDistance(1000);134 mCamera->setFarClipDistance(1000); 127 135 // Set ambient light 128 136 mSceneMgr->setAmbientLight(ColourValue(1, 1, 1)); 129 137 130 138 // Skybox 131 mSceneMgr->setSkyBox(true, "Examples/MorningSkyBox" );139 mSceneMgr->setSkyBox(true, "Examples/MorningSkyBox", 10); 132 140 SceneNode* rootNode = mSceneMgr->getRootSceneNode(); 133 134 135 ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "GameTools/Big"); 136 pSys1->setKeepParticlesInLocalSpace(false); 137 SceneNode *pSysNode = rootNode->createChildSceneNode(); 138 pSysNode->attachObject(pSys1); 139 140 pSysNode->setPosition(0,1,0); 141 /* 142 141 142 /* 143 143 //init objects 144 144 Entity* kupola = mSceneMgr->createEntity("kupola", "kupola.mesh"); 145 Entity* head = mSceneMgr->createEntity("head", "ogrehead.mesh");146 145 147 146 //init nodes … … 152 151 kupolaNode->_updateBounds(); 153 152 MeshPtr kmesh = kupola->getMesh(); 154 kmesh->buildTangentVectors(0,1); 155 153 kmesh->buildTangentVectors(0,1);*/ 154 155 Entity* head = mSceneMgr->createEntity("head", "ogrehead.mesh"); 156 156 SceneNode* headNode = rootNode->createChildSceneNode("head"); 157 157 headNode->attachObject(head); 158 headNode->setScale(2,2,2);158 //headNode->setScale(0.5,0.5,0.5); 159 159 AxisAlignedBox bbox = head->getBoundingBox(); 160 headNode->setPosition(0, 100,0);160 headNode->setPosition(0,0,0); 161 161 headNode->_updateBounds(); 162 163 162 163 /*Entity* head2 = mSceneMgr->createEntity("head2", "ogrehead.mesh"); 164 SceneNode* headNode2 = rootNode->createChildSceneNode("head2"); 165 headNode2->attachObject(head2); 166 headNode2->setScale(2,2,2); 167 headNode2->setPosition(0, 0, 0);*/ 168 169 ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "GameTools/Big"); 170 pSys1->setKeepParticlesInLocalSpace(false); 171 SceneNode *pSysNode = rootNode->createChildSceneNode("psys1"); 172 pSysNode->attachObject(pSys1); 173 174 pSysNode->setPosition(0,0,0); 175 164 176 //Init lights 165 177 Light* mainLight = mSceneMgr->createLight("MainLight"); … … 168 180 mainLight->setSpecularColour(ColourValue::White); 169 181 mainLightNode = rootNode->createChildSceneNode(); 170 mainLightNode->setPosition(0, 150,0);182 mainLightNode->setPosition(0,500,0); 171 183 mainLight->setPosition(mainLightNode->getWorldPosition()); 172 184 mainLightNode->attachObject(mainLight); 173 */ 174 185 BillboardSet* bbs = mSceneMgr->createBillboardSet("bb", 1); 186 bbs->createBillboard(Vector3::ZERO, ColourValue::White); 187 bbs->setMaterialName("Flare"); 188 mainLightNode->attachObject(bbs); 189 190 // OgreIlluminationManager::getSingleton().createGlobalRun(ILLUMRUN_PHASE_TEXTURE); 191 // OgreIlluminationManager::getSingleton().updateGlobalRun(ILLUMRUN_PHASE_TEXTURE, 1); 192 // OgreIlluminationManager::getSingleton().savePhaseTextureToFile("phase.dds"); 175 193 176 194 OgreIlluminationManager::getSingleton().initTechniques(); … … 182 200 // This is where we instantiate our own frame listener 183 201 mFrameListener= new ParticleDemoFrameListener(mWindow, 184 mCamera );202 mCamera , mainLightNode); 185 203 mRoot->addFrameListener(mFrameListener); 186 204 -
GTP/trunk/App/Demos/Illum/Ogre/src/HierarchicalSystem/scripts/HierarchicalSystem.vcproj
r1340 r1423 36 36 Name="VCLinkerTool" 37 37 AdditionalDependencies="OgreMain_d.lib IllumModule_Ogre.lib IllumModule.lib" 38 OutputFile="$(OutDir)/ GameToolsParticleDemo.exe"38 OutputFile="$(OutDir)/HPSDemo.exe" 39 39 LinkIncremental="2" 40 40 AdditionalLibraryDirectories="..\..\..\..\..\..\..\Lib\Illum\IllumModule\OgreIllumModule\bin\Debug;"$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)";..\..\..\..\..\..\..\Lib\Illum\IllumModule\IllumModule\bin\Debug" … … 102 102 Name="VCLinkerTool" 103 103 AdditionalDependencies="OgreMain.lib IllumModule_Ogre.lib IllumModule.lib" 104 OutputFile="$(OutDir)/HPS .exe"104 OutputFile="$(OutDir)/HPSDemo.exe" 105 105 LinkIncremental="1" 106 106 AdditionalLibraryDirectories="..\..\..\..\..\..\..\Lib\Illum\IllumModule\OgreIllumModule\bin\Release;"$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)";..\..\..\..\..\..\..\Lib\Illum\IllumModule\IllumModule\bin\Release" … … 164 164 </File> 165 165 <File 166 RelativePath="..\..\..\Media\materials\programs\GameTools_HPS_Smoke_L_Depth.hlsl"> 167 </File> 168 <File 166 169 RelativePath="..\..\..\Media\materials\programs\GameTools_HPS_Smoke_S.hlsl"> 170 </File> 171 <File 172 RelativePath="..\..\..\Media\materials\programs\GameTools_Smoke_IllumVolume.hlsl"> 167 173 </File> 168 174 <File
Note: See TracChangeset
for help on using the changeset viewer.