#include <newton.mod/dynamics.mod/.bmx/dynamics.bmx.release.win32.x64.h>
struct BBDebugScope_18{int kind; const char *name; BBDebugDecl decls[19]; };
struct BBDebugScope_19{int kind; const char *name; BBDebugDecl decls[20]; };
struct BBDebugScope_27{int kind; const char *name; BBDebugDecl decls[28]; };
struct BBDebugScope_3{int kind; const char *name; BBDebugDecl decls[4]; };
struct BBDebugScope_4{int kind; const char *name; BBDebugDecl decls[5]; };
struct BBDebugScope_42{int kind; const char *name; BBDebugDecl decls[43]; };
struct BBDebugScope_6{int kind; const char *name; BBDebugDecl decls[7]; };
void _newton_dynamics_TNWorld_New(struct newton_dynamics_TNWorld_obj* o) {
	bbObjectCtor(o);
	o->clas = (BBClass*)&newton_dynamics_TNWorld;
	o->_newton_dynamics_tnworld_worldptr = 0;
}
struct newton_dynamics_TNWorld_obj* newton_dynamics_TNWorld_Create_TTNWorld(){
	struct newton_dynamics_TNWorld_obj* volatile bbt_this=bbObjectAtomicNew(&newton_dynamics_TNWorld);
	bbt_this->_newton_dynamics_tnworld_worldptr =bmx_newtondynamics_NewtonCreate(bbt_this);
	return bbt_this;
}
struct newton_dynamics_TNBody_obj* _newton_dynamics_TNWorld_CreateDynamicBody_TTNCollisionTTNMatrixTTNBody(struct newton_dynamics_TNWorld_obj* o,struct newton_dynamics_TNCollision_obj* bbt_collision,struct newton_dynamics_TNMatrix_obj* bbt_matrix,struct newton_dynamics_TNBody_obj* bbt_custom){
	struct newton_dynamics_TNBody_obj* volatile bbt_body=&bbNullObject;
	if(!(bbt_custom!= &bbNullObject)){
		bbt_body=bbObjectAtomicNew(&newton_dynamics_TNBody);
	}else{
		bbt_body=bbt_custom;
	}
	bbt_body->_newton_dynamics_tnbody_bodyptr =bmx_newtondynamics_NewtonCreateDynamicBody(bbt_body,o->_newton_dynamics_tnworld_worldptr ,bbt_collision->_newton_dynamics_tncollision_collisionptr ,(&bbt_matrix->_newton_dynamics_tnmatrix_frontx ));
	NewtonBodySetForceAndTorqueCallback(bbt_body->_newton_dynamics_tnbody_bodyptr ,newton_dynamics_TNBody__defaultForceAndTorqueCallback_v_pbfi);
	NewtonBodySetTransformCallback(bbt_body->_newton_dynamics_tnbody_bodyptr ,newton_dynamics_TNBody__defaultTransformCallback_v_pbpfi);
	return bbt_body;
}
struct newton_dynamics_TNTreeCollision_obj* _newton_dynamics_TNWorld_CreateTreeCollision_iTTNTreeCollision(struct newton_dynamics_TNWorld_obj* o,BBINT bbt_shapeID,struct newton_dynamics_TNTreeCollision_obj* bbt_custom){
	struct newton_dynamics_TNTreeCollision_obj* volatile bbt_tree=&bbNullObject;
	if(!(bbt_custom!= &bbNullObject)){
		bbt_tree=bbObjectAtomicNew(&newton_dynamics_TNTreeCollision);
	}else{
		bbt_tree=bbt_custom;
	}
	bbt_tree->_newton_dynamics_tncollision_collisionptr =bmx_newtondynamics_NewtonCreateTreeCollision(bbt_tree,o->_newton_dynamics_tnworld_worldptr ,bbt_shapeID);
	return bbt_tree;
}
struct newton_dynamics_TNCollision_obj* _newton_dynamics_TNWorld_CreateSphere_fiTTNMatrixTTNCollision(struct newton_dynamics_TNWorld_obj* o,BBFLOAT bbt_radius,BBINT bbt_shapeID,struct newton_dynamics_TNMatrix_obj* bbt_offsetMatrix,struct newton_dynamics_TNCollision_obj* bbt_custom){
	struct newton_dynamics_TNCollision_obj* volatile bbt_sphere=&bbNullObject;
	if(!(bbt_custom!= &bbNullObject)){
		bbt_sphere=bbObjectAtomicNew(&newton_dynamics_TNCollision);
	}else{
		bbt_sphere=bbt_custom;
	}
	if(!(bbt_offsetMatrix!= &bbNullObject)){
		bbt_sphere->_newton_dynamics_tncollision_collisionptr =bmx_newtondynamics_NewtonCreateSphere(bbt_sphere,o->_newton_dynamics_tnworld_worldptr ,bbt_radius,bbt_shapeID,0);
	}else{
		bbt_sphere->_newton_dynamics_tncollision_collisionptr =bmx_newtondynamics_NewtonCreateSphere(bbt_sphere,o->_newton_dynamics_tnworld_worldptr ,bbt_radius,bbt_shapeID,(&bbt_offsetMatrix->_newton_dynamics_tnmatrix_frontx ));
	}
	return bbt_sphere;
}
struct newton_dynamics_TNCollision_obj* _newton_dynamics_TNWorld_CreateBox_fffiTTNMatrixTTNCollision(struct newton_dynamics_TNWorld_obj* o,BBFLOAT bbt_dx,BBFLOAT bbt_dy,BBFLOAT bbt_dz,BBINT bbt_shapeID,struct newton_dynamics_TNMatrix_obj* bbt_offsetMatrix,struct newton_dynamics_TNCollision_obj* bbt_custom){
	struct newton_dynamics_TNCollision_obj* volatile bbt_box=&bbNullObject;
	if(!(bbt_custom!= &bbNullObject)){
		bbt_box=bbObjectAtomicNew(&newton_dynamics_TNCollision);
	}else{
		bbt_box=bbt_custom;
	}
	if(!(bbt_offsetMatrix!= &bbNullObject)){
		bbt_box->_newton_dynamics_tncollision_collisionptr =bmx_newtondynamics_NewtonCreateBox(bbt_box,o->_newton_dynamics_tnworld_worldptr ,bbt_dx,bbt_dy,bbt_dz,bbt_shapeID,0);
	}else{
		bbt_box->_newton_dynamics_tncollision_collisionptr =bmx_newtondynamics_NewtonCreateBox(bbt_box,o->_newton_dynamics_tnworld_worldptr ,bbt_dx,bbt_dy,bbt_dz,bbt_shapeID,(&bbt_offsetMatrix->_newton_dynamics_tnmatrix_frontx ));
	}
	return bbt_box;
}
struct newton_dynamics_TNCollision_obj* _newton_dynamics_TNWorld_CreateCylinder_ffiTTNMatrixTTNCollision(struct newton_dynamics_TNWorld_obj* o,BBFLOAT bbt_radius,BBFLOAT bbt_height,BBINT bbt_shapeID,struct newton_dynamics_TNMatrix_obj* bbt_offsetMatrix,struct newton_dynamics_TNCollision_obj* bbt_custom){
	struct newton_dynamics_TNCollision_obj* volatile bbt_cylinder=&bbNullObject;
	if(!(bbt_custom!= &bbNullObject)){
		bbt_cylinder=bbObjectAtomicNew(&newton_dynamics_TNCollision);
	}else{
		bbt_cylinder=bbt_custom;
	}
	if(!(bbt_offsetMatrix!= &bbNullObject)){
		bbt_cylinder->_newton_dynamics_tncollision_collisionptr =bmx_newtondynamics_NewtonCreateCylinder(bbt_cylinder,o->_newton_dynamics_tnworld_worldptr ,bbt_radius,bbt_height,bbt_shapeID,0);
	}else{
		bbt_cylinder->_newton_dynamics_tncollision_collisionptr =bmx_newtondynamics_NewtonCreateCylinder(bbt_cylinder,o->_newton_dynamics_tnworld_worldptr ,bbt_radius,bbt_height,bbt_shapeID,(&bbt_offsetMatrix->_newton_dynamics_tnmatrix_frontx ));
	}
	return bbt_cylinder;
}
struct newton_dynamics_TNMesh_obj* _newton_dynamics_TNWorld_CreateMesh(struct newton_dynamics_TNWorld_obj* o){
	struct newton_dynamics_TNMesh_obj* volatile bbt_mesh=bbObjectAtomicNew(&newton_dynamics_TNMesh);
	bbt_mesh->_newton_dynamics_tnmesh_meshptr =NewtonMeshCreate(o->_newton_dynamics_tnworld_worldptr );
	return bbt_mesh;
}
void _newton_dynamics_TNWorld_SetFrictionModel_i(struct newton_dynamics_TNWorld_obj* o,BBINT bbt_model){
	NewtonSetFrictionModel(o->_newton_dynamics_tnworld_worldptr ,bbt_model);
}
void _newton_dynamics_TNWorld_SetMinimumFrameRate_f(struct newton_dynamics_TNWorld_obj* o,BBFLOAT bbt_framerate){
	NewtonSetMinimumFrameRate(o->_newton_dynamics_tnworld_worldptr ,bbt_framerate);
}
void _newton_dynamics_TNWorld_SetContactMergeTolerance_f(struct newton_dynamics_TNWorld_obj* o,BBFLOAT bbt_tolerance){
	NewtonSetContactMergeTolerance(o->_newton_dynamics_tnworld_worldptr ,bbt_tolerance);
}
void _newton_dynamics_TNWorld_InvalidateCache(struct newton_dynamics_TNWorld_obj* o){
	NewtonInvalidateCache(o->_newton_dynamics_tnworld_worldptr );
}
void _newton_dynamics_TNWorld_Update_f(struct newton_dynamics_TNWorld_obj* o,BBFLOAT bbt_timestep){
	NewtonUpdate(o->_newton_dynamics_tnworld_worldptr ,bbt_timestep);
}
BBINT _newton_dynamics_TNWorld_GetBodyCount(struct newton_dynamics_TNWorld_obj* o){
	return NewtonWorldGetBodyCount(o->_newton_dynamics_tnworld_worldptr );
}
BBINT _newton_dynamics_TNWorld_GetConstraintCount(struct newton_dynamics_TNWorld_obj* o){
	return NewtonWorldGetConstraintCount(o->_newton_dynamics_tnworld_worldptr );
}
void _newton_dynamics_TNWorld_RayCast_ffffffTTNRayCastDelegatei(struct newton_dynamics_TNWorld_obj* o,BBFLOAT bbt_p0x,BBFLOAT bbt_p0y,BBFLOAT bbt_p0z,BBFLOAT bbt_p1x,BBFLOAT bbt_p1y,BBFLOAT bbt_p1z,struct newton_dynamics_TNRayCastDelegate_obj* bbt_delegate,BBINT bbt_threadIndex){
	if(bbt_delegate->_newton_dynamics_tnraycastdelegate_prefilter !=0){
		bmx_newtondynamics_NewtonWorldRayCast(o->_newton_dynamics_tnworld_worldptr ,bbt_p0x,bbt_p0y,bbt_p0z,bbt_p1x,bbt_p1y,bbt_p1z,newton_dynamics_TNRayCastDelegate__filterCallback_f_pbpbpfpfpbf,bbt_delegate,newton_dynamics_TNRayCastDelegate__prefilterCallback_i_pbpbpb,bbt_threadIndex);
	}else{
		bmx_newtondynamics_NewtonWorldRayCast(o->_newton_dynamics_tnworld_worldptr ,bbt_p0x,bbt_p0y,bbt_p0z,bbt_p1x,bbt_p1y,bbt_p1z,newton_dynamics_TNRayCastDelegate__filterCallback_f_pbpbpfpfpbf,bbt_delegate,&brl_blitz_NullFunctionError,bbt_threadIndex);
	}
}
void _newton_dynamics_TNWorld_Destroy(struct newton_dynamics_TNWorld_obj* o){
	if(o->_newton_dynamics_tnworld_worldptr ){
		NewtonDestroy(o->_newton_dynamics_tnworld_worldptr );
		o->_newton_dynamics_tnworld_worldptr =0;
	}
}
struct BBDebugScope_18 newton_dynamics_TNWorld_scope ={
	BBDEBUGSCOPE_USERTYPE,
	"TNWorld",
	{
		{
			BBDEBUGDECL_FIELD,
			"worldPtr",
			"*b",
			.field_offset=offsetof(struct newton_dynamics_TNWorld_obj,_newton_dynamics_tnworld_worldptr)
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"New",
			"()",
			&_newton_dynamics_TNWorld_New
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"Create",
			"():TNWorld",
			&newton_dynamics_TNWorld_Create_TTNWorld
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"CreateDynamicBody",
			"(:TNCollision,:TNMatrix,:TNBody):TNBody",
			&_newton_dynamics_TNWorld_CreateDynamicBody_TTNCollisionTTNMatrixTTNBody
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"CreateTreeCollision",
			"(i,:TNTreeCollision):TNTreeCollision",
			&_newton_dynamics_TNWorld_CreateTreeCollision_iTTNTreeCollision
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"CreateSphere",
			"(f,i,:TNMatrix,:TNCollision):TNCollision",
			&_newton_dynamics_TNWorld_CreateSphere_fiTTNMatrixTTNCollision
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"CreateBox",
			"(f,f,f,i,:TNMatrix,:TNCollision):TNCollision",
			&_newton_dynamics_TNWorld_CreateBox_fffiTTNMatrixTTNCollision
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"CreateCylinder",
			"(f,f,i,:TNMatrix,:TNCollision):TNCollision",
			&_newton_dynamics_TNWorld_CreateCylinder_ffiTTNMatrixTTNCollision
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"CreateMesh",
			"():TNMesh",
			&_newton_dynamics_TNWorld_CreateMesh
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetFrictionModel",
			"(i)",
			&_newton_dynamics_TNWorld_SetFrictionModel_i
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetMinimumFrameRate",
			"(f)",
			&_newton_dynamics_TNWorld_SetMinimumFrameRate_f
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetContactMergeTolerance",
			"(f)",
			&_newton_dynamics_TNWorld_SetContactMergeTolerance_f
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"InvalidateCache",
			"()",
			&_newton_dynamics_TNWorld_InvalidateCache
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"Update",
			"(f)",
			&_newton_dynamics_TNWorld_Update_f
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetBodyCount",
			"()i",
			&_newton_dynamics_TNWorld_GetBodyCount
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetConstraintCount",
			"()i",
			&_newton_dynamics_TNWorld_GetConstraintCount
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"RayCast",
			"(f,f,f,f,f,f,:TNRayCastDelegate,i)",
			&_newton_dynamics_TNWorld_RayCast_ffffffTTNRayCastDelegatei
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"Destroy",
			"()",
			&_newton_dynamics_TNWorld_Destroy
		},
		BBDEBUGDECL_END
	}
};
struct BBClass_newton_dynamics_TNWorld newton_dynamics_TNWorld={
	&bbObjectClass,
	bbObjectFree,
	&newton_dynamics_TNWorld_scope,
	sizeof(struct newton_dynamics_TNWorld_obj),
	_newton_dynamics_TNWorld_New,
	bbObjectDtor,
	bbObjectToString,
	bbObjectCompare,
	bbObjectSendMessage,
	0,
	0,
	offsetof(struct newton_dynamics_TNWorld_obj,_newton_dynamics_tnworld_worldptr) - sizeof(void*) + sizeof(BBBYTE*)
	,newton_dynamics_TNWorld_Create_TTNWorld
	,_newton_dynamics_TNWorld_CreateDynamicBody_TTNCollisionTTNMatrixTTNBody
	,_newton_dynamics_TNWorld_CreateTreeCollision_iTTNTreeCollision
	,_newton_dynamics_TNWorld_CreateSphere_fiTTNMatrixTTNCollision
	,_newton_dynamics_TNWorld_CreateBox_fffiTTNMatrixTTNCollision
	,_newton_dynamics_TNWorld_CreateCylinder_ffiTTNMatrixTTNCollision
	,_newton_dynamics_TNWorld_CreateMesh
	,_newton_dynamics_TNWorld_SetFrictionModel_i
	,_newton_dynamics_TNWorld_SetMinimumFrameRate_f
	,_newton_dynamics_TNWorld_SetContactMergeTolerance_f
	,_newton_dynamics_TNWorld_InvalidateCache
	,_newton_dynamics_TNWorld_Update_f
	,_newton_dynamics_TNWorld_GetBodyCount
	,_newton_dynamics_TNWorld_GetConstraintCount
	,_newton_dynamics_TNWorld_RayCast_ffffffTTNRayCastDelegatei
	,_newton_dynamics_TNWorld_Destroy
};

