OgreDotNet + GangstaDotNet+ Newton

oparidae

16-08-2006 13:29:22

Hello there, This monday I started Getting the tools ready for my next project, an AI virtual car driver. After some battles I know have ogredotnet working allright but the physics are killing me.
Could anyone post a simple code with the configuration of a physics body under gangstadotnet? Tks

What's the C# equivalent of

static_cast<Entity*>(body->getUserObject().cast<SceneNode>()->getAttachedObject(0))->setMaterialName("Gangsta/Ogre/Demo/ODE");

pepote

16-08-2006 16:09:04

I think is:

Entity static_cast(body.getUserObject(),SceneNode cast().getAttachedObject(0)).setMaterialName("Gangsta/Ogre/Demo/ODE");

oparidae

17-08-2006 10:08:58

static_cast is exclusive to C++, in C# the equivalente is as

oparidae

18-08-2006 14:07:27

ok.. can't anyone shed a light on this subject? I have no experience in creating wrappers, so I can't really use Newton in other way.

dcarapic

22-08-2006 13:46:56

Hello there, This monday I started Getting the tools ready for my next project, an AI virtual car driver. After some battles I know have ogredotnet working allright but the physics are killing me.
Could anyone post a simple code with the configuration of a physics body under gangstadotnet? Tks

What's the C# equivalent of

static_cast<Entity*>(body->getUserObject().cast<SceneNode>()->getAttachedObject(0))->setMaterialName("Gangsta/Ogre/Demo/ODE");


Hi,
I am not familir with the Ogre, but my guess would be that in C# it would be something like this:

SceneNode sceneNode;
Entity entity;
sceneNode = (SceneNode)body.getUserObject();
entity = (Entity)sceneNode .getAttachedObject(0);
entity.setMaterialName("Gangsta/Ogre/Demo/ODE")