Box3.d.ts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { Vector3 } from './Vector3';
  2. import { Object3D } from './../core/Object3D';
  3. import { Sphere } from './Sphere';
  4. import { Plane } from './Plane';
  5. import { Matrix4 } from './Matrix4';
  6. export class Box3 {
  7. constructor(min?: Vector3, max?: Vector3);
  8. max: Vector3;
  9. min: Vector3;
  10. set(min: Vector3, max: Vector3): this;
  11. setFromArray(array: ArrayLike<number>): this;
  12. setFromPoints(points: Vector3[]): this;
  13. setFromCenterAndSize(center: Vector3, size: Vector3): this;
  14. setFromObject(object: Object3D): this;
  15. clone(): this;
  16. copy(box: Box3): this;
  17. makeEmpty(): this;
  18. isEmpty(): boolean;
  19. getCenter(target: Vector3): Vector3;
  20. getSize(target: Vector3): Vector3;
  21. expandByPoint(point: Vector3): this;
  22. expandByVector(vector: Vector3): this;
  23. expandByScalar(scalar: number): this;
  24. expandByObject(object: Object3D): this;
  25. containsPoint(point: Vector3): boolean;
  26. containsBox(box: Box3): boolean;
  27. getParameter(point: Vector3): Vector3;
  28. intersectsBox(box: Box3): boolean;
  29. intersectsSphere(sphere: Sphere): boolean;
  30. intersectsPlane(plane: Plane): boolean;
  31. clampPoint(point: Vector3, target: Vector3): Vector3;
  32. distanceToPoint(point: Vector3): number;
  33. getBoundingSphere(target: Sphere): Sphere;
  34. intersect(box: Box3): this;
  35. union(box: Box3): this;
  36. applyMatrix4(matrix: Matrix4): this;
  37. translate(offset: Vector3): this;
  38. equals(box: Box3): boolean;
  39. /**
  40. * @deprecated Use {@link Box3#isEmpty .isEmpty()} instead.
  41. */
  42. empty(): any;
  43. /**
  44. * @deprecated Use {@link Box3#intersectsBox .intersectsBox()} instead.
  45. */
  46. isIntersectionBox(b: any): any;
  47. /**
  48. * @deprecated Use {@link Box3#intersectsSphere .intersectsSphere()} instead.
  49. */
  50. isIntersectionSphere(s: any): any;
  51. }
粤ICP备19079148号