generic class for bodies

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

generic class for bodies

Postby blackbird_dream » Mon Oct 21, 2019 11:46 am

Hi friends,
I'm looking for a basic class for a body with all stuffs to update the opengl geometry.
I found this thread : http://newtondynamics.com/forum/viewtopic.php?f=9&t=1102
Is it up2date with regard to the last versions ?
A real snippet in C++ would be appreciated also as I'm so lousy in OOP.
Many thks
User avatar
blackbird_dream
 
Posts: 279
Joined: Wed Jun 07, 2006 3:08 pm
Location: Italy

Re: generic class for bodies

Postby Julio Jerez » Mon Oct 21, 2019 1:53 pm

if you look at the newton unity plugin, you will see that the base classes for the plugin are folder named wrapperSdk, there the classes go by the names
dNewtonBody, dNetwonJoint, dNewtonCollision.h so on and so for.

These files where copied form the library dNewton from the SDK.
for some reason that I do nor remember now, Sweenie and I decided to copy them
instead of using them for the SDK like we use the core engine.

If you are going to use the engine as native cpp, them my recommendation if for you use the dNewton library, this is a CPP interface that we know has been tested with a plugin that you are already familiar with.
It does not wraps all the low level core functionality but it is easy to extend it as you move on.

I hope this point you on the right direction.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: generic class for bodies

Postby blackbird_dream » Tue Oct 22, 2019 3:23 am

Thks Julio.
User avatar
blackbird_dream
 
Posts: 279
Joined: Wed Jun 07, 2006 3:08 pm
Location: Italy

Re: generic class for bodies

Postby Dave Gravel » Sat Oct 26, 2019 5:54 am

I have write a quick tutorial with VS2017.
I'm not a CPP expert but I wish it can help you to start something good.
If you need to update the project for VS2019, You need to rebuild all libs and all dll's.
I have add all requested lib's sdk for the tuto in the zip file.
I have try to add the most important features for begin with newton.
The object system is not so good but it give a good idea about what you can do.

Video:
https://www.youtube.com/watch?v=BWc866fOSiU

DOWNLOAD Tutorial:
https://www.mediafire.com/file/lz5lyn5l5oe8vw7/DG_Tutorial_Newton_GL_VS2017CPP.zip
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://www.facebook.com/dave.gravel1
http://orionx3d.googlepages.com/
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 713
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: generic class for bodies

Postby blackbird_dream » Sat Oct 26, 2019 2:32 pm

Gorgeous !
Many thks Dave. I'll have an in-depth look at it.
Last edited by blackbird_dream on Tue Nov 12, 2019 4:23 am, edited 2 times in total.
User avatar
blackbird_dream
 
Posts: 279
Joined: Wed Jun 07, 2006 3:08 pm
Location: Italy

Re: generic class for bodies

Postby Dave Gravel » Sun Nov 03, 2019 6:30 pm

I have receive resquest for the VS 2019 version.
Here the 2019 version:
DOWNLOAD Tutorial:
https://www.mediafire.com/file/5en6z0u20wffxps/DG_Tutorial_Newton_GL_VS2019CPP.zip
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://www.facebook.com/dave.gravel1
http://orionx3d.googlepages.com/
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 713
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests