...And Scene!
shortguide
Now we meet the Scene class. Your application can have many of them, each infinite in size. A Scene is tied up to a SceneRenderer for things to be rendered to, and a SceneController to control how long time has passed since the last time event.
Scene* mScene = mWorld->createScene("myFirstScene");
All Scenes are created by the World (World::createScene). You may keep a pointer to each Scene, but it isn’t necessary for deletion as World always keeps a copy for you. When you destroy a Scene (mWorld->destroyScene(mScene)) all of the contents within it are destroyed as well.
When you create a Scene it can have two things; a name and some optional params. The name is important. Not only because it tells Scenes apart for your ease, but it makes creating nametags so much easier at World’s annual christmas party.
SceneParams define the basics of the Scene; Does it have gravity or not? Does it have an a drab, gray floor of infinite size? Does it prefer the manly colour Blue or a Girly Pink? These things are important, as any interior decorator would gladly tell you. Like all params they may be passed to a scene as a String or via the SceneParams class.
Colour coordination aside, "gravity:" and "floor" are the most important parameters of any scene. Combinations of this may produce a land full of buildings too tall for even Superman to leap, or a vast emptyness of space wherein villainous space pirates rob from the rich and the poor, keeping it all for themselves. Arrr. Or you could be a heartless bastard of a God and provide gravity but not a floor, letting your minions fall for eternity whilst you laugh at their stupidity. Ha-ha-ha!!
"gravity: yes, floor: yes"
"gravity: no, floor: no"
"gravity: 0 -9.788 0, floor: no"
Bringing it together
If you bothered to read the last chapter, you would find out my favorite animal is a striped tabby cat. And if you really bothered to read the last chapter, you’d know that I didn’t mention cats and that I would never consider cats as animals at all. But forget about cats, and instead focus on the World creation code which we learned – cat-free – in the last chapter. Let’s combine that with some Scene genesis and cook us up some physics, then armageddon it all. Just because we can. Notice "time-controller", which I mentioned earlier in this lesson.
World* mWorld = new World("time-controller: ogre");
Scene* mScene = mWorld->createScene("myFirstScene", "gravity: yes, floor: yes");
...
delete mWorld;
Well that seemed a little limp on the content side, didn’t it? I know that you’re thinking, “three lines can’t do too much, right?” Well you’re wrong, you’re wronger than wrong. In fact, if you were any wronger, you’d be right. So it’s a good thing you’re not, because you’re definitely wrong. Confused yet? Let me explain what these lines do. In these few lines, we have started up the PhysX libraries and created and initalised the World. We also created a brand new Scene, which in turn creates new materials, groups and lots of other things for future use. With "floor: yes" and "gravity: yes" a floor is created and some gravity turned on. Finally it’s all destroyed in one fell swoop of a delete operator. Much faster than you could do it, even if you felt the need to test the capabilities of your new battlestation.

As there is nothing inside of our World right now, save a really large lonely floor who will most probably go insane due to the amount of boredom it will reach, or perhaps curse at you for ending it’s life. Now seems the appropriate time to move on, and create a couple of Actors to keep him company.