Time for action — preparing a scene

We will use a slightly different version of the scene from the previous chapter:

  1. Delete all code in the createScene() and the createCamera() functions.
  2. Delete the createViewports() function.
  3. Add a new member variable to the class. This member variable is a pointer to a scene node:
    private:
    Ogre::SceneNode* _SinbadNode;
    
  4. Create a plane and add it to the scene using the createScene() method:
    Ogre::Plane plane(Vector3::UNIT_Y, -10); Ogre::MeshManager::getSingleton().createPlane("plane", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, plane, 1500,1500,200,200,true,1,5,5,Vector3::UNIT_Z); Ogre::Entity* ent = mSceneMgr->createEntity("LightPlaneEntity", "plane"); mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); ...

Get Ogre 3D 1.7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.