Newton Module (2-22-7)

BlitzMax Forums/BlitzMax Programming/Newton Module (2-22-7)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Because I'm quite new here with Bmax, there is no need to re-program the functions which come with the Newton examples? eg. I started converting the functions that come with the tutorials for Newton, like this:
Function PhysicsApplyGravityForce(Body:Byte Ptr)
	Local mass:Float
	Local Ixx:Float
	Local Iyy:Float
	Local Izz:Float
	
'	NewtonBodyGetMassMatrix (body, &mass, &Ixx, &Iyy, &Izz);
	NewtonBodyGetMassMatrix(body, Varptr mass, Varptr Ixx, Varptr Iyy, Varptr Izz)

'	dVector force (0.0f, -mass * 9.8f, 0.0f);
	Local force:Float[] = [0.0, Varptr mass * GRAVITY, 0.0]
	NewtonBodySetForce (body, Varptr force[0])
	
End Function


But infact all I need to do is what you've done, type Global NewtonApplyGravityForce(Body:Byte Ptr), that's it? Or am I missing something here?