OgreNewt 0.3 with Newton 2.0


14-01-2009 22:55:42

I needed the last version from newton 2.0 and so I downloaded the latest OgreNewt version from walaber and modified them to work with Beta 18 from Newton.
And now I want to share my work with you.

- I have created a class CollisionSerializer, with them you can serialize each Collision not onyl TreeCollision
- added CollisionUpdate() to OgreNewt::World, this function can be used if you want to use OgreNewt only for Collision detection
- added enum CollisionPrimitive, this enum has all primitives and with the function getCollisionPrimitiveType() from OgreNewt::Collision you can get the primitivetype
- added setRayCastCallbackactive() to TreeCollision or use the bool in the Constructor, this can be used to enable the RayCastCallback and you get each intersection with the TreeCollision with a RayCast
- and some little other fixes

Here you can download this version. I hope I can help you with this.

- little Fix in CollisionSerializer

- this version works with the new public Beta from Newton, 28.1.2008
- some fixes with the getPrimitiveType() from OgreNewt::Collision
- Body has 2 new functions getCollisionPrimitiveType() and getNewtonCollision()
- some fixes for teh function TreeCollision::setRayCastCallbackactive()



15-01-2009 21:18:17

Hi Zero23,

I tried your version of OgreNewt. With respect to the following code in OgreNewt_CollisionSerializer.cpp:

void CollisionSerializer::exportCollision(const Collision* collision, const Ogre::String& filename)
NewtonCollisionSerialize(collision->m_col, &CollisionSerializer::_newtonSerializeCallback, this);

VC9 gives me the following error:

1>e:\dev\xp\newton2\ogrenewt\ogrenewt_main\src\ogrenewt_collisionserializer.cpp(27) : error C2660: 'NewtonCollisionSerialize' : function does not take 3 arguments

Any suggestions?



15-01-2009 22:46:00

Do you use the Newton 2.0 Beta 18?
Because I can compile that ...

Here are the links to the Beta:
http://www.newtondynamics.com/downloads ... n-2.00.rar Windows 32 Bit/64 Bit
http://www.newtondynamics.com/downloads ... c-2.00.zip Mac
http://www.newtondynamics.com/downloads ... .00.tar.gz Linux 32 Bit
http://www.newtondynamics.com/downloads ... .00.tar.gz Linux 64 Bit



20-01-2009 20:51:42

Thanks Zero. I used your code and got the same problem. To compile your code i had to replace in file OgreNewt_CollisionSerializer.cpp

NewtonCollisionSerialize(collision->m_col, &CollisionSerializer::_newtonSerializeCallback, this);


NewtonCollisionSerialize(collision->getWorld()->getNewtonWorld(), collision->m_col, &CollisionSerializer::_newtonSerializeCallback, this);

I have compiled demos 1, 2, 3, 7 & 8. Have you any joy with demo 4 (raycasting), demo 5 (vehicle - i know newton code has changed significantly) and demo6 (simplebuoyancy).



21-01-2009 15:16:50

I dont know!
Do you really use the newest Beta from Newton?

No sorry i dont tried any demos, may I will do this!

At the next time I will upload a new version, i made some fixes in my new added functions :D



22-01-2009 08:11:29

Hi Zero

Good to hear you are making progress here. Was wondering if you have worked on any vehicle examples using Newton 2 / Ogre 1.6 and would like to share? I'm keen to get a vehicle demo running using this setup, but am sure how to modify OgreNewt to do this. The current Vehicle class is no longer compatible and a new approach is required - finding the time to do this is a major challenge for me :)

Any updates, greatly appreciated.




28-01-2009 15:02:38

New version! See first post!



02-02-2009 00:32:21


I've also written an own version of OgreNewt for newton2.0. I've had a look at zeros version (nice :) )and implemented some of his changes, too. You can download
the code from http://svn.berlios.de/svnroot/repos/dsa-hl/dependencies/OgreNewt_ngt.
I did only test the features we are using in our project (thttp://www.rastullahs-lockenpracht.de/), some comments about my changes can be found
in OgreNewt.h, there are some other additional features implemented such as convexcasts and ray-/convexcastdebugging...

I'm using linux with cmake (> 2.6.2), the Visual-Studio project files are probably not up to date :).


08-02-2009 05:06:01

Any chance one of you guys can get permission to maintain OgreNewt so we can these changes folded into CVS and officially maintained? Or maybe the official maintainer is still around and could do that.


08-02-2009 12:49:14

I will take care of that... I'll probably add my code as a branch to the ogreaddons, but I wanted to talk to walaber first!


08-02-2009 21:55:58

I emailed Walaber and indicated there were various versions of Ogrenewt starting to take form. From my perspective things are starting to get confusing, what with different versions, subtle changes etc. Would be good to get this all centrally maintained, especially with the new vehicle joint addons coming to Newton very shortly....

It would be good to see the ogrenewt samples compilable as well.

Ive managed to get demos 1, 2, 3, 7 & 8 compiled after some tweaking.
Demos 4 & 6 compile for me but crash! i've no idea why or what in the code is causing the issue.
Demo 5 (Simple vehicle) does not compile as the vehicle stuff has not been incorporated into Newton 2.

I'm using:
Ogre3d 1.6.1
Newton 2 (post beta 19version)
Ogrenewt (various hacks of postings/downloads).

OS: XP, Compiler VS 2008.




09-02-2009 16:26:46

Hi CoolDude71,

Use the Code from melven. He integrated the most of my changes to his version. So I think you can use this version :)



26-03-2009 17:49:26

The links of the third post are dead.
Can you update them, please?

Here are the current Newton links:
http://www.newtondynamics.com/forum/vie ... f=9&t=4922


26-03-2009 18:06:50

K, I have updated them ;)



01-04-2009 15:44:42

download limit of ogrenewt on rapidshare reached, can you reupload please?


01-04-2009 17:39:33

Here do you find everytime the newest version of OgreNewt at the moment!
http://svn.ogre3d.org/svnroot/ogreaddon ... t/newton20