6.5 KiB
Planck.js API Doc › Globals › AABB
Class: AABB
Hierarchy
- AABB
Callable
▸ AABB(lower?: Vec2, upper?: Vec2): AABB
Defined in collision/index.d.ts:34
Parameters:
| Name | Type |
|---|---|
lower? |
Vec2 |
upper? |
Vec2 |
Returns: AABB
Index
Properties
Methods
- areEqual
- assert
- combine
- combinePoints
- constroctor
- contains
- diff
- extend
- getCenter
- getExtents
- getPerimeter
- isValid
- rayCast
- set
- testOverlap
- toString
Properties
lowerBound
• lowerBound: Vec2
Defined in collision/index.d.ts:45
upperBound
• upperBound: Vec2
Defined in collision/index.d.ts:46
Methods
areEqual
▸ areEqual(a: AABB, b: AABB): boolean
Defined in collision/index.d.ts:42
Parameters:
| Name | Type |
|---|---|
a |
AABB |
b |
AABB |
Returns: boolean
assert
▸ assert(o: any): void
Defined in collision/index.d.ts:39
Parameters:
| Name | Type |
|---|---|
o |
any |
Returns: void
combine
▸ combine(a: AABB, b: AABB): void
Defined in collision/index.d.ts:52
Parameters:
| Name | Type |
|---|---|
a |
AABB |
b |
AABB |
Returns: void
combinePoints
▸ combinePoints(a: Vec2, b: Vec2): void
Defined in collision/index.d.ts:53
Parameters:
| Name | Type |
|---|---|
a |
Vec2 |
b |
Vec2 |
Returns: void
constroctor
▸ constroctor(lower?: Vec2, upper?: Vec2): any
Defined in collision/index.d.ts:36
Parameters:
| Name | Type |
|---|---|
lower? |
Vec2 |
upper? |
Vec2 |
Returns: any
contains
▸ contains(aabb: AABB): boolean
Defined in collision/index.d.ts:55
Parameters:
| Name | Type |
|---|---|
aabb |
AABB |
Returns: boolean
diff
▸ diff(a: AABB, b: AABB): number
Defined in collision/index.d.ts:43
Parameters:
| Name | Type |
|---|---|
a |
AABB |
b |
AABB |
Returns: number
extend
▸ extend(aabb: AABB, value: number): void
Defined in collision/index.d.ts:40
Parameters:
| Name | Type |
|---|---|
aabb |
AABB |
value |
number |
Returns: void
▸ extend(value: number): AABB
Defined in collision/index.d.ts:56
Parameters:
| Name | Type |
|---|---|
value |
number |
Returns: AABB
getCenter
▸ getCenter(): Vec2
Defined in collision/index.d.ts:49
Returns: Vec2
getExtents
▸ getExtents(): Vec2
Defined in collision/index.d.ts:50
Returns: Vec2
getPerimeter
▸ getPerimeter(): number
Defined in collision/index.d.ts:51
Returns: number
isValid
▸ isValid(o: any): boolean
Defined in collision/index.d.ts:38
Parameters:
| Name | Type |
|---|---|
o |
any |
Returns: boolean
▸ isValid(): boolean
Defined in collision/index.d.ts:48
Returns: boolean
rayCast
▸ rayCast(output: RayCastOutput, input: RayCastInput): boolean
Defined in collision/index.d.ts:57
Parameters:
| Name | Type |
|---|---|
output |
RayCastOutput |
input |
RayCastInput |
Returns: boolean
set
▸ set(aabb: AABB): void
Defined in collision/index.d.ts:54
Parameters:
| Name | Type |
|---|---|
aabb |
AABB |
Returns: void
testOverlap
▸ testOverlap(a: AABB, b: AABB): boolean
Defined in collision/index.d.ts:41
Parameters:
| Name | Type |
|---|---|
a |
AABB |
b |
AABB |
Returns: boolean
toString
▸ toString(): string
Defined in collision/index.d.ts:58
Returns: string