Page 1 of 1

Newton

Posted: Fri Apr 08, 2005 1:59 pm
by Guest
Hi,

im working with DevC unter m$.

i"ve downloaded NewtonSDK and the samples ....

But also the look on the samples dont help we in mt question how to combine newton with irrlicht in devC. IS there any tutorial how to combine them , so that i can recompile the samples ?


greez
fidel

Posted: Fri Apr 08, 2005 5:47 pm
by steveybop
There is the Mercior tutorial, it is in the tutorial section, on Irrlicht homepage

http://www.mercior.com/tut-newton.shtml

I am also working on an irrlicht/newton integrated program and have had many teething problems (due too my newbie status, not cuz integration is difficult) any problems you'll have, i probably had too!!

Here is a really quick rundown of how the engines work together, hope it helps :D :

//This is QUITE OBVIOUSLY pseudocode
create Irrlicht device
create Newton World

//Steps taken when loading a mesh
//Irlicht steps
1. getMesh
2. addSceneNode for it
3. add Texture

//Newton steps
4. create NewtonBox (or sphere etc depending on shape of mesh)
//This box is the newton collision primative, its the bounding box for the mesh collisions
5. createNewtonBody //this add the collision box to the newton world (i think!?!)
6. NewtonBodySetUserData //add Newton data to Irr Scenenode
7. NewtonBodySetMassMatrix //does exactly what it says

Okay this should at least get you to a running start, use these steps (as illustrated in the Mercior Tutorial) and you'll have boxes bouncing all over the place in no time. These steps illustrate the most basic, barebones steps needed to get the two engines working together.
Incidently, if anybody out there can explain the scale issue in relation to Irrlicht and newton id be grateful, why is there a difference and does it have to be taken into account!!