Navigation
Unreal Engine C++ API Reference > Runtime > Core > Math
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/Math/SHMath.h |
Include | #include "Math/SHMath.h" |
Syntax
template<int32 Order>
class TSHVector
Remarks
A vector of spherical harmonic coefficients.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
float[NumTotalFloats] | V |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
TSHVector () |
Default constructor. | |
![]() |
TSHVector
(
const FVector4f& Vector |
||
![]() |
|||
![]() |
TSHVector
(
float V0, |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
TSHVector | The ambient incident lighting function. | |
![]() |
void | ApplyWindowing
(
float Lambda |
|
![]() ![]() |
bool | ||
![]() ![]() |
TSHVector | CalcDiffuseTransfer
(
const FVector& Normal |
|
![]() ![]() |
float | CalcIntegral () |
Calculates the integral of the function over the surface of the sphere. |
![]() ![]() |
float | FindWindowingLambda
(
const TSHVector& Vector, |
|
![]() ![]() |
FVector | Compute the direction which the spherical harmonic is highest at. | |
![]() |
void | Normalize () |
Scales the function uniformly so its integral equals one. |
![]() |
TSHVector< 2 > | SHBasisFunction
(
const FVector& Vector |
Specialization for 2nd order to avoid expensive trig functions. |
![]() |
TSHVector< 3 > | SHBasisFunction
(
const FVector& Vector |
Specialization for 3rd order to avoid expensive trig functions. |
![]() ![]() |
TSHVector | SHBasisFunction
(
const FVector& Vector |
Returns the value of the SH basis L,M at the point on the sphere defined by the unit vector Vector. |
Operators
Type | Name | Description | |
---|---|---|---|
![]() |
TSHVector & | operator*=
(
const float& B |
In-place scalar multiplication operator. |
![]() |
TSHVector & | operator/=
(
const float& Scalar |
In-place scalar division operator. |
![]() |
TSHVector & | operator+=
(
const TSHVector& B |
In-place addition operator. |
![]() |
TSHVector & | operator-=
(
const TSHVector& B |
In-place subtraction operator. |
Constants
Name | Description |
---|---|
ConstantBasisIntegral | The integral of the constant SH basis. |
MaxSHBasis | |
MaxSHOrder | |
NumComponentsPerSIMDVector | |
NumSIMDVectors | |
NumTotalFloats |