Felipe
19-08-2007 03:29:49
my code:
#include "Ogre.h"
#include "NxOgre.h"
#include "Cake.h"
using namespace NxOgre;
using namespace Ogre;
using namespace std;
class Sponge_Cake : public Cake {
public:
World* mWorld;
Scene* mScene;
void start() {
mWorld = new World("log: html");
mScene = mWorld->createScene("Main", mSceneMgr, "gravity: yes, floor: yes");
mSceneMgr->setAmbientLight(ColourValue(1, 1, 1));
mScene->createBody("cube.1m.mesh", new CubeShape(1), Vector3(0,2.5f,0), "mass: 10");
mScene->createActor("terrain",new NxOgre::TerrainShape("terrain.png", 100, "mesh-scale: 2 1 2"),Vector3::ZERO,"static: yes");
}
//////////////////////////////////////////////////////////////////////////////////////////////////
void stop() {
delete mWorld;
}
//////////////////////////////////////////////////////////////////////////////////////////////////
void onFrame(float deltaTime) {
// Want a key pressed?
//
// if (mInputHandler->isKeyDown(Action::OPTION_1)) {
// ...
// }
//
// Search the solution for "#KEYCONFIG" to find the key configuration.
}
//////////////////////////////////////////////////////////////////////////////////////////////////
BakeMyCake();
};
Hey_Cut_Me_Slice_Of(Sponge_Cake)
#include "Ogre.h"
#include "NxOgre.h"
#include "Cake.h"
using namespace NxOgre;
using namespace Ogre;
using namespace std;
class Sponge_Cake : public Cake {
public:
World* mWorld;
Scene* mScene;
void start() {
mWorld = new World("log: html");
mScene = mWorld->createScene("Main", mSceneMgr, "gravity: yes, floor: yes");
mSceneMgr->setAmbientLight(ColourValue(1, 1, 1));
mScene->createBody("cube.1m.mesh", new CubeShape(1), Vector3(0,2.5f,0), "mass: 10");
mScene->createActor("terrain",new NxOgre::TerrainShape("terrain.png", 100, "mesh-scale: 2 1 2"),Vector3::ZERO,"static: yes");
}
//////////////////////////////////////////////////////////////////////////////////////////////////
void stop() {
delete mWorld;
}
//////////////////////////////////////////////////////////////////////////////////////////////////
void onFrame(float deltaTime) {
// Want a key pressed?
//
// if (mInputHandler->isKeyDown(Action::OPTION_1)) {
// ...
// }
//
// Search the solution for "#KEYCONFIG" to find the key configuration.
}
//////////////////////////////////////////////////////////////////////////////////////////////////
BakeMyCake();
};
Hey_Cut_Me_Slice_Of(Sponge_Cake)