Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SphericalHarmonics3

Represents a third-order spherical harmonics (SH). Light probes use this class to encode lighting information. See the ngx3js docs page for details.

Hierarchy

  • SphericalHarmonics3

Index

Constructors

constructor

Properties

coefficients

coefficients: I3JS.Vector3[]

An array holding the (9) SH coefficients. A single coefficient is represented as an instance of Vector3.

Readonly isSphericalHarmonics3

isSphericalHarmonics3: true

Methods

add

addScaledSH

clone

copy

equals

fromArray

getAt

getBasisAt

  • getBasisAt(normal: I3JS.Vector3, shBasis: number[]): void

getIrradianceAt

lerp

scale

set

toArray

  • toArray(array?: number[], offset?: number): number[]
  • toArray(array: ArrayLike<number>, offset?: number): ArrayLike<number>
  • Parameters

    • Optional array: number[]

      The target array.

    • Optional offset: number

      The array offset.

    Returns number[]

    Returns an array with the coefficients, or copies them into the provided array. The coefficients are represented as numbers.

  • Returns an array with the values of this spherical harmonics, or copies them into the provided array-like.

    Parameters

    • array: ArrayLike<number>

      array-like to store the spherical harmonics to.

    • Optional offset: number

      (optional) optional offset into the array-like.

    Returns ArrayLike<number>

    The provided array-like.

zero

Generated using TypeDoc