Box3.d.ts 1.9 KB

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