void _newton_dynamics_TNRayCastDelegate_New(struct newton_dynamics_TNRayCastDelegate_obj* o) {
	bbObjectCtor(o);
	o->clas = (BBClass*)&newton_dynamics_TNRayCastDelegate;
	o->_newton_dynamics_tnraycastdelegate_prefilter = 0;
}
BBINT _newton_dynamics_TNRayCastDelegate_OnPreFilter_TTNBodyTTNCollision(struct newton_dynamics_TNRayCastDelegate_obj* o,struct newton_dynamics_TNBody_obj* bbt_body,struct newton_dynamics_TNCollision_obj* bbt_collision){
	return 0;
}
BBFLOAT _newton_dynamics_TNRayCastDelegate_OnFilter_TTNBodyTTNCollisionpfpff(struct newton_dynamics_TNRayCastDelegate_obj* o,struct newton_dynamics_TNBody_obj* bbt_body,struct newton_dynamics_TNCollision_obj* bbt_shapeHit,BBFLOAT* bbt_hitContact,BBFLOAT* bbt_hitNormal,BBFLOAT bbt_intersectParam){
	return .0f;
}
BBINT newton_dynamics_TNRayCastDelegate__prefilterCallback_i_pbpbpb(BBBYTE* bbt_bodyPtr,BBBYTE* bbt_collPtr,BBBYTE* bbt_delPtr){
	struct newton_dynamics_TNRayCastDelegate_obj* volatile bbt_delegate=bmx_newtondynamics_RayCastDelegateFromPtr(bbt_delPtr);
	return (bbt_delegate)->clas->m_OnPreFilter_TTNBodyTTNCollision(bbt_delegate,NewtonBodyGetUserData(bbt_bodyPtr),NewtonCollisionGetUserData(bbt_collPtr));
}
BBFLOAT newton_dynamics_TNRayCastDelegate__filterCallback_f_pbpbpfpfpbf(BBBYTE* bbt_bodyPtr,BBBYTE* bbt_collPtr,BBFLOAT* bbt_hitContact,BBFLOAT* bbt_hitNormal,BBBYTE* bbt_delPtr,BBFLOAT bbt_intersectParam){
	struct newton_dynamics_TNRayCastDelegate_obj* volatile bbt_delegate=bmx_newtondynamics_RayCastDelegateFromPtr(bbt_delPtr);
	return (bbt_delegate)->clas->m_OnFilter_TTNBodyTTNCollisionpfpff(bbt_delegate,NewtonBodyGetUserData(bbt_bodyPtr),NewtonCollisionGetUserData(bbt_collPtr),bbt_hitContact,bbt_hitNormal,bbt_intersectParam);
}
struct BBDebugScope_6 newton_dynamics_TNRayCastDelegate_scope ={
	BBDEBUGSCOPE_USERTYPE,
	"TNRayCastDelegate",
	{
		{
			BBDEBUGDECL_FIELD,
			"prefilter",
			"i",
			.field_offset=offsetof(struct newton_dynamics_TNRayCastDelegate_obj,_newton_dynamics_tnraycastdelegate_prefilter)
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"New",
			"()",
			&_newton_dynamics_TNRayCastDelegate_New
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"OnPreFilter",
			"(:TNBody,:TNCollision)i",
			&_newton_dynamics_TNRayCastDelegate_OnPreFilter_TTNBodyTTNCollision
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"OnFilter",
			"(:TNBody,:TNCollision,*f,*f,f)f",
			&_newton_dynamics_TNRayCastDelegate_OnFilter_TTNBodyTTNCollisionpfpff
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"_prefilterCallback",
			"(*b,*b,*b)i",
			&newton_dynamics_TNRayCastDelegate__prefilterCallback_i_pbpbpb
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"_filterCallback",
			"(*b,*b,*f,*f,*b,f)f",
			&newton_dynamics_TNRayCastDelegate__filterCallback_f_pbpbpfpfpbf
		},
		BBDEBUGDECL_END
	}
};
struct BBClass_newton_dynamics_TNRayCastDelegate newton_dynamics_TNRayCastDelegate={
	&bbObjectClass,
	bbObjectFree,
	&newton_dynamics_TNRayCastDelegate_scope,
	sizeof(struct newton_dynamics_TNRayCastDelegate_obj),
	_newton_dynamics_TNRayCastDelegate_New,
	bbObjectDtor,
	bbObjectToString,
	bbObjectCompare,
	bbObjectSendMessage,
	0,
	0,
	offsetof(struct newton_dynamics_TNRayCastDelegate_obj,_newton_dynamics_tnraycastdelegate_prefilter) - sizeof(void*) + sizeof(BBINT)
	,_newton_dynamics_TNRayCastDelegate_OnPreFilter_TTNBodyTTNCollision
	,_newton_dynamics_TNRayCastDelegate_OnFilter_TTNBodyTTNCollisionpfpff
	,newton_dynamics_TNRayCastDelegate__prefilterCallback_i_pbpbpb
	,newton_dynamics_TNRayCastDelegate__filterCallback_f_pbpbpfpfpbf
};

