Changeset 60 for code/branches/tutorial/Tutorial
- Timestamp:
- Oct 17, 2007, 2:45:31 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutorial/Tutorial/src/main.cpp
r57 r60 15 15 // add tutorial code here: 16 16 // ... 17 17 lightNode->translate(Vector3(0, -10 * evt.timeSinceLastFrame, 0)); 18 18 19 return ExampleFrameListener::frameStarted(evt); 19 20 } … … 47 48 // add tutorial code here: 48 49 // ... 50 mSceneMgr->setAmbientLight( ColourValue( 0.3, 0.3, 0.3 ) ); 51 Entity* head = mSceneMgr->createEntity("head", "ogrehead.mesh"); 52 SceneNode *node = mSceneMgr->getRootSceneNode()->createChildSceneNode( "OgreHeadNode", Vector3( 0, 0, 0 ) ); 53 node->attachObject( head ); 49 54 55 mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox"); 56 57 Light *light = mSceneMgr->createLight("Light1"); 58 light->setType(Light::LT_POINT); 59 light->setPosition(Vector3(0, 100, 0)); 60 light->setDiffuseColour(1.0, 0.0, 0.0); 61 light->setSpecularColour(1.0, 0.0, 0.0); 62 63 BillboardSet *bbs = mSceneMgr->createBillboardSet("bb", 1); 64 bbs->createBillboard(Vector3::ZERO, ColourValue(1.0, 0.0, 0.0)); 65 bbs->setMaterialName("Examples/Flare"); 66 67 lightNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("LightNode", Vector3(0, 100, 0)); 68 lightNode->attachObject(bbs); 69 lightNode->attachObject(light); 70 light->setPosition(0.0, 0.0, 0.0); 50 71 } 51 72
Note: See TracChangeset
for help on using the changeset viewer.