nape.util.ShapeDebug

type
class
extends
Debug
Implementation of nape debug draw using flash/nme graphics API.

This debug draw is slower than BitmapDebug which is available in flash10+ however the BitmapDebug draw makes use of Alchemy opcodes so you may wish not to use it if you are also using Stage3D and do not wish to be subject to Adobe licensing.

Constructor

function new(width:Int, height:Int, bgColour:Int = 0x333333)
+ Construct new ShapeDebug with given viewport size and backgruond.

Instance Properties hide inherited show inherited

var bgColour : Int

inherited from nape.util.Debug
+ Background colour for debug draw display.

var colour : Null<Int -> Int> = null

inherited from nape.util.Debug
+ User defined colour picking.

var cullingEnabled : Bool = false

inherited from nape.util.Debug
+ When true, objects outside the debug draw screen will not be drawn.

readonly var display : flash.display.DisplayObject

inherited from nape.util.Debug
+ The flash/nme native display object representing debug draw.

var drawBodies : Bool = true

inherited from nape.util.Debug
If true, then all bodies in the space (whether active or not) will be drawn.

var drawBodyDetail : Bool = false

inherited from nape.util.Debug
+ If true, then things like the body centre of mass, and bouncing box will be drawn.

var drawCollisionArbiters : Bool = false

inherited from nape.util.Debug
+ If true, a representation of contact patches will be drawn.

var drawConstraints : Bool = false

inherited from nape.util.Debug
If true, then representations of the active constraints will be drawn.

var drawFluidArbiters : Bool = false

inherited from nape.util.Debug
+ If true, a representation of centres of buoyancy and overlap will be drawn.

var drawSensorArbiters : Bool = false

inherited from nape.util.Debug
+ If true, a representation of sensor interactions will be drawn.

var drawShapeAngleIndicators : Bool = true

inherited from nape.util.Debug
+ If true, then indicators of the shapes rotation will be drawn.

var drawShapeDetail : Bool = false

inherited from nape.util.Debug
+ If true, then things like shape centre of mass and bounding box will be drawn.

var thickness : Float = 0.1

Thickness to draw lines with.

var transform : nape.geom.Mat23 = new Mat23()

inherited from nape.util.Debug
+ Transformation to apply to all debug draw operations.

Instance Methods hide inherited show inherited

function clear():Void

overrides nape.util.Debug
Clear the debug view.

function draw(object:Dynamic):Void

overrides nape.util.Debug
+ Draw a Nape object to debug draw.

function drawAABB(aabb:nape.geom.AABB, colour:Int):Void

overrides nape.util.Debug
+ Draw AABB.

function drawCircle(position:nape.geom.Vec2, radius:Float, colour:Int):Void

overrides nape.util.Debug
+ Draw circle.

function drawCurve(start:nape.geom.Vec2, control:nape.geom.Vec2, end:nape.geom.Vec2, colour:Int):Void

overrides nape.util.Debug
+ Draw quadratic bezier curve.

function drawFilledCircle(position:nape.geom.Vec2, radius:Float, colour:Int):Void

overrides nape.util.Debug
+ Draw filled circle.

function drawFilledPolygon(polygon:Dynamic, colour:Int):Void

overrides nape.util.Debug
+ Draw filled polygon.

function drawFilledTriangle(p0:nape.geom.Vec2, p1:nape.geom.Vec2, p2:nape.geom.Vec2, colour:Int):Void

overrides nape.util.Debug
+ Draw filled triangle.

function drawLine(start:nape.geom.Vec2, end:nape.geom.Vec2, colour:Int):Void

overrides nape.util.Debug

function drawPolygon(polygon:Dynamic, colour:Int):Void

overrides nape.util.Debug
+ Draw polygon.

function drawSpring(start:nape.geom.Vec2, end:nape.geom.Vec2, colour:Int, coils:Int = null, radius:Float = null):Void

overrides nape.util.Debug
+ Draw linear spring.

flush():Void

inherited from nape.util.Debug
+ Flush any pending draw operations to debug view.