void _newton_dynamics_TNCollision_New(struct newton_dynamics_TNCollision_obj* o) {
	bbObjectCtor(o);
	o->clas = (BBClass*)&newton_dynamics_TNCollision;
	o->_newton_dynamics_tncollision_collisionptr = 0;
}
void _newton_dynamics_TNCollision_Destroy(struct newton_dynamics_TNCollision_obj* o){
	if(o->_newton_dynamics_tncollision_collisionptr ){
		NewtonDestroyCollision(o->_newton_dynamics_tncollision_collisionptr );
		o->_newton_dynamics_tncollision_collisionptr =0;
	}
}
struct BBDebugScope_3 newton_dynamics_TNCollision_scope ={
	BBDEBUGSCOPE_USERTYPE,
	"TNCollision",
	{
		{
			BBDEBUGDECL_FIELD,
			"collisionPtr",
			"*b",
			.field_offset=offsetof(struct newton_dynamics_TNCollision_obj,_newton_dynamics_tncollision_collisionptr)
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"New",
			"()",
			&_newton_dynamics_TNCollision_New
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"Destroy",
			"()",
			&_newton_dynamics_TNCollision_Destroy
		},
		BBDEBUGDECL_END
	}
};
struct BBClass_newton_dynamics_TNCollision newton_dynamics_TNCollision={
	&bbObjectClass,
	bbObjectFree,
	&newton_dynamics_TNCollision_scope,
	sizeof(struct newton_dynamics_TNCollision_obj),
	_newton_dynamics_TNCollision_New,
	bbObjectDtor,
	bbObjectToString,
	bbObjectCompare,
	bbObjectSendMessage,
	0,
	0,
	offsetof(struct newton_dynamics_TNCollision_obj,_newton_dynamics_tncollision_collisionptr) - sizeof(void*) + sizeof(BBBYTE*)
	,_newton_dynamics_TNCollision_Destroy
};

void _newton_dynamics_TNTreeCollision_New(struct newton_dynamics_TNTreeCollision_obj* o) {
	_newton_dynamics_TNCollision_New(o);
	o->clas = (BBClass*)&newton_dynamics_TNTreeCollision;
}
void _newton_dynamics_TNTreeCollision_BeginBuild(struct newton_dynamics_TNTreeCollision_obj* o){
	NewtonTreeCollisionBeginBuild(o->_newton_dynamics_tncollision_collisionptr );
}
void _newton_dynamics_TNTreeCollision_EndBuild_i(struct newton_dynamics_TNTreeCollision_obj* o,BBINT bbt_optimize){
	NewtonTreeCollisionEndBuild(o->_newton_dynamics_tncollision_collisionptr ,bbt_optimize);
}
void _newton_dynamics_TNTreeCollision_AddFace_ipfii(struct newton_dynamics_TNTreeCollision_obj* o,BBINT bbt_vertexCount,BBFLOAT* bbt_vertexPtr,BBINT bbt_strideInBytes,BBINT bbt_faceAttribute){
	NewtonTreeCollisionAddFace(o->_newton_dynamics_tncollision_collisionptr ,bbt_vertexCount,bbt_vertexPtr,bbt_strideInBytes,bbt_faceAttribute);
}
struct BBDebugScope_4 newton_dynamics_TNTreeCollision_scope ={
	BBDEBUGSCOPE_USERTYPE,
	"TNTreeCollision",
	{
		{
			BBDEBUGDECL_TYPEMETHOD,
			"New",
			"()",
			&_newton_dynamics_TNTreeCollision_New
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"BeginBuild",
			"()",
			&_newton_dynamics_TNTreeCollision_BeginBuild
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"EndBuild",
			"(i)",
			&_newton_dynamics_TNTreeCollision_EndBuild_i
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"AddFace",
			"(i,*f,i,i)",
			&_newton_dynamics_TNTreeCollision_AddFace_ipfii
		},
		BBDEBUGDECL_END
	}
};
struct BBClass_newton_dynamics_TNTreeCollision newton_dynamics_TNTreeCollision={
	&newton_dynamics_TNCollision,
	bbObjectFree,
	&newton_dynamics_TNTreeCollision_scope,
	sizeof(struct newton_dynamics_TNTreeCollision_obj),
	_newton_dynamics_TNTreeCollision_New,
	bbObjectDtor,
	bbObjectToString,
	bbObjectCompare,
	bbObjectSendMessage,
	0,
	0,
	0
	,_newton_dynamics_TNCollision_Destroy
	,_newton_dynamics_TNTreeCollision_BeginBuild
	,_newton_dynamics_TNTreeCollision_EndBuild_i
	,_newton_dynamics_TNTreeCollision_AddFace_ipfii
};

