OSM reader for NxOgre?

jchmack

08-01-2007 04:05:04

Im just wondering if there is a way to read OSM files (like the ones generated by ofusion) into NxOgre. I know that i can just use ogre to read in the meshes but the NxOgre objects wont interact with objects loaded this way. Before i edit the ogre osm reader im just asking if there is one that has been done already =).

DaCracker

08-01-2007 10:35:52

Sure you can, just comment out (or remove) the code in
the method that creates the entities and and something
like:

nxOgre::body *b = mScene->createStaticBody(<params>);

It requires some other small fixes as well. It's a good idea
to send which scene that is going to create the bodies if you
use multiple scenes. But it's only a matter of a few changes
in the parameters for some methods :)

jchmack

08-01-2007 11:00:36

Sure you can, just comment out (or remove) the code in
the method that creates the entities and and something
like:

nxOgre::body *b = mScene->createStaticBody(<params>);

It requires some other small fixes as well. It's a good idea
to send which scene that is going to create the bodies if you
use multiple scenes. But it's only a matter of a few changes
in the parameters for some methods :)


Ya it looks like this is going to be my plan. Thx for the tips

betajaen

08-01-2007 11:09:23

Can't you just do:

mScene->createStaticBody(osmNode->getName(), "", new meshShape(osmEntity->getName(),mSceneMgr), params<rigidbody>("node:" + osmNode->getName()));


That shouldn't require any code changes to NxOgre, and it'll use the node that the OSM reader created rather than using it's own.

bens1404

01-01-2008 14:44:07

Can't you just do:

mScene->createStaticBody(osmNode->getName(), "", new meshShape(osmEntity->getName(),mSceneMgr), params<rigidbody>("node:" + osmNode->getName()));


That shouldn't require any code changes to NxOgre, and it'll use the node that the OSM reader created rather than using it's own.


but where is this function i dont found it

betajaen

01-01-2008 15:24:25

It's theoretical code, which allowed the OSM reader to setup the required nodes and entities, then some code which involves that snippet to create the NxOgre stuff.

In short, it doesn't exist.

bens1404

01-01-2008 17:25:25

It's theoretical code, which allowed the OSM reader to setup the required nodes and entities, then some code which involves that snippet to create the NxOgre stuff.

In short, it doesn't exist.


ok thanks

blinkassassin

29-01-2008 04:22:53

Hey guys, is the createStaticBody method depreicated ?

betajaen

29-01-2008 09:21:02

Yes. Just make the Actor params with no mass and no density for a static actor.