Hi,
I have a couple of questions regarding Newton Dynamics. We have our own vehicle model for which several new requirements (mainly joints and increased stability) make it preferable to incorporate an existing physics engine. Accuracy and stability valued above performance. To be able to (easily) integrate Newton (or any other engine) we need the following:
1. Double precision support (related to large worlds): This should be present in Newton, however according to some old posts it may not be complete/functional or even buildable. Enabling the option in cmake builds fine however, and the demos application runs fine as well. However, even if the appropriate define _NEWTON_USE_DOUBLE is declared in the using project there still seem to be places where a dFloat is a float instead of a double. Declaring _NEWTON_USE_DOUBLE in the newton CMakeLists.txt and recompiling *seems* to fix this..
2. Step the simulation a certain amount of time: Call NewtonUpdate ()
3. For a rigid body query position: Call NewtonBodyGetPosition or NewtonBodyGetMatrix
4. For a rigid body query orientation: Call NewtonBodyGetRotation or NewtonBodyGetMatrix
5. For a rigid body query linear velocity: Call NewtonBodyGetVelocity
6. For a rigid body query linear acceleration: No function present?
7. For a rigid body query angular velocity: Call NewtonBodyGetOmega
8. For a rigid body query anguler acceleration: No function present?
9. Multiple times between simulations steps, add a force at a position (force may generate resulting torque): Callback mechanism is inconvenient here, but could be worked around by storing a list of forces to sum in the callback. For NewtonBodyAddForce() the manual lists: "This function is only effective when called from NewtonApplyForceAndTorque callback". Why is this the case? Why couldn't one simply call this function a number of times adding forces before calling NewtonUpdate?
10. (Re)set the simulation to a certain old or new state (ie. repositioning of vehicle).
11. Dynamic joint deletion and creation between existing rigidbodies.
12. Live changing of parameters (mass, stiffness, etc).
So at first glance most of the basics seem ok except for 6 and 8. Is it really not possible to query accellerations for a rigidbody? Note that for our application simply deriving them from velocities is a nogo.
For 10 - 12 I have not been able yet to glean enough information from the manual.
Thanks!
Esger