void _newton_dynamics_TNBody_New(struct newton_dynamics_TNBody_obj* o) {
	bbObjectCtor(o);
	o->clas = (BBClass*)&newton_dynamics_TNBody;
	o->_newton_dynamics_tnbody_bodyptr = 0;
	o->_newton_dynamics_tnbody__fatcallback = &brl_blitz_NullFunctionError;
	o->_newton_dynamics_tnbody__transcallback = &brl_blitz_NullFunctionError;
}
void _newton_dynamics_TNBody_OnForceAndTorque_fi(struct newton_dynamics_TNBody_obj* o,BBFLOAT bbt_timestamp,BBINT bbt_threadIndex){
}
void _newton_dynamics_TNBody_OnTransform_pfi(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_matrix,BBINT bbt_threadIndex){
}
void _newton_dynamics_TNBody_SetMatrix_TTNMatrix(struct newton_dynamics_TNBody_obj* o,struct newton_dynamics_TNMatrix_obj* bbt_matrix){
	NewtonBodySetMatrix(o->_newton_dynamics_tnbody_bodyptr ,(&bbt_matrix->_newton_dynamics_tnmatrix_frontx ));
}
void _newton_dynamics_TNBody_GetMatrix_TTNMatrix(struct newton_dynamics_TNBody_obj* o,struct newton_dynamics_TNMatrix_obj* bbt_matrix){
	NewtonBodyGetMatrix(o->_newton_dynamics_tnbody_bodyptr ,(&bbt_matrix->_newton_dynamics_tnmatrix_frontx ));
}
void _newton_dynamics_TNBody_GetMassMatrix_vfvfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_mass,BBFLOAT* bbt_Ixx,BBFLOAT* bbt_Iyy,BBFLOAT* bbt_Izz){
	NewtonBodyGetMassMatrix(o->_newton_dynamics_tnbody_bodyptr ,&(*bbt_mass),&(*bbt_Ixx),&(*bbt_Iyy),&(*bbt_Izz));
}
void _newton_dynamics_TNBody_GetRotation_vfvfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_q0,BBFLOAT* bbt_q1,BBFLOAT* bbt_q2,BBFLOAT* bbt_q3){
	bmx_newtondynamics_NewtonBodyGetRotation(o->_newton_dynamics_tnbody_bodyptr ,&(*bbt_q0),&(*bbt_q1),&(*bbt_q2),&(*bbt_q3));
}
void _newton_dynamics_TNBody_GetInvMass_vfvfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_mass,BBFLOAT* bbt_Ixx,BBFLOAT* bbt_Iyy,BBFLOAT* bbt_Izz){
	NewtonBodyGetInvMass(o->_newton_dynamics_tnbody_bodyptr ,&(*bbt_mass),&(*bbt_Ixx),&(*bbt_Iyy),&(*bbt_Izz));
}
void _newton_dynamics_TNBody_GetInertiaMatrix_TTNMatrix(struct newton_dynamics_TNBody_obj* o,struct newton_dynamics_TNMatrix_obj* bbt_matrix){
	NewtonBodyGetInertiaMatrix(o->_newton_dynamics_tnbody_bodyptr ,(&bbt_matrix->_newton_dynamics_tnmatrix_frontx ));
}
void _newton_dynamics_TNBody_GetInvInertiaMatrix_TTNMatrix(struct newton_dynamics_TNBody_obj* o,struct newton_dynamics_TNMatrix_obj* bbt_matrix){
	NewtonBodyGetInvInertiaMatrix(o->_newton_dynamics_tnbody_bodyptr ,(&bbt_matrix->_newton_dynamics_tnmatrix_frontx ));
}
void _newton_dynamics_TNBody_GetOmega_vfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_ox,BBFLOAT* bbt_oy,BBFLOAT* bbt_oz){
	bmx_newtondynamics_NewtonBodyGetOmega(o->_newton_dynamics_tnbody_bodyptr ,&(*bbt_ox),&(*bbt_oy),&(*bbt_oz));
}
void _newton_dynamics_TNBody_GetVelocity_vfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_vx,BBFLOAT* bbt_vy,BBFLOAT* bbt_vz){
	bmx_newtondynamics_NewtonBodyGetVelocity(o->_newton_dynamics_tnbody_bodyptr ,&(*bbt_vx),&(*bbt_vy),&(*bbt_vz));
}
void _newton_dynamics_TNBody_GetForce_vfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_fx,BBFLOAT* bbt_fy,BBFLOAT* bbt_fz){
	bmx_newtondynamics_NewtonBodyGetForce(o->_newton_dynamics_tnbody_bodyptr ,&(*bbt_fx),&(*bbt_fy),&(*bbt_fz));
}
void _newton_dynamics_TNBody_GetTorque_vfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_tx,BBFLOAT* bbt_ty,BBFLOAT* bbt_tz){
	bmx_newtondynamics_NewtonBodyGetTorque(o->_newton_dynamics_tnbody_bodyptr ,&(*bbt_tx),&(*bbt_ty),&(*bbt_tz));
}
void _newton_dynamics_TNBody_GetForceAcc_vfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_fx,BBFLOAT* bbt_fy,BBFLOAT* bbt_fz){
	bmx_newtondynamics_NewtonBodyGetForceAcc(o->_newton_dynamics_tnbody_bodyptr ,&(*bbt_fx),&(*bbt_fy),&(*bbt_fz));
}
void _newton_dynamics_TNBody_GetTorqueAcc_vfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_tx,BBFLOAT* bbt_ty,BBFLOAT* bbt_tz){
	bmx_newtondynamics_NewtonBodyGetTorqueAcc(o->_newton_dynamics_tnbody_bodyptr ,&(*bbt_tx),&(*bbt_ty),&(*bbt_tz));
}
void _newton_dynamics_TNBody_GetCentreOfMass_vfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_cx,BBFLOAT* bbt_cy,BBFLOAT* bbt_cz){
	bmx_newtondynamics_NewtonBodyGetCentreOfMass(o->_newton_dynamics_tnbody_bodyptr ,&(*bbt_cx),&(*bbt_cy),&(*bbt_cz));
}
void _newton_dynamics_TNBody_GetAngularDamping_vfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_aX,BBFLOAT* bbt_aY,BBFLOAT* bbt_aZ){
	bmx_newtondynamics_NewtonBodyGetAngularDamping(o->_newton_dynamics_tnbody_bodyptr ,&(*bbt_aX),&(*bbt_aY),&(*bbt_aZ));
}
void _newton_dynamics_TNBody_NewtonBodyGetAABB_vfvfvfvfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT* bbt_p0x,BBFLOAT* bbt_p0y,BBFLOAT* bbt_p0z,BBFLOAT* bbt_p1x,BBFLOAT* bbt_p1y,BBFLOAT* bbt_p1z){
	bmx_newtondynamics_NewtonBodyGetAABB(o->_newton_dynamics_tnbody_bodyptr ,&(*bbt_p0x),&(*bbt_p0y),&(*bbt_p0z),&(*bbt_p1x),&(*bbt_p1y),&(*bbt_p1z));
}
void _newton_dynamics_TNBody_SetAngularDamping_fff(struct newton_dynamics_TNBody_obj* o,BBFLOAT bbt_aX,BBFLOAT bbt_aY,BBFLOAT bbt_aZ){
	bmx_newtondynamics_NewtonBodySetAngularDamping(o->_newton_dynamics_tnbody_bodyptr ,bbt_aX,bbt_aY,bbt_aZ);
}
void _newton_dynamics_TNBody_SetForceAndTorqueCallback_F_TTNBodyfi_v_(struct newton_dynamics_TNBody_obj* o,void(* bbt_callback)(struct newton_dynamics_TNBody_obj*,BBFLOAT,BBINT)){
	o->_newton_dynamics_tnbody__fatcallback =bbt_callback;
	NewtonBodySetForceAndTorqueCallback(o->_newton_dynamics_tnbody_bodyptr ,o->clas->f__forceAndTorqueCallback_v_pbfi);
}
void _newton_dynamics_TNBody_SetTransformCallback_F_TTNBodypfi_v_(struct newton_dynamics_TNBody_obj* o,void(* bbt_callback)(struct newton_dynamics_TNBody_obj*,BBFLOAT*,BBINT)){
	o->_newton_dynamics_tnbody__transcallback =bbt_callback;
	NewtonBodySetTransformCallback(o->_newton_dynamics_tnbody_bodyptr ,o->clas->f__transformCallback_v_pbpfi);
}
void _newton_dynamics_TNBody_SetOmega_ffff(struct newton_dynamics_TNBody_obj* o,BBFLOAT bbt_ox,BBFLOAT bbt_oy,BBFLOAT bbt_oz,BBFLOAT bbt_ow){
	bmx_newtondynamics_NewtonBodySetOmega(o->_newton_dynamics_tnbody_bodyptr ,bbt_ox,bbt_oy,bbt_oz,bbt_ow);
}
void _newton_dynamics_TNBody_SetForce_ffff(struct newton_dynamics_TNBody_obj* o,BBFLOAT bbt_fx,BBFLOAT bbt_fy,BBFLOAT bbt_fz,BBFLOAT bbt_fw){
	bmx_newtondynamics_NewtonBodySetForce(o->_newton_dynamics_tnbody_bodyptr ,bbt_fx,bbt_fy,bbt_fz,bbt_fw);
}
void _newton_dynamics_TNBody_SetVelocity_ffff(struct newton_dynamics_TNBody_obj* o,BBFLOAT bbt_vx,BBFLOAT bbt_vy,BBFLOAT bbt_vz,BBFLOAT bbt_vw){
	bmx_newtondynamics_NewtonBodySetVelocity(o->_newton_dynamics_tnbody_bodyptr ,bbt_vx,bbt_vy,bbt_vz,bbt_vw);
}
void _newton_dynamics_TNBody_SetTorque_ffff(struct newton_dynamics_TNBody_obj* o,BBFLOAT bbt_tx,BBFLOAT bbt_ty,BBFLOAT bbt_tz,BBFLOAT bbt_tw){
	bmx_newtondynamics_NewtonBodySetTorque(o->_newton_dynamics_tnbody_bodyptr ,bbt_tx,bbt_ty,bbt_tz,bbt_tw);
}
void _newton_dynamics_TNBody_SetMassProperties_fTTNCollision(struct newton_dynamics_TNBody_obj* o,BBFLOAT bbt_mass,struct newton_dynamics_TNCollision_obj* bbt_collision){
	NewtonBodySetMassProperties(o->_newton_dynamics_tnbody_bodyptr ,bbt_mass,bbt_collision->_newton_dynamics_tncollision_collisionptr );
}
void _newton_dynamics_TNBody_SetLinearDamping_f(struct newton_dynamics_TNBody_obj* o,BBFLOAT bbt_linearDamp){
	NewtonBodySetLinearDamping(o->_newton_dynamics_tnbody_bodyptr ,bbt_linearDamp);
}
BBINT _newton_dynamics_TNBody_GetType(struct newton_dynamics_TNBody_obj* o){
	return NewtonBodyGetType(o->_newton_dynamics_tnbody_bodyptr );
}
BBINT _newton_dynamics_TNBody_GetCollidable(struct newton_dynamics_TNBody_obj* o){
	return NewtonBodyGetCollidable(o->_newton_dynamics_tnbody_bodyptr );
}
void _newton_dynamics_TNBody_SetCollidable_i(struct newton_dynamics_TNBody_obj* o,BBINT bbt_collidableState){
	NewtonBodySetCollidable(o->_newton_dynamics_tnbody_bodyptr ,bbt_collidableState);
}
void _newton_dynamics_TNBody_AddForce_fff(struct newton_dynamics_TNBody_obj* o,BBFLOAT bbt_fx,BBFLOAT bbt_fy,BBFLOAT bbt_fz){
	bmx_newtondynamics_NewtonBodyAddForce(o->_newton_dynamics_tnbody_bodyptr ,bbt_fx,bbt_fy,bbt_fz);
}
void _newton_dynamics_TNBody_AddTorque_fff(struct newton_dynamics_TNBody_obj* o,BBFLOAT bbt_tx,BBFLOAT bbt_ty,BBFLOAT bbt_tz){
	bmx_newtondynamics_NewtonBodyAddTorque(o->_newton_dynamics_tnbody_bodyptr ,bbt_tx,bbt_ty,bbt_tz);
}
void _newton_dynamics_TNBody_CalculateInverseDynamicsForce_ffffvfvfvf(struct newton_dynamics_TNBody_obj* o,BBFLOAT bbt_timestep,BBFLOAT bbt_vx,BBFLOAT bbt_vy,BBFLOAT bbt_vz,BBFLOAT* bbt_fx,BBFLOAT* bbt_fy,BBFLOAT* bbt_fz){
	bmx_newtondynamics_NewtonBodyCalculateInverseDynamicsForce(o->_newton_dynamics_tnbody_bodyptr ,bbt_timestep,bbt_vx,bbt_vy,bbt_vz,&(*bbt_fx),&(*bbt_fy),&(*bbt_fz));
}
void newton_dynamics_TNBody__forceAndTorqueCallback_v_pbfi(BBBYTE* bbt_bodyPtr,BBFLOAT bbt_timestamp,BBINT bbt_threadIndex){
	struct newton_dynamics_TNBody_obj* volatile bbt_body=NewtonBodyGetUserData(bbt_bodyPtr);
	bbt_body->_newton_dynamics_tnbody__fatcallback(bbt_body,bbt_timestamp,bbt_threadIndex);
}
void newton_dynamics_TNBody__defaultForceAndTorqueCallback_v_pbfi(BBBYTE* bbt_bodyPtr,BBFLOAT bbt_timestamp,BBINT bbt_threadIndex){
	struct newton_dynamics_TNBody_obj* volatile bbt_body=NewtonBodyGetUserData(bbt_bodyPtr);
	(bbt_body)->clas->m_OnForceAndTorque_fi(bbt_body,bbt_timestamp,bbt_threadIndex);
}
void newton_dynamics_TNBody__transformCallback_v_pbpfi(BBBYTE* bbt_bodyPtr,BBFLOAT* bbt_matrix,BBINT bbt_threadIndex){
	struct newton_dynamics_TNBody_obj* volatile bbt_body=NewtonBodyGetUserData(bbt_bodyPtr);
	bbt_body->_newton_dynamics_tnbody__transcallback(bbt_body,bbt_matrix,bbt_threadIndex);
}
void newton_dynamics_TNBody__defaultTransformCallback_v_pbpfi(BBBYTE* bbt_bodyPtr,BBFLOAT* bbt_matrix,BBINT bbt_threadIndex){
	struct newton_dynamics_TNBody_obj* volatile bbt_body=NewtonBodyGetUserData(bbt_bodyPtr);
	(bbt_body)->clas->m_OnTransform_pfi(bbt_body,bbt_matrix,bbt_threadIndex);
}
void _newton_dynamics_TNBody_Destroy(struct newton_dynamics_TNBody_obj* o){
	if(o->_newton_dynamics_tnbody_bodyptr ){
		NewtonDestroyBody(o->_newton_dynamics_tnbody_bodyptr );
		o->_newton_dynamics_tnbody_bodyptr =0;
	}
}
struct BBDebugScope_42 newton_dynamics_TNBody_scope ={
	BBDEBUGSCOPE_USERTYPE,
	"TNBody",
	{
		{
			BBDEBUGDECL_FIELD,
			"bodyPtr",
			"*b",
			.field_offset=offsetof(struct newton_dynamics_TNBody_obj,_newton_dynamics_tnbody_bodyptr)
		},
		{
			BBDEBUGDECL_FIELD,
			"_fatCallback",
			"(:TNBody,f,i)",
			.field_offset=offsetof(struct newton_dynamics_TNBody_obj,_newton_dynamics_tnbody__fatcallback)
		},
		{
			BBDEBUGDECL_FIELD,
			"_transCallback",
			"(:TNBody,*f,i)",
			.field_offset=offsetof(struct newton_dynamics_TNBody_obj,_newton_dynamics_tnbody__transcallback)
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"New",
			"()",
			&_newton_dynamics_TNBody_New
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"OnForceAndTorque",
			"(f,i)",
			&_newton_dynamics_TNBody_OnForceAndTorque_fi
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"OnTransform",
			"(*f,i)",
			&_newton_dynamics_TNBody_OnTransform_pfi
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetMatrix",
			"(:TNMatrix)",
			&_newton_dynamics_TNBody_SetMatrix_TTNMatrix
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetMatrix",
			"(:TNMatrix)",
			&_newton_dynamics_TNBody_GetMatrix_TTNMatrix
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetMassMatrix",
			"(f,f,f,f)",
			&_newton_dynamics_TNBody_GetMassMatrix_vfvfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetRotation",
			"(f,f,f,f)",
			&_newton_dynamics_TNBody_GetRotation_vfvfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetInvMass",
			"(f,f,f,f)",
			&_newton_dynamics_TNBody_GetInvMass_vfvfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetInertiaMatrix",
			"(:TNMatrix)",
			&_newton_dynamics_TNBody_GetInertiaMatrix_TTNMatrix
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetInvInertiaMatrix",
			"(:TNMatrix)",
			&_newton_dynamics_TNBody_GetInvInertiaMatrix_TTNMatrix
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetOmega",
			"(f,f,f)",
			&_newton_dynamics_TNBody_GetOmega_vfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetVelocity",
			"(f,f,f)",
			&_newton_dynamics_TNBody_GetVelocity_vfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetForce",
			"(f,f,f)",
			&_newton_dynamics_TNBody_GetForce_vfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetTorque",
			"(f,f,f)",
			&_newton_dynamics_TNBody_GetTorque_vfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetForceAcc",
			"(f,f,f)",
			&_newton_dynamics_TNBody_GetForceAcc_vfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetTorqueAcc",
			"(f,f,f)",
			&_newton_dynamics_TNBody_GetTorqueAcc_vfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetCentreOfMass",
			"(f,f,f)",
			&_newton_dynamics_TNBody_GetCentreOfMass_vfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetAngularDamping",
			"(f,f,f)",
			&_newton_dynamics_TNBody_GetAngularDamping_vfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"NewtonBodyGetAABB",
			"(f,f,f,f,f,f)",
			&_newton_dynamics_TNBody_NewtonBodyGetAABB_vfvfvfvfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetAngularDamping",
			"(f,f,f)",
			&_newton_dynamics_TNBody_SetAngularDamping_fff
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetForceAndTorqueCallback",
			"((:TNBody,f,i))",
			&_newton_dynamics_TNBody_SetForceAndTorqueCallback_F_TTNBodyfi_v_
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetTransformCallback",
			"((:TNBody,*f,i))",
			&_newton_dynamics_TNBody_SetTransformCallback_F_TTNBodypfi_v_
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetOmega",
			"(f,f,f,f)",
			&_newton_dynamics_TNBody_SetOmega_ffff
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetForce",
			"(f,f,f,f)",
			&_newton_dynamics_TNBody_SetForce_ffff
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetVelocity",
			"(f,f,f,f)",
			&_newton_dynamics_TNBody_SetVelocity_ffff
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetTorque",
			"(f,f,f,f)",
			&_newton_dynamics_TNBody_SetTorque_ffff
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetMassProperties",
			"(f,:TNCollision)",
			&_newton_dynamics_TNBody_SetMassProperties_fTTNCollision
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetLinearDamping",
			"(f)",
			&_newton_dynamics_TNBody_SetLinearDamping_f
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetType",
			"()i",
			&_newton_dynamics_TNBody_GetType
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetCollidable",
			"()i",
			&_newton_dynamics_TNBody_GetCollidable
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"SetCollidable",
			"(i)",
			&_newton_dynamics_TNBody_SetCollidable_i
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"AddForce",
			"(f,f,f)",
			&_newton_dynamics_TNBody_AddForce_fff
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"AddTorque",
			"(f,f,f)",
			&_newton_dynamics_TNBody_AddTorque_fff
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"CalculateInverseDynamicsForce",
			"(f,f,f,f,f,f,f)",
			&_newton_dynamics_TNBody_CalculateInverseDynamicsForce_ffffvfvfvf
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"_forceAndTorqueCallback",
			"(*b,f,i)",
			&newton_dynamics_TNBody__forceAndTorqueCallback_v_pbfi
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"_defaultForceAndTorqueCallback",
			"(*b,f,i)",
			&newton_dynamics_TNBody__defaultForceAndTorqueCallback_v_pbfi
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"_transformCallback",
			"(*b,*f,i)",
			&newton_dynamics_TNBody__transformCallback_v_pbpfi
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"_defaultTransformCallback",
			"(*b,*f,i)",
			&newton_dynamics_TNBody__defaultTransformCallback_v_pbpfi
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"Destroy",
			"()",
			&_newton_dynamics_TNBody_Destroy
		},
		BBDEBUGDECL_END
	}
};
struct BBClass_newton_dynamics_TNBody newton_dynamics_TNBody={
	&bbObjectClass,
	bbObjectFree,
	&newton_dynamics_TNBody_scope,
	sizeof(struct newton_dynamics_TNBody_obj),
	_newton_dynamics_TNBody_New,
	bbObjectDtor,
	bbObjectToString,
	bbObjectCompare,
	bbObjectSendMessage,
	0,
	0,
	offsetof(struct newton_dynamics_TNBody_obj,_newton_dynamics_tnbody__transcallback) - sizeof(void*) + sizeof(void(* )(struct newton_dynamics_TNBody_obj*,BBFLOAT*,BBINT))
	,_newton_dynamics_TNBody_OnForceAndTorque_fi
	,_newton_dynamics_TNBody_OnTransform_pfi
	,_newton_dynamics_TNBody_SetMatrix_TTNMatrix
	,_newton_dynamics_TNBody_GetMatrix_TTNMatrix
	,_newton_dynamics_TNBody_GetMassMatrix_vfvfvfvf
	,_newton_dynamics_TNBody_GetRotation_vfvfvfvf
	,_newton_dynamics_TNBody_GetInvMass_vfvfvfvf
	,_newton_dynamics_TNBody_GetInertiaMatrix_TTNMatrix
	,_newton_dynamics_TNBody_GetInvInertiaMatrix_TTNMatrix
	,_newton_dynamics_TNBody_GetOmega_vfvfvf
	,_newton_dynamics_TNBody_GetVelocity_vfvfvf
	,_newton_dynamics_TNBody_GetForce_vfvfvf
	,_newton_dynamics_TNBody_GetTorque_vfvfvf
	,_newton_dynamics_TNBody_GetForceAcc_vfvfvf
	,_newton_dynamics_TNBody_GetTorqueAcc_vfvfvf
	,_newton_dynamics_TNBody_GetCentreOfMass_vfvfvf
	,_newton_dynamics_TNBody_GetAngularDamping_vfvfvf
	,_newton_dynamics_TNBody_NewtonBodyGetAABB_vfvfvfvfvfvf
	,_newton_dynamics_TNBody_SetAngularDamping_fff
	,_newton_dynamics_TNBody_SetForceAndTorqueCallback_F_TTNBodyfi_v_
	,_newton_dynamics_TNBody_SetTransformCallback_F_TTNBodypfi_v_
	,_newton_dynamics_TNBody_SetOmega_ffff
	,_newton_dynamics_TNBody_SetForce_ffff
	,_newton_dynamics_TNBody_SetVelocity_ffff
	,_newton_dynamics_TNBody_SetTorque_ffff
	,_newton_dynamics_TNBody_SetMassProperties_fTTNCollision
	,_newton_dynamics_TNBody_SetLinearDamping_f
	,_newton_dynamics_TNBody_GetType
	,_newton_dynamics_TNBody_GetCollidable
	,_newton_dynamics_TNBody_SetCollidable_i
	,_newton_dynamics_TNBody_AddForce_fff
	,_newton_dynamics_TNBody_AddTorque_fff
	,_newton_dynamics_TNBody_CalculateInverseDynamicsForce_ffffvfvfvf
	,newton_dynamics_TNBody__forceAndTorqueCallback_v_pbfi
	,newton_dynamics_TNBody__defaultForceAndTorqueCallback_v_pbfi
	,newton_dynamics_TNBody__transformCallback_v_pbpfi
	,newton_dynamics_TNBody__defaultTransformCallback_v_pbpfi
	,_newton_dynamics_TNBody_Destroy
};

