more things:
I'd like to have an interface for newtonFPS so I can modify it without having to change your script.
Also I have added two useful functions, maybe you want to include them in the wrapper:
NewtonJoint* newton_getjoint(ENTITY* entBody)
{
NewtonJoint* psJoint = NULL;
if (entBody->skill98 != 0)
{
psJoint = entBody->skill98;
}
return psJoint;
}
NewtonBody* newton_getbody(ENTITY* entBody)
{
NewtonBody* psBody = NULL;
if (entBody->skill99 != 0)
{
psBody = entBody->skill99;
}
return psBody;
}
I store the joint pointer in skill98 of the object.
Next thing:
newton_materials_init() should not be included in newton_start() as it seems to be a definition for special physics samples.
Quant2meter and meter2quant should already be included in newton_main.c like this:
#ifndef QUANTTOMETER
#define QUANTTOMETER (float)0.03125
#endif
#ifndef METERTOQUANT
#define METERTOQUANT (float)32
#endif
This allows redefining them before inclusion of the wrapper in the own project
I also added this simple thing to newton_main.c:
NewtonWorld* nworld = NULL;
NewtonWorld* newton_getworld()
{
return nworld;
}
Now nworld doesn't have to be defined in own scripts. If it's needed, it can be retrieved via this access function.
The goal of all my requests: I can just drop the latest release in my project folder, without having to adjust a single line
Maybe you want to include some of this stuff in the next version of the wrapper.
Thanks for reading