SphericalHarmonics3.d.ts 1.9 KB
Newer Older
T
Temdog007 已提交
1 2 3
import { Vector3 } from './Vector3.js';

export class SphericalHarmonics3 {
M
Mugen87 已提交
4

T
Temdog007 已提交
5 6 7 8 9
	constructor();

	coefficients: Vector3[];
	isSphericalHarmonics3: boolean;

M
Mugen87 已提交
10
	set ( coefficients: Vector3[] ): SphericalHarmonics3;
T
Temdog007 已提交
11
	zero(): SphericalHarmonics3;
M
Mugen87 已提交
12 13 14 15 16
	add( sh: SphericalHarmonics3 ): SphericalHarmonics3;
	scale( s: number ): SphericalHarmonics3;
	lerp( sh: SphericalHarmonics3, alpha: number ): SphericalHarmonics3;
	equals( sh: SphericalHarmonics3 ): boolean;
	copy( sh: SphericalHarmonics3 ): SphericalHarmonics3;
T
Temdog007 已提交
17
	clone(): SphericalHarmonics3;
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

	/**
	 * Sets the values of this spherical harmonics from the provided array.
	 * @param array the source array.
	 * @param offset (optional) offset into the array. Default is 0.
	 */
	fromArray( array: number[], offset?: number ): this;

	/**
	 * Sets the values of this spherical harmonics from the provided array-like.
	 * @param array the source array-like.
	 * @param offset (optional) offset into the array-like. Default is 0.
	 */
	fromArray( array: ArrayLike<number>, offset?: number ): this;

	/**
	 * Returns an array with the values of this spherical harmonics, or copies them into the provided array.
	 * @param array (optional) array to store the spherical harmonics to. If this is not provided, a new array will be created.
	 * @param offset (optional) optional offset into the array.
	 * @return The created or provided array.
	 */
	toArray( array?: number[], offset?: number ): number[];

	/**
	 * Returns an array with the values of this spherical harmonics, or copies them into the provided array-like.
	 * @param array array-like to store the spherical harmonics to.
	 * @param offset (optional) optional offset into the array-like.
	 * @return The provided array-like.
	 */
	toArray( array: ArrayLike<number>, offset?: number ): ArrayLike<number>;
T
Temdog007 已提交
48

M
Mugen87 已提交
49 50 51 52
	getAt( normal: Vector3, target: Vector3 ) : Vector3;
	getIrradianceAt( normal: Vector3, target: Vector3 ) : Vector3;

	static getBasisAt( normal: Vector3, shBasis: number[] ): void;
T
Temdog007 已提交
53

M
Mugen87 已提交
54
}