 # TSHVector

## A vector of spherical harmonic coefficients.

References

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

AmbientFunction()

The ambient incident lighting function.

ApplyWindowing

(
float Lambda
)

AreFloatsValid()

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
)

GetMaximumDirection()

Compute the direction which the spherical harmonic is highest at.

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.

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

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.