/* Original source Farseer Physics Engine: * Copyright (c) 2014 Ian Qvist, http://farseerphysics.codeplex.com * Microsoft Permissive License (Ms-PL) v1.1 */ /* * Farseer Physics Engine: * Copyright (c) 2012 Ian Qvist */ using Microsoft.Xna.Framework; using FarseerPhysics.Common; using FarseerPhysics.Dynamics; namespace FarseerPhysics.Diagnostics { /// Implement and register this class with a World to provide debug drawing of physics /// entities in your game. public abstract class DebugViewBase { protected DebugViewBase(World world) { World = world; } protected World World { get; private set; } /// /// Gets or sets the debug view flags. /// /// The flags. public DebugViewFlags Flags { get; set; } /// /// Append flags to the current flags. /// /// The flags. public void AppendFlags(DebugViewFlags flags) { Flags |= flags; } /// /// Remove flags from the current flags. /// /// The flags. public void RemoveFlags(DebugViewFlags flags) { Flags &= ~flags; } /// /// Draw a closed polygon provided in CCW order. /// /// The vertices. /// The vertex count. /// The color value. //public abstract void DrawPolygon(Vector2[] vertices, int count, Color color, bool closed = true); /// /// Draw a solid closed polygon provided in CCW order. /// /// The vertices. /// The vertex count. /// The color value. //public abstract void DrawSolidPolygon(Vector2[] vertices, int count, Color color); /// /// Draw a circle. /// /// The center. /// The radius. /// The color value. //public abstract void DrawCircle(Vector2 center, float radius, Color color); /// /// Draw a solid circle. /// /// The center. /// The radius. /// The axis. /// The color value. //public abstract void DrawSolidCircle(Vector2 center, float radius, Vector2 axis, Color color); /// /// Draw a line segment. /// /// The start. /// The end. /// The color value. //public abstract void DrawSegment(Vector2 start, Vector2 end, Color color); /// /// Draw a transform. Choose your own length scale. /// /// The transform. //public abstract void DrawTransform(ref Transform transform); } }