Box3.d.ts 1.8 KB

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