Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 60 for code/branches/tutorial


Ignore:
Timestamp:
Oct 17, 2007, 2:45:31 PM (17 years ago)
Author:
landauf
Message:

muloe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tutorial/Tutorial/src/main.cpp

    r57 r60  
    1515        // add tutorial code here:
    1616        // ...
    17 
     17            lightNode->translate(Vector3(0, -10 * evt.timeSinceLastFrame, 0));
     18           
    1819        return ExampleFrameListener::frameStarted(evt);
    1920    }
     
    4748        // add tutorial code here:
    4849        // ...
     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 );
    4954
     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);
    5071    }
    5172
Note: See TracChangeset for help on using the changeset viewer.