MADEAPPS / newton-dynamics

Newton Dynamics is an integrated solution for real time simulation of physics environments.
http://www.newtondynamics.com
Other
938 stars 182 forks source link

Fix pointer cast warnings on 64-bit *nix #191

Closed newbthenewbd closed 4 years ago

newbthenewbd commented 4 years ago

Hi,

Having recently discovered the Newton Dynamics library, I'd like to start by saying... Thank You.

Imagine being me, needing a specific, accurate kind of a physics engine, knowing that I need such an engine... And trying to harness Bullet. And, of course, miserably failing. Stationary blocks exploded, intercontinental ballistic missiles went through the continents they were supposed to hit. And the API supposed to patch all that up was unclear.

Imagine learning that PhysX recently went open source, bringing with that release more accurate physics. And searching how to use it, horrified by the EULA, weird arbitrary limitations, code bloat...

Imagine then stumbling upon a heated discussion on whether PhysX is a better engine, or Newton.

And imagine finding out that Newton Dynamics - something I had never heard of before - is a thing, is a truly free SDK and is better. I needed a lot to believe. And received.

So... Thank You. Thank You for making Newton Dynamics. Thank You for maintaining it. Thank You for fighting for its recognition. Thank You!!!

Following this obligatory preamble, I'd like to submit a small pull request that aims to fix the compilation warnings that currently appear when a 64-bit build of Newton core is made on *nixes, owing to the varying pointer sizes between 32- and 64-bit architectures.

P.S. Not exactly worthy of a separate pull request or issue, but wouldn't it be better if the demo sandbox opened a stable scene on launch, like Using the newton mesh tool? Baffled me for a while as to why it segfaults, until I found in the code that it tries to load the WIP vehicles by default... :)

newbthenewbd commented 4 years ago

Whoa, that's a fast merge. Thanks!

JulioJerez commented 4 years ago

No sure why, my first reply seemed to show twice, and when I click delete one, they both disappeared. But yes the pull request was applied. thank you.

on the last comment yes sometime this happens, but that because the engine maintenance is very informal. The bets thing to do if you get a problem is ask and some usually answer quickly

newbthenewbd commented 4 years ago

Got the original one via mail:

oh thank for that, the atomics has been a proble for a while, because Newton predate C++11 at some point I will replace all those with C++ 11 features and make min spec c++11 or better.

ther are some users who still use newton in C so this is why there are different version of the same functions. anyway thank for the pull request.

Of the last request, yes you are right, but this is very informal. yo uwill find demos tha fail and some that don't, because must demos are the result of some use request of some experiment I was conducting. It is not a rigorous exercise on presentation. when this happen the best thing is just ask and me or some expert user can provide an answer usually very quickly.

...and now, I'm interested how to run the latest Newton in C, not that some minimal C++ for awesome physics would be a problem :smile:

The quick, informal pace at which the engine is developed is actually admirable, it's not like I'd end up running on the master branch if quirks weren't benefactory in figuring it out!