Changeset 10
- Timestamp:
- Oct 10, 2007, 12:16:59 AM (17 years ago)
- Location:
- code/branches/tutorial/Tutorial
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutorial/Tutorial/main.cpp
r4 r10 13 13 bool frameStarted(const FrameEvent &evt) 14 14 { 15 lightNode->translate( Vector3(0, -10 * evt.timeSinceLastFrame, 0) ); 15 // add tutorial code here: 16 // ... 16 17 17 18 return ExampleFrameListener::frameStarted(evt); … … 44 45 void createScene(void) 45 46 { 46 // add tutorial code here 47 mSceneMgr->setAmbientLight( ColourValue( 0.3, 0.3, 0.3 ) ); 48 Entity* head = mSceneMgr->createEntity("head", "ogrehead.mesh"); 49 SceneNode *node = mSceneMgr->getRootSceneNode()->createChildSceneNode( "OgreHeadNode", Vector3( 0, 0, 0 ) ); 50 node->attachObject( head ); 51 mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox"); 47 // add tutorial code here: 48 // ... 52 49 53 Light *light = mSceneMgr->createLight("Light1");54 light->setType(Light::LT_POINT);55 light->setPosition(Vector3(0, -100, 0));56 light->setDiffuseColour(1.0, 0.0, 0.0);57 light->setSpecularColour(1.0, 0.0, 0.0);58 59 BillboardSet *bbs = mSceneMgr->createBillboardSet("bb", 1);60 bbs->createBillboard(Vector3::ZERO, ColourValue(1.0, 0.0, 0.0));61 bbs->setMaterialName("Examples/Flare");62 lightNode = mSceneMgr->getRootSceneNode()->createChildSceneNode( "LightNode", Vector3(0, 100, 0) );63 lightNode->attachObject(bbs);64 lightNode->attachObject(light);65 light->setPosition(0.0, 0.0, 0.0);66 50 } 67 51
Note: See TracChangeset
for help on using the changeset viewer.