IPhysicsEngine

interface IPhysicsEngine

Represents the physics engine in Protogame.

void Update(IGameContext gameContext, IUpdateContext updateContext)
Parameters:
  • gameContext (Protogame.IGameContext) –
  • updateContext (Protogame.IUpdateContext) –
void Update(Protogame.IServerContext serverContext, IUpdateContext updateContext)
Parameters:
  • serverContext (Protogame.IServerContext) –
  • updateContext (Protogame.IUpdateContext) –
void RegisterRigidBodyForHasMatrixInCurrentWorld(RigidBody rigidBody, IHasTransform hasTransform, bool staticAndImmovable)
Parameters:
  • rigidBody (Jitter.Dynamics.RigidBody) –
  • hasTransform (Protogame.IHasTransform) –
  • staticAndImmovable (bool) –
void UnregisterRigidBodyForHasMatrixInCurrentWorld(RigidBody rigidBody, IHasTransform hasTransform)
Parameters:
  • rigidBody (Jitter.Dynamics.RigidBody) –
  • hasTransform (Protogame.IHasTransform) –
void DebugRender(IGameContext gameContext, IRenderContext renderContext)
Parameters:
  • gameContext (Protogame.IGameContext) –
  • renderContext (Protogame.IRenderContext) –
JitterWorld GetInternalPhysicsWorld()
Protogame.PhysicsMetrics GetPhysicsMetrics()
bool Raycast(Ray ray, Protogame.PhysicsRaycastCallback callback, ref RigidBody rigidBody, ref System.Object owner, ref Vector3 normal, ref float distance)
Parameters:
  • ray (Microsoft.Xna.Framework.Ray) –
  • callback (Protogame.PhysicsRaycastCallback) –
  • (ref) rigidBody (Jitter.Dynamics.RigidBody) –
  • (ref) owner (System.Object) –
  • (ref) normal (Microsoft.Xna.Framework.Vector3) –
  • (ref) distance (float) –