Sphere.d.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { Vector3 } from './Vector3';
  2. import { Box3 } from './Box3';
  3. import { Plane } from './Plane';
  4. import { Matrix4 } from './Matrix4';
  5. export class Sphere {
  6. constructor( center?: Vector3, radius?: number );
  7. /**
  8. * @default new Vector3()
  9. */
  10. center: Vector3;
  11. /**
  12. * @default 1
  13. */
  14. radius: number;
  15. set( center: Vector3, radius: number ): Sphere;
  16. setFromPoints( points: Vector3[], optionalCenter?: Vector3 ): Sphere;
  17. clone(): this;
  18. copy( sphere: Sphere ): this;
  19. isEmpty(): boolean;
  20. makeEmpty(): this;
  21. containsPoint( point: Vector3 ): boolean;
  22. distanceToPoint( point: Vector3 ): number;
  23. intersectsSphere( sphere: Sphere ): boolean;
  24. intersectsBox( box: Box3 ): boolean;
  25. intersectsPlane( plane: Plane ): boolean;
  26. clampPoint( point: Vector3, target: Vector3 ): Vector3;
  27. getBoundingBox( target: Box3 ): Box3;
  28. applyMatrix4( matrix: Matrix4 ): Sphere;
  29. translate( offset: Vector3 ): Sphere;
  30. equals( sphere: Sphere ): boolean;
  31. /**
  32. * @deprecated Use {@link Sphere#isEmpty .isEmpty()} instead.
  33. */
  34. empty(): any;
  35. }
粤ICP备19079148号