void _newton_dynamics_TNMesh_New(struct newton_dynamics_TNMesh_obj* o) {
	bbObjectCtor(o);
	o->clas = (BBClass*)&newton_dynamics_TNMesh;
	o->_newton_dynamics_tnmesh_meshptr = 0;
}
void _newton_dynamics_TNMesh_ApplyTransform_TTNMatrix(struct newton_dynamics_TNMesh_obj* o,struct newton_dynamics_TNMatrix_obj* bbt_matrix){
	NewtonMeshApplyTransform(o->_newton_dynamics_tnmesh_meshptr ,(&bbt_matrix->_newton_dynamics_tnmatrix_frontx ));
}
void _newton_dynamics_TNMesh_CalculateOOBB_TTNMatrixvfvfvf(struct newton_dynamics_TNMesh_obj* o,struct newton_dynamics_TNMatrix_obj* bbt_matrix,BBFLOAT* bbt_x,BBFLOAT* bbt_y,BBFLOAT* bbt_z){
	NewtonMeshCalculateOOBB(o->_newton_dynamics_tnmesh_meshptr ,(&bbt_matrix->_newton_dynamics_tnmatrix_frontx ),&(*bbt_x),&(*bbt_y),&(*bbt_z));
}
void _newton_dynamics_TNMesh_CalculateVertexNormals_f(struct newton_dynamics_TNMesh_obj* o,BBFLOAT bbt_angle){
	NewtonMeshCalculateVertexNormals(o->_newton_dynamics_tnmesh_meshptr ,(bbt_angle*0.01745329252f));
}
void _newton_dynamics_TNMesh_ApplySphericalMapping_i(struct newton_dynamics_TNMesh_obj* o,BBINT bbt_material){
	NewtonMeshApplySphericalMapping(o->_newton_dynamics_tnmesh_meshptr ,bbt_material);
}
void _newton_dynamics_TNMesh_ApplyCylindricalMapping_ii(struct newton_dynamics_TNMesh_obj* o,BBINT bbt_cylinderMaterial,BBINT bbt_capMaterial){
	NewtonMeshApplyCylindricalMapping(o->_newton_dynamics_tnmesh_meshptr ,bbt_cylinderMaterial,bbt_capMaterial);
}
void _newton_dynamics_TNMesh_ApplyBoxMapping_iii(struct newton_dynamics_TNMesh_obj* o,BBINT bbt_front,BBINT bbt_side,BBINT bbt_top){
	NewtonMeshApplyBoxMapping(o->_newton_dynamics_tnmesh_meshptr ,bbt_front,bbt_side,bbt_top);
}
BBINT _newton_dynamics_TNMesh_IsOpenMesh(struct newton_dynamics_TNMesh_obj* o){
	return NewtonMeshIsOpenMesh(o->_newton_dynamics_tnmesh_meshptr );
}
void _newton_dynamics_TNMesh_FixTJoints(struct newton_dynamics_TNMesh_obj* o){
	NewtonMeshFixTJoints(o->_newton_dynamics_tnmesh_meshptr );
}
void _newton_dynamics_TNMesh_Polygonize(struct newton_dynamics_TNMesh_obj* o){
	NewtonMeshPolygonize(o->_newton_dynamics_tnmesh_meshptr );
}
void _newton_dynamics_TNMesh_Triangulate(struct newton_dynamics_TNMesh_obj* o){
	NewtonMeshTriangulate(o->_newton_dynamics_tnmesh_meshptr );
}
void _newton_dynamics_TNMesh_BeginFace(struct newton_dynamics_TNMesh_obj* o){
	NewtonMeshBeginFace(o->_newton_dynamics_tnmesh_meshptr );
}
void _newton_dynamics_TNMesh_AddFace_ipfii(struct newton_dynamics_TNMesh_obj* o,BBINT bbt_vertexCount,BBFLOAT* bbt_vertex,BBINT bbt_strideInBytes,BBINT bbt_materialIndex){
	NewtonMeshAddFace(o->_newton_dynamics_tnmesh_meshptr ,bbt_vertexCount,bbt_vertex,bbt_strideInBytes,bbt_materialIndex);
}
void _newton_dynamics_TNMesh_EndFace(struct newton_dynamics_TNMesh_obj* o){
	NewtonMeshEndFace(o->_newton_dynamics_tnmesh_meshptr );
}
BBINT _newton_dynamics_TNMesh_GetTotalFaceCount(struct newton_dynamics_TNMesh_obj* o){
	return NewtonMeshGetTotalFaceCount(o->_newton_dynamics_tnmesh_meshptr );
}
BBINT _newton_dynamics_TNMesh_GetTotalIndexCount(struct newton_dynamics_TNMesh_obj* o){
	return NewtonMeshGetTotalIndexCount(o->_newton_dynamics_tnmesh_meshptr );
}
BBINT _newton_dynamics_TNMesh_GetPointCount(struct newton_dynamics_TNMesh_obj* o){
	return NewtonMeshGetPointCount(o->_newton_dynamics_tnmesh_meshptr );
}
BBINT _newton_dynamics_TNMesh_GetPointStrideInByte(struct newton_dynamics_TNMesh_obj* o){
	return NewtonMeshGetPointStrideInByte(o->_newton_dynamics_tnmesh_meshptr );
}
BBDOUBLE* _newton_dynamics_TNMesh_GetPointArray(struct newton_dynamics_TNMesh_obj* o){
	return NewtonMeshGetPointArray(o->_newton_dynamics_tnmesh_meshptr );
}
BBDOUBLE* _newton_dynamics_TNMesh_GetNormalArray(struct newton_dynamics_TNMesh_obj* o){
	return NewtonMeshGetNormalArray(o->_newton_dynamics_tnmesh_meshptr );
}
BBDOUBLE* _newton_dynamics_TNMesh_GetUV0Array(struct newton_dynamics_TNMesh_obj* o){
	return NewtonMeshGetUV0Array(o->_newton_dynamics_tnmesh_meshptr );
}
BBDOUBLE* _newton_dynamics_TNMesh_GetUV1Array(struct newton_dynamics_TNMesh_obj* o){
	return NewtonMeshGetUV1Array(o->_newton_dynamics_tnmesh_meshptr );
}
BBINT _newton_dynamics_TNMesh_GetVertexCount(struct newton_dynamics_TNMesh_obj* o){
	return NewtonMeshGetVertexCount(o->_newton_dynamics_tnmesh_meshptr );
}
BBINT _newton_dynamics_TNMesh_GetVertexStrideInByte(struct newton_dynamics_TNMesh_obj* o){
	return NewtonMeshGetVertexStrideInByte(o->_newton_dynamics_tnmesh_meshptr );
}
BBDOUBLE* _newton_dynamics_TNMesh_MeshGetVertexArray(struct newton_dynamics_TNMesh_obj* o){
	return NewtonMeshGetVertexArray(o->_newton_dynamics_tnmesh_meshptr );
}
void _newton_dynamics_TNMesh_Destroy(struct newton_dynamics_TNMesh_obj* o){
	if(o->_newton_dynamics_tnmesh_meshptr ){
		NewtonMeshDestroy(o->_newton_dynamics_tnmesh_meshptr );
		o->_newton_dynamics_tnmesh_meshptr =0;
	}
}
struct BBDebugScope_27 newton_dynamics_TNMesh_scope ={
	BBDEBUGSCOPE_USERTYPE,
	"TNMesh",
	{
		{
			BBDEBUGDECL_FIELD,
			"meshPtr",
			"*b",
			.field_offset=offsetof(struct newton_dynamics_TNMesh_obj,_newton_dynamics_tnmesh_meshptr)
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"New",
			"()",
			&_newton_dynamics_TNMesh_New
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"ApplyTransform",
			"(:TNMatrix)",
			&_newton_dynamics_TNMesh_ApplyTransform_TTNMatrix
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"CalculateOOBB",
			"(:TNMatrix,f,f,f)",
			&_newton_dynamics_TNMesh_CalculateOOBB_TTNMatrixvfvfvf
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"CalculateVertexNormals",
			"(f)",
			&_newton_dynamics_TNMesh_CalculateVertexNormals_f
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"ApplySphericalMapping",
			"(i)",
			&_newton_dynamics_TNMesh_ApplySphericalMapping_i
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"ApplyCylindricalMapping",
			"(i,i)",
			&_newton_dynamics_TNMesh_ApplyCylindricalMapping_ii
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"ApplyBoxMapping",
			"(i,i,i)",
			&_newton_dynamics_TNMesh_ApplyBoxMapping_iii
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"IsOpenMesh",
			"()i",
			&_newton_dynamics_TNMesh_IsOpenMesh
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"FixTJoints",
			"()",
			&_newton_dynamics_TNMesh_FixTJoints
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"Polygonize",
			"()",
			&_newton_dynamics_TNMesh_Polygonize
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"Triangulate",
			"()",
			&_newton_dynamics_TNMesh_Triangulate
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"BeginFace",
			"()",
			&_newton_dynamics_TNMesh_BeginFace
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"AddFace",
			"(i,*f,i,i)",
			&_newton_dynamics_TNMesh_AddFace_ipfii
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"EndFace",
			"()",
			&_newton_dynamics_TNMesh_EndFace
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetTotalFaceCount",
			"()i",
			&_newton_dynamics_TNMesh_GetTotalFaceCount
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetTotalIndexCount",
			"()i",
			&_newton_dynamics_TNMesh_GetTotalIndexCount
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetPointCount",
			"()i",
			&_newton_dynamics_TNMesh_GetPointCount
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetPointStrideInByte",
			"()i",
			&_newton_dynamics_TNMesh_GetPointStrideInByte
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetPointArray",
			"()*d",
			&_newton_dynamics_TNMesh_GetPointArray
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetNormalArray",
			"()*d",
			&_newton_dynamics_TNMesh_GetNormalArray
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetUV0Array",
			"()*d",
			&_newton_dynamics_TNMesh_GetUV0Array
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetUV1Array",
			"()*d",
			&_newton_dynamics_TNMesh_GetUV1Array
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetVertexCount",
			"()i",
			&_newton_dynamics_TNMesh_GetVertexCount
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetVertexStrideInByte",
			"()i",
			&_newton_dynamics_TNMesh_GetVertexStrideInByte
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"MeshGetVertexArray",
			"()*d",
			&_newton_dynamics_TNMesh_MeshGetVertexArray
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"Destroy",
			"()",
			&_newton_dynamics_TNMesh_Destroy
		},
		BBDEBUGDECL_END
	}
};
struct BBClass_newton_dynamics_TNMesh newton_dynamics_TNMesh={
	&bbObjectClass,
	bbObjectFree,
	&newton_dynamics_TNMesh_scope,
	sizeof(struct newton_dynamics_TNMesh_obj),
	_newton_dynamics_TNMesh_New,
	bbObjectDtor,
	bbObjectToString,
	bbObjectCompare,
	bbObjectSendMessage,
	0,
	0,
	offsetof(struct newton_dynamics_TNMesh_obj,_newton_dynamics_tnmesh_meshptr) - sizeof(void*) + sizeof(BBBYTE*)
	,_newton_dynamics_TNMesh_ApplyTransform_TTNMatrix
	,_newton_dynamics_TNMesh_CalculateOOBB_TTNMatrixvfvfvf
	,_newton_dynamics_TNMesh_CalculateVertexNormals_f
	,_newton_dynamics_TNMesh_ApplySphericalMapping_i
	,_newton_dynamics_TNMesh_ApplyCylindricalMapping_ii
	,_newton_dynamics_TNMesh_ApplyBoxMapping_iii
	,_newton_dynamics_TNMesh_IsOpenMesh
	,_newton_dynamics_TNMesh_FixTJoints
	,_newton_dynamics_TNMesh_Polygonize
	,_newton_dynamics_TNMesh_Triangulate
	,_newton_dynamics_TNMesh_BeginFace
	,_newton_dynamics_TNMesh_AddFace_ipfii
	,_newton_dynamics_TNMesh_EndFace
	,_newton_dynamics_TNMesh_GetTotalFaceCount
	,_newton_dynamics_TNMesh_GetTotalIndexCount
	,_newton_dynamics_TNMesh_GetPointCount
	,_newton_dynamics_TNMesh_GetPointStrideInByte
	,_newton_dynamics_TNMesh_GetPointArray
	,_newton_dynamics_TNMesh_GetNormalArray
	,_newton_dynamics_TNMesh_GetUV0Array
	,_newton_dynamics_TNMesh_GetUV1Array
	,_newton_dynamics_TNMesh_GetVertexCount
	,_newton_dynamics_TNMesh_GetVertexStrideInByte
	,_newton_dynamics_TNMesh_MeshGetVertexArray
	,_newton_dynamics_TNMesh_Destroy
};

