AABB
APJS Script API reference for the AABB class.
| Type | Name | Interface Description |
|---|---|---|
| Variables | maxX: number | • Function: The max point-X of the box. |
| Variables | maxY: number | • Function: The max point-Y of the box. |
| Variables | maxZ: number | • Function: The max point-Z of the box. |
| Variables | minX: number | • Function: The minimal point-X of the box. |
| Variables | minY: number | • Function: The minimal point-Y of the box. |
| Variables | minZ: number | • Function: The minimal point-Z of the box. |
| Functions | constructor() | |
| Functions | constructor(min?: Vector3f, max?: Vector3f) | Parameters • • |
| Functions | clone(): AABB | • Function: Returns a clone of this AABB. Returns A new instance of AABB with the same properties as this one. |
| Functions | equals(v: AABB): boolean | • Function: Returns whether this AABB is equal to the specified Parameters • Returns A boolean indicating whether the two AABBs are equal. |
| Functions | intersects(other: AABB): boolean | • Function: Determines if the current AABB intersects with another AABB. Parameters • Returns A boolean indicating whether the two AABBs intersect. |
| Functions | toString(): string | • Function: Returns a string representation of the AABB. Returns The string representation of the AABB. |
Examples
constructor()
let obj = new APJS.AABB();
constructor(min?: Vector3f, max?: Vector3f)
let obj = new APJS.AABB();
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use AABB here
}
onUpdate(deltaTime: number) {
}
}