public override void Update(GameSettings settings, GameTime gameTime) { base.Update(settings, gameTime); PolyShapesCallback callback = new PolyShapesCallback(); callback.Circle.Radius = 2.0f; callback.Circle.Position = new Vector2(0.0f, 1.1f); callback.Transform.SetIdentity(); callback.DebugDraw = DebugView; AABB aabb; callback.Circle.ComputeAABB(out aabb, ref callback.Transform, 0); DebugView.BeginCustomDraw(ref GameInstance.Projection, ref GameInstance.View); World.QueryAABB(callback.ReportFixture, ref aabb); Color color = new Color(0.4f, 0.7f, 0.8f); DebugView.DrawCircle(callback.Circle.Position, callback.Circle.Radius, color); DebugView.EndCustomDraw(); DrawString("Press 1-5 to drop stuff"); DrawString("Press a to (de)activate some bodies"); DrawString("Press d to destroy a body"); }
public override void Update(GameSettings settings, GameTime gameTime) { base.Update(settings, gameTime); PolyShapesCallback callback = new PolyShapesCallback(); callback.Circle.Radius = 2.0f; callback.Circle.Position = new Vector2(0.0f, 1.1f); callback.Transform.SetIdentity(); callback.DebugDraw = DebugView; AABB aabb; callback.Circle.ComputeAABB(out aabb, ref callback.Transform, 0); DebugView.BeginCustomDraw(ref GameInstance.Projection, ref GameInstance.View); World.QueryAABB(callback.ReportFixture, ref aabb); Color color = new Color(0.4f, 0.7f, 0.8f); DebugView.DrawCircle(callback.Circle.Position, callback.Circle.Radius, color); DebugView.EndCustomDraw(); DrawString("Press 1-5 to drop stuff"); DrawString("Press a to (de)activate some bodies"); DrawString("Press d to destroy a body"); }