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