BoundingBox2D
Pengamatan umum
BoundingBox2D adalah kelas di Aspose.3d untuk Typescript. Warisan dari: ̋BountingBox3D∂ .
BoundingBox2D.constructor (()) membuat kotak pengukur 2‐D yang kosong.
Sifat-sifatnya
| Name | Type | Access | Description |
|---|---|---|---|
extent | BoundingBoxExtent | Read | Represents the type of extent used by the bounding box |
minimum | Vector2 | Read | Holds the minimum corner coordinates of the box as a Vector2 |
maximum | Vector2 | Read |
Metode-metode yang digunakan
| Signature | Description |
|---|---|
constructor() | Creates a box from min and max vectors |
constructor(minimum: Vector2, maximum: Vector2) | |
constructor(minX: number, minY: number, maxX: number, maxY: number) | |
constructor() | |
merge(pt: Vector2) | Expands the box to include another bounding box |
merge(bb: BoundingBox2D) | |
merge() | |
getCenter() → Vector2 | Returns the center point of the box as a Vector2 |
getSize() → Vector2 | Returns the width and height of the box as a Vector2 |
overlapsWith(box: BoundingBox2D) → boolean | Returns true if the two boxes intersect |
null() → BoundingBox2D | Returns a bounding box with no area (empty) |
infinite() → BoundingBox2D | Returns a bounding box that spans infinite extents |