nape.util.Debug
Top
|
Static Methods
|
Instance Properties
|
Instance Methods
Overview
nape
nape.callbacks
nape.constraint
nape.dynamics
nape.geom
nape.hacks
nape.phys
nape.shape
nape.space
nape.symbolic
nape.util
type
class
subclasses
nape.util.BitmapDebug
,
nape.util.ShapeDebug
Debug class providing general utilities
Also serves as the base type for Debug draws.
Static Methods
static function
clearObjectPools
():
Void
Force clear all object pools, both internal and public.
static function
createGraphic
(body:
nape.phys.Body
):
flash.display.Shape
Create a flash/nme Shape representing the given Body.
static function
version
():
String
Query Nape version
Instance Properties
var
bgColour
:
Int
Background colour for debug draw display.
var
colour
:
Null
<
Int
->
Int
> = null
User defined colour picking.
var
cullingEnabled
:
Bool
= false
When true, objects outside the debug draw screen will not be drawn.
readonly var
display
:
flash.display.DisplayObject
The flash/nme native display object representing debug draw.
var
drawBodies
:
Bool
= true
If true, then all bodies in the space (whether active or not) will be drawn.
var
drawBodyDetail
:
Bool
= false
If true, then things like the body centre of mass, and bouncing box will be drawn.
var
drawCollisionArbiters
:
Bool
= false
If true, a representation of contact patches will be drawn.
var
drawConstraints
:
Bool
= false
If true, then representations of the active constraints will be drawn.
var
drawFluidArbiters
:
Bool
= false
If true, a representation of centres of buoyancy and overlap will be drawn.
var
drawSensorArbiters
:
Bool
= false
If true, a representation of sensor interactions will be drawn.
var
drawShapeAngleIndicators
:
Bool
= true
If true, then indicators of the shapes rotation will be drawn.
var
drawShapeDetail
:
Bool
= false
If true, then things like shape centre of mass and bounding box will be drawn.
var
transform
:
nape.geom.Mat23
= new Mat23()
Transformation to apply to all debug draw operations.
Instance Methods
function
clear
():
Void
Clear the debug view.
function
draw
(object:
Dynamic
):
Void
Draw a Nape object to debug draw.
function
drawAABB
(aabb:
nape.geom.AABB
, colour:
Int
):
Void
Draw AABB.
function
drawCircle
(position:
nape.geom.Vec2
, radius:
Float
, colour:
Int
):
Void
Draw circle.
function
drawCurve
(start:
nape.geom.Vec2
, control:
nape.geom.Vec2
, end:
nape.geom.Vec2
, colour:
Int
):
Void
Draw quadratic bezier curve.
function
drawFilledCircle
(position:
nape.geom.Vec2
, radius:
Float
, colour:
Int
):
Void
Draw filled circle.
function
drawFilledPolygon
(polygon:
Dynamic
, colour:
Int
):
Void
Draw filled polygon.
function
drawFilledTriangle
(p0:
nape.geom.Vec2
, p1:
nape.geom.Vec2
, p2:
nape.geom.Vec2
, colour:
Int
):
Void
Draw filled triangle.
function
drawLine
(start:
nape.geom.Vec2
, end:
nape.geom.Vec2
, colour:
Int
):
Void
Draw a line segment.
function
drawPolygon
(polygon:
Dynamic
, colour:
Int
):
Void
Draw polygon.
function
drawSpring
(start:
nape.geom.Vec2
, end:
nape.geom.Vec2
, colour:
Int
, coils:
Int
= 3, radius:
Float
= 3.0):
Void
Draw linear spring.
function
flush
():
Void
Flush any pending draw operations to debug view.