void _newton_dynamics_TNMatrix_New(struct newton_dynamics_TNMatrix_obj* o) {
	bbObjectCtor(o);
	o->clas = (BBClass*)&newton_dynamics_TNMatrix;
	o->_newton_dynamics_tnmatrix_frontx = .0f;
	o->_newton_dynamics_tnmatrix_fronty = .0f;
	o->_newton_dynamics_tnmatrix_frontz = .0f;
	o->_newton_dynamics_tnmatrix_frontw = .0f;
	o->_newton_dynamics_tnmatrix_upx = .0f;
	o->_newton_dynamics_tnmatrix_upy = .0f;
	o->_newton_dynamics_tnmatrix_upz = .0f;
	o->_newton_dynamics_tnmatrix_upw = .0f;
	o->_newton_dynamics_tnmatrix_rightx = .0f;
	o->_newton_dynamics_tnmatrix_righty = .0f;
	o->_newton_dynamics_tnmatrix_rightz = .0f;
	o->_newton_dynamics_tnmatrix_rightw = .0f;
	o->_newton_dynamics_tnmatrix_positx = .0f;
	o->_newton_dynamics_tnmatrix_posity = .0f;
	o->_newton_dynamics_tnmatrix_positz = .0f;
	o->_newton_dynamics_tnmatrix_positw = .0f;
}
struct newton_dynamics_TNMatrix_obj* newton_dynamics_TNMatrix_GetIdentityMatrix_TTNMatrix(){
	struct newton_dynamics_TNMatrix_obj* volatile bbt_matrix=bbObjectAtomicNew(&newton_dynamics_TNMatrix);
	bbt_matrix->_newton_dynamics_tnmatrix_frontx =1.00000000f;
	bbt_matrix->_newton_dynamics_tnmatrix_upy =1.00000000f;
	bbt_matrix->_newton_dynamics_tnmatrix_rightz =1.00000000f;
	bbt_matrix->_newton_dynamics_tnmatrix_positw =1.00000000f;
	return bbt_matrix;
}
void _newton_dynamics_TNMatrix_GetEulerAngles_vfvfvfvfvfvf(struct newton_dynamics_TNMatrix_obj* o,BBFLOAT* bbt_pitch0,BBFLOAT* bbt_yaw0,BBFLOAT* bbt_roll0,BBFLOAT* bbt_pitch1,BBFLOAT* bbt_yaw1,BBFLOAT* bbt_roll1){
	bmx_newtondynamics_matrix_GetEulerAngles((&o->_newton_dynamics_tnmatrix_frontx ),&(*bbt_pitch0),&(*bbt_yaw0),&(*bbt_roll0),&(*bbt_pitch1),&(*bbt_yaw1),&(*bbt_roll1));
}
struct BBDebugScope_19 newton_dynamics_TNMatrix_scope ={
	BBDEBUGSCOPE_USERTYPE,
	"TNMatrix",
	{
		{
			BBDEBUGDECL_FIELD,
			"frontX",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_frontx)
		},
		{
			BBDEBUGDECL_FIELD,
			"frontY",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_fronty)
		},
		{
			BBDEBUGDECL_FIELD,
			"frontZ",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_frontz)
		},
		{
			BBDEBUGDECL_FIELD,
			"frontW",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_frontw)
		},
		{
			BBDEBUGDECL_FIELD,
			"upX",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_upx)
		},
		{
			BBDEBUGDECL_FIELD,
			"upY",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_upy)
		},
		{
			BBDEBUGDECL_FIELD,
			"upZ",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_upz)
		},
		{
			BBDEBUGDECL_FIELD,
			"upW",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_upw)
		},
		{
			BBDEBUGDECL_FIELD,
			"rightX",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_rightx)
		},
		{
			BBDEBUGDECL_FIELD,
			"rightY",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_righty)
		},
		{
			BBDEBUGDECL_FIELD,
			"rightZ",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_rightz)
		},
		{
			BBDEBUGDECL_FIELD,
			"rightW",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_rightw)
		},
		{
			BBDEBUGDECL_FIELD,
			"positX",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_positx)
		},
		{
			BBDEBUGDECL_FIELD,
			"positY",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_posity)
		},
		{
			BBDEBUGDECL_FIELD,
			"positZ",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_positz)
		},
		{
			BBDEBUGDECL_FIELD,
			"positW",
			"f",
			.field_offset=offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_positw)
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"New",
			"()",
			&_newton_dynamics_TNMatrix_New
		},
		{
			BBDEBUGDECL_TYPEFUNCTION,
			"GetIdentityMatrix",
			"():TNMatrix",
			&newton_dynamics_TNMatrix_GetIdentityMatrix_TTNMatrix
		},
		{
			BBDEBUGDECL_TYPEMETHOD,
			"GetEulerAngles",
			"(f,f,f,f,f,f)",
			&_newton_dynamics_TNMatrix_GetEulerAngles_vfvfvfvfvfvf
		},
		BBDEBUGDECL_END
	}
};
struct BBClass_newton_dynamics_TNMatrix newton_dynamics_TNMatrix={
	&bbObjectClass,
	bbObjectFree,
	&newton_dynamics_TNMatrix_scope,
	sizeof(struct newton_dynamics_TNMatrix_obj),
	_newton_dynamics_TNMatrix_New,
	bbObjectDtor,
	bbObjectToString,
	bbObjectCompare,
	bbObjectSendMessage,
	0,
	0,
	offsetof(struct newton_dynamics_TNMatrix_obj,_newton_dynamics_tnmatrix_positw) - sizeof(void*) + sizeof(BBFLOAT)
	,newton_dynamics_TNMatrix_GetIdentityMatrix_TTNMatrix
	,_newton_dynamics_TNMatrix_GetEulerAngles_vfvfvfvfvfvf
};

static int __bb_newton_dynamics_dynamics_inited = 0;
int __bb_newton_dynamics_dynamics(){
	if (!__bb_newton_dynamics_dynamics_inited) {
		__bb_newton_dynamics_dynamics_inited = 1;
		__bb_brl_blitz_blitz();
		_bb_newton_dynamics_common();
		bbObjectRegisterType(&newton_dynamics_TNWorld);
		bbObjectRegisterType(&newton_dynamics_TNRayCastDelegate);
		bbObjectRegisterType(&newton_dynamics_TNCollision);
		bbObjectRegisterType(&newton_dynamics_TNTreeCollision);
		bbObjectRegisterType(&newton_dynamics_TNBody);
		bbObjectRegisterType(&newton_dynamics_TNMesh);
		bbObjectRegisterType(&newton_dynamics_TNMatrix);
		return 0;
	}
	return 0;
}