betajaen
10-03-2007 21:45:00
Like current version of NxOgre is a rewrite of 0.3.5, NxOgre 0.9 is a rewrite of 0.6. A lot of things have changed and improved, and here is a few I would like to show you now.
Windows and Linux Support
NxOgre 0.9, supports Windows and Linux out of the box. Both of them come with Visual Studio and CodeBlock projects, and compile using the same code.
Cleaner and more standard code
Every class name is capitalised now; world -> World, body -> Body. Every argument of every method is carefully thought out, I use "const NxString&" like it is oxygen.
Every class that needs storage of another class, uses a global wide template called "container", it can store everything in any way you like.
Parameters everywhere
The parameters class is a little under used in current versions of NxOgre 0.6, in NxOgre 0.9 it used from PhysXDriver, to World, to Scene, to ShapeDescription, to Actor.
Parameters can convert string values directly, so you can do this:
"node: myNode, offset: 3 3 2"
Instead of:
params<actor> p;
p.node = "myNode";
p.offset = Vector3(3,3,2);
Faster compile time
It takes about a minute to compile NxOgre in Ubuntu, and 90 seconds in Visual Studio. If that is too long, I want to implement pre-compiled headers.
Actor class
The Actor class is a completely wrapped class of the NxActor class, with every function wrapped completely. It doesn't use a SceneNode so it is invisible, but it is a complete base for Body, Trigger and many others.
In fact the total Body code is only 90 lines, and most of that is empty ones.
State System overhauled
The state system is being completely redesigned, a state will be an actual class with code rather than being a number. Of course everything that is possible will use it.
Shape System overhauled
The SVN of 0.6 took the brunt of it, but I've taken it a little further. You now have CubeShape and Cube. You can directly adjust the Shape at run time. I'm even playing with the idea of moving shapes across Actors.
Names are optional
Names are completely optional now. Don't want one, don't use it. NxOgre will make one up for you.
And much more
The creation of it is slow at the moment, I'm rewriting almost a years worth of work. But since I have grunt stuff already completed, and I have a full completed library to work from. I'm expecting between May-June for a NxOgre 1.0 release.
Meanwhile, in a few days. I'll post a link to the SVN of NxOgre 0.9, where we can all test and play with it together. It's not for the faint hearted, or the newbies but for the hardcore users.
But for now, you can look at the "101" code. In three lines:
World* mWorld = new World();
Scene* mScene = mWorld->createScene("Main", mSceneMgr, "gravity: yes, floor: yes");
Body* mBody = mScene->createBody("cube.1m.mesh", new CubeShape(1,1,1), Vector3(0,10.25f,0), "Mass: 100");