SphericalHarmonics3 class
Primary reference: https://graphics.stanford.edu/papers/envmap/envmap.pdf
Secondary reference: https://www.ppsloan.org/publications/StupidSH36.pdf Represents a third-order spherical harmonics (SH). Light probes use this class to encode lighting information.
Constructors
Properties
-
coefficients
↔ List<
Vector3> -
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type ↔ String
-
getter/setter pair
Methods
-
add(
SphericalHarmonics3 sh) → SphericalHarmonics3 -
sh
- The SH to add. -
addScaledSH(
SphericalHarmonics3 sh, double s) → SphericalHarmonics3 -
sh
- The SH to add. -
clone(
) → SphericalHarmonics3 - Returns a new instance of SphericalHarmonics3 with equal coefficients.
-
copy(
SphericalHarmonics3 sh) → SphericalHarmonics3 -
sh
- The SH to copy. -
equals(
SphericalHarmonics3 sh) → bool -
fromArray(
List< double> array, [int offset = 0]) → SphericalHarmonics3 -
array
- The array holding the numbers of the SH coefficients. -
getAt(
Vector3 normal, Vector3 target) → Vector3 -
getIrradianceAt(
Vector3 normal, Vector3 target) → Vector3 -
lerp(
SphericalHarmonics3 sh, double alpha) → SphericalHarmonics3 -
sh
- The SH to interpolate with. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scale(
double s) → SphericalHarmonics3 -
s
- The scale factor. -
set(
List< Vector3> coefficients) → SphericalHarmonics3 -
coefficients
- An array of SH coefficients. -
toArray(
List< double> array, [int offset = 0]) → List<double> -
array
- (optional) The target array. -
toString(
) → String -
A string representation of this object.
inherited
-
zero(
) → SphericalHarmonics3 -
Sets all SH coefficients to
0
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getBasisAt(
Vector3 normal, List< double> shBasis) → void -
normal
- The normal vector (assumed to be unit length).