UNPKG

1.09 kBTypeScriptView Raw
1import { CoordinateSystem } from "../constants.js";
2import { Object3D } from "../core/Object3D.js";
3import { Sprite } from "../objects/Sprite.js";
4import { Box3 } from "./Box3.js";
5import { Matrix4 } from "./Matrix4.js";
6import { Plane } from "./Plane.js";
7import { Sphere } from "./Sphere.js";
8import { Vector3 } from "./Vector3.js";
9
10/**
11 * Frustums are used to determine what is inside the camera's field of view. They help speed up the rendering process.
12 */
13export class Frustum {
14 constructor(p0?: Plane, p1?: Plane, p2?: Plane, p3?: Plane, p4?: Plane, p5?: Plane);
15
16 /**
17 * Array of 6 vectors.
18 */
19 planes: Plane[];
20
21 set(p0: Plane, p1: Plane, p2: Plane, p3: Plane, p4: Plane, p5: Plane): Frustum;
22 clone(): this;
23 copy(frustum: Frustum): this;
24 setFromProjectionMatrix(m: Matrix4, coordinateSystem?: CoordinateSystem): this;
25 intersectsObject(object: Object3D): boolean;
26 intersectsSprite(sprite: Sprite): boolean;
27 intersectsSphere(sphere: Sphere): boolean;
28 intersectsBox(box: Box3): boolean;
29 containsPoint(point: Vector3): boolean;
30}