UNPKG

@awayjs/core

Version:
46 lines 1.4 kB
import { Vector3D } from './Vector3D'; export declare class Sphere { /** * */ x: number; /** * */ y: number; /** * */ z: number; /** * */ radius: number; /** * Create a Sphere with ABCD coefficients */ constructor(x?: number, y?: number, z?: number, radius?: number); rayIntersection(position: Vector3D, direction: Vector3D, targetNormal: Vector3D): number; containsPoint(position: Vector3D): boolean; /** * Copies all of sphere data from the source Sphere object into the calling * Sphere object. * * @param sourceSphere The Sphere object from which to copy the data. */ copyFrom(sourceSphere: Sphere): void; /** * Adds two spheres together to create a new Sphere object, by filling * in the horizontal, vertical and longitudinal space between the two spheres. * * <p><b>Note:</b> The <code>union()</code> method ignores spheres with * <code>0</code> as the height, width or depth value, such as: <code>var * box2:Sphere = new Sphere(300,300,300,50,50,0);</code></p> * * @param toUnion A Sphere object to add to this Sphere object. * @return A new Sphere object that is the union of the two spheres. */ union(toUnion: Sphere, target?: Sphere): Sphere; toString(): string; } //# sourceMappingURL=Sphere.d.ts.map