Returns an axis-aligned bounding box object.
Name | Type | Default | Description |
---|---|---|---|
x |
Number | 0 |
optional
The X coordinate of the upper-left corner of the aabb. |
y |
Number | 0 |
optional
The Y coordinate of the upper-left corner of the aabb. |
width |
Number | 0 |
optional
The width of this aabb. |
height |
Number | 0 |
optional
The height of this aabb. |
Members
-
The center point of this aabb.
-
The overall height range of this aabb.
-
The overall width range of this aabb.
Methods
-
aabb2obb ()OBB
-
Transforms this object into a new OBB object and returns.
Returns:
Type Description OBB -
aabb2sphere ()Sphere
-
Transforms this object into a new Sphere object and returns.
Returns:
Type Description Sphere -
Checks whether the aabb object given are contained within this aabb.
Name Type Description aabb
AABB The aabb object of test
-
Checks whether the obb object given are contained within this aabb.
Name Type Description obb
OBB The obb object of test
-
Checks whether the point object given are contained within this aabb.
Name Type Description point
Point The point object of test.
-
points ()Array.<Point>
-
Get an array of point objects that span the four vertices of this aabb.
Returns:
Type Description Array.<Point> -
Checks whether the sphere object given are contained within this aabb.
Name Type Description sphere
Sphere The sphere object of test