' Type : TPhysic
'Functions

Rem
bbdoc:
End Rem
Function InitPhysic:TPhysic()
	Return TPhysic.init()
End Function

'Methods

Rem
bbdoc:
End Rem
Function SetWorldSize(World:TPhysic,V1:TVector,V2:TVector)
	World.SetWorldSize(V1,V2)
End Function

Rem
bbdoc:
End Rem
Function SetPhysicModel(World:TPhysic,SolverModel:Int,FrictionModel:Int)
	World.SetPhysicModel(SolverModel,FrictionModel)
End Function

Rem
bbdoc:
End Rem
Function PhysicUpdate(World:TPhysic,UpTime:Float = - 1.0)
	World.Update(UpTime:Float = - 1.0)
End Function

Rem
bbdoc:
End Rem
Function AddPhysicMaterial(World:TPhysic,Material:TPhysicMaterial)
	World.AddMaterial(Material)
End Function

Rem
bbdoc:
End Rem
Function BuildPhysicMaterialLibraries(World:TPhysic,BuildOption:Int = PHYS_MATERIAL_AVERAGE)
	World.BuildMaterialLibraries(BuildOption)
End Function

Rem
bbdoc:
End Rem
Function SetPhysicMaterialCollision(World:TPhysic,M1:Object,M2:Object,state:Int = 1)
	World.SetMaterialCollision(M1,M2,state)
End Function

Rem
bbdoc:
End Rem
Function AddNewtonObject(World:TPhysic,NO:TNewtonObject)
	World.AddObject(NO)
End Function

Rem
bbdoc:
End Rem
Function GetNode:Byte Ptr(World:TPhysic,mesh:TEntity)
	Return World.GetNode(mesh:TEntity)
End Function

Rem
bbdoc:
End Rem
Function GetPhysicTime:Float(World:TPhysic)
	Return World.GetPhysicTime()
End Function

Rem
bbdoc:
End Rem
Function GetActiveBodyCount:Int(World:TPhysic)
	Return World.GetActiveBodyCount()
End Function

Rem
bbdoc:
End Rem
Function GetUnActiveBodyCount:Int(World:TPhysic)
	Return World.GetUnActiveBodyCount()
End Function

Rem
bbdoc:
End Rem
Function ApplyImpulse(World:TPhysic,mesh:TEntity,impactX:Float,ImpactY:Float,ImpactZ:Float,ForceX:Float,ForceY:Float,ForceZ:Float)
	World.ApplyImpulse(mesh:TEntity,impactX,ImpactY,ImpactZ,ForceX,ForceY,ForceZ)
End Function

Rem
bbdoc:
End Rem
Function SetDefaultElasticity(World:TPhysic,Value:Float)
	World.SetDefaultElasticity(Value)
End Function

Rem
bbdoc:
End Rem
Function SetDefaultFriction(World:TPhysic,staticFriction:Float,kineticfriction:Float)
	World.SetDefaultFriction(staticFriction,kineticfriction)
End Function

Rem
bbdoc:
End Rem
Function SetDefaultSoftiness(World:TPhysic,Value:Float)
	World.SetDefaultSoftiness(Value)
End Function

Rem
bbdoc:
End Rem
Function SetBodyMaterial(World:TPhysic,NObject:TNewtonObject,MAterial:Object)
	World.SetBodyMaterial(NObject,MAterial)
End Function

Rem
bbdoc:
End Rem
Function SetCollisionMode(World:TPhysic,Material1:Object,Material2:Object,Mode:Int = PHYS_NORMAL_COLLISION)
	World.SetCollisionMode(Material1,Material2,Mode)
End Function

Rem
bbdoc:
End Rem
Function DestroyBody(World:TPhysic,mesh:TMesh)
	World.DestroyBody(mesh)
End Function

' Type : TConstrait
'Functions

'Methods

Rem
bbdoc:
End Rem
Function SetConstraitCollisionState(Constrait:TConStrait,state:Int = 0)
	Constrait.SetCollisionState(state)
End Function

Rem
bbdoc:
End Rem
Function SetConstraitStiffness(Constrait:TConStrait,stiffiness:Float)
	Constrait.SetStiffness(stiffiness)
End Function

Rem
bbdoc:
End Rem
Function GetConstraitStiffiness:Float(Constrait:TConStrait)
	Return Constrait.GetStiffiness()
End Function

Rem
bbdoc:
End Rem
Function Destroy(Constrait:TConStrait)
	Constrait.Destroy()
End Function

' Type : TBallConstrait
'Functions

Rem
bbdoc:
End Rem
Function CreateBallConstrait:TBallConstrait(WorldPosition:TVector,body0:TNewtonObject,body1:TNewtonObject)
	Return TBallConstrait.Create:TBallConstrait(WorldPosition,body0,body1)
End Function

'Methods

Rem
bbdoc:
End Rem
Function BallConstraitSetConeLimits(BallConstrait:TBallConStrait,Vector:TVector,maxConeAngle:Float,MaxTwistAngle:Float)
	BallConstrait.SetConeLimits(Vector:TVector,maxConeAngle,MaxTwistAngle)
End Function

Rem
bbdoc:
End Rem
Function BallConstraitGetForce:TVector(BallConstrait:TBallConStrait)
	Return BallConstrait.GetForce()
End Function

' Type : TContactInfo
'Functions

'Methods

Rem
bbdoc:
End Rem
Function ContactInfo(Info:TContactInfo)
	Info.Info()
End Function

Rem
bbdoc:
End Rem
Function OverrideElasticity(Contactinfo:TContactInfo,value:Float)
	ContactInfo.OverrideElasticity(value)
End Function

Rem
bbdoc:
End Rem
Function OverrideFrictionState(Contactinfo:TContactInfo,state:Int , id:Int = 0)
	ContactInfo.OverrideFrictionState(state, id)
End Function

Rem
bbdoc:
End Rem
Function OverrideSoftness(Contactinfo:TContactInfo,Value:Float)
	ContactInfo.OverrideSoftness(Value)
End Function

Rem
bbdoc:
End Rem
Function OverrideStaticFriction(Contactinfo:TContactInfo,Value:Float,id:Int=0)
	ContactInfo.OverrideStaticFriction(Value,id)
End Function

Rem
bbdoc:
End Rem
Function OverrideKineticFriction(Contactinfo:TContactInfo,Value:Float,id:Int = 0)
	ContactInfo.OverrideKineticFriction(Value,id)
End Function

Rem
bbdoc:
End Rem
Function OverrideNormalAcceleration(Contactinfo:TContactInfo,value:Float)
	ContactInfo.OverrideNormalAcceleration(value)
End Function

Rem
bbdoc:
End Rem
Function OverrideNormalDirection(Contactinfo:TContactInfo,Value:TVector)
	ContactInfo.OverrideNormalDirection(Value)
End Function

Rem
bbdoc:
End Rem
Function OverrideTangentAcceleration(Contactinfo:TContactInfo,Value:Float,id:Int = 0)
	ContactInfo.OverrideTangentAcceleration(Value,id)
End Function

' Type : TNewtonObject
'Functions

Rem
bbdoc:
End Rem
Function PhysicObjectCreate:TNewtonObject(Mesh:TMesh,T:Int = 0)
	Return TNewtonObject.Create(Mesh,T)
End Function

'Methods

Rem
bbdoc:
End Rem
Function PhxObjOmegaToString:String(NewtonObject:TNewtonObject)
	Return NewtonObject.OmegaToString()
End Function

Rem
bbdoc:
End Rem
Function PhxObjVelocityToString:String(NewtonObject:TNewtonObject)
	Return NewtonObject.VelocityToString()
End Function

Rem
bbdoc:
End Rem
Function PhxObjGetVelocity:TVector(NewtonObject:TNewtonObject)
	Return NewtonObject.GetVelocity()
End Function

Rem
bbdoc:
End Rem
Function PhxObjGetPosition:TVector(NewtonObject:TNewtonObject)
	Return NewtonObject.GetPosition()
End Function

Rem
bbdoc:
End Rem
Function PhxObjSetRotation(NewtonObject:TNewtonObject,Pitch# , Roll# , Yaw#)
	NewtonObject.SetRotation(Pitch# , Roll# , Yaw#)
End Function



Rem
bbdoc:
End Rem
Function PhxObjSetMass(NewtonObject:TNewtonObject,Mass:Float)
	NewtonObject.SetMass(Mass)
End Function

Rem
bbdoc:
End Rem
Function PhxObjSetCollisionMode(NewtonObject:TNewtonObject,Mode:Int = PHYS_NORMAL_COLLISION)
	NewtonObject.SetCollisionMode(Mode)
End Function

Rem
bbdoc:
End Rem
Function PhxObjSetAutoSleep(NewtonObject:TNewtonObject,State:Int = 1)
	NewtonObject.SetAutoSleep(State)
End Function

Rem
bbdoc:
End Rem
Function PhxObjSetSleepTreshold(NewtonObject:TNewtonObject,speedmag:Float,omegamag:Float,frames:Int)
	NewtonObject.SetSleepTreshold(speedmag,omegamag,frames)
End Function

Rem
bbdoc:
End Rem
Function PhxObjSetUserForceCallback(NewtonObject:TNewtonObject,Callback(NewtonObject:TNewtonObject))
	NewtonObject.SetUserForceCallback(Callback)
End Function

Rem
bbdoc:
End Rem
Function PhxObjGetRotation:String(NewtonObject:TNewtonObject)
	Return NewtonObject.GetRotation()
End Function

' Type : TPhysicMaterial
'Functions

Rem
bbdoc:
End Rem
Function CreatePhysicMaterial:TPhysicMaterial(Name:String)
	Return TPhysicMaterial.Create(Name)
End Function

'Methods

Rem
bbdoc:
End Rem
Function PhxMaterialSetFriction(PhysicMaterial:TPhysicMaterial,staticFriction:Float,KineticFriction:Float)
	PhysicMaterial.SetFriction(staticFriction,KineticFriction)
End Function

Rem
bbdoc:
End Rem
Function PhxMaterialSetSoftness(PhysicMaterial:TPhysicMaterial,Softness:Float)
	PhysicMaterial.SetSoftness(Softness)
End Function

Rem
bbdoc:
End Rem
Function PhxMaterialSetElasticity(PhysicMaterial:TPhysicMaterial,Elasticity:Float)
	PhysicMaterial.SetElasticity(Elasticity)
End Function



