# TSHVector

## A vector of spherical harmonic coefficients.

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

Name Description

float[NumTotalF...

V

Constructors

Name Description

TSHVector()

Default constructor.

TSHVector

(
const FVector4& Vector
)

TSHVector

(
const TSHVector< OtherOrder >& Oth...
)

TSHVector

(
float V0,
float V1,
float V2,
float V3
)

Functions

Name Description

TSHVector

AmbientFunction()

The ambient incident lighting function.

void

ApplyWindowing

(
float Lambda
)

bool

AreFloatsValid()

TSHVector

CalcDiffuseTransfer

(
const FVector& Normal
)

float

CalcIntegral()

Calculates the integral of the function over the surface of the sphere.

float

FindWindowingLambda

(
const TSHVector& Vector,
float TargetLaplacian
)

FVector

GetMaximumDirection()

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

Name Description

operator*=

(
const float& B
)

In-place scalar multiplication operator.

operator/=

(
const float& Scalar
)

In-place scalar division operator.

operator+=

(
const TSHVector& B
)

operator-=

(
const TSHVector& B
)

In-place subtraction operator.

Constants

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.