Kiwi.Geom.AABB Class
An object representation of an axis-aligned bounding box.
Constructor
Kiwi.Geom.AABB
(
Kiwi.Geom.AABB
-
cx
-
cy
-
width
-
height
Parameters:
-
cx
Number -
cy
Number -
width
Number -
height
Number
Returns:
Item Index
Methods
Methods
draw
(
Kiwi.Geom.AABB
public
-
ctx
Draws the object to a canvas
Parameters:
-
ctx
CanvasRenderingContext2DThe context you want this drawn to.
Returns:
fromRect
(
Kiwi.Geom.AABB
public
-
rect
Gives the dimension of this AABB from a rectangle's.
Parameters:
-
rect
Kiwi.Geom.Rectangle
Returns:
objType
()
String
public
Returns the type of this object
Returns:
String:
The type of this object
setPosition
(
Kiwi.Geom.AABB
public
-
cx
-
cy
Sets the position of the object.
Parameters:
-
cx
Number -
cy
Number
Returns:
setPositionPoint
(
Kiwi.Geom.AABB
public
-
pos
Sets the position of the object by a point that you pass.
Parameters:
-
pos
Point
Returns:
Properties
cx
Number
public
cy
Number
public
halfHeight
Number
public
Half of the height.
halfWidth
Number
public
Half of the width.
height
Number
public
Returns the full height. This is read only.
width
Number
public
Returns the full width. This is read only.