nape.util.BitmapDebug

type
class
extends
Debug
BitmapDebug available on flash10+ only.

This debug draw makes use of Alchemy opcodes so you may wish to forgo it if you do not want to be subjcet to Adobe licensing rules should you also be using Stage3D.

This debug draw draws things pixel by pixel into alchemy memory, flushing to a BitmapData object. Believe it or not, this is in almost all cases 'faster' than flash's built in graphics API.

Constructor

function new(width:Int, height:Int, bgColour:Int = 0x333333, transparent:Bool = false)
+ Construct new BitmapDebug object.

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 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
+ Draw a line segment.

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.

function flush():Void

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

function prepare():Void

+ Prepare BitmapDebug for operations.