TSHVector

A vector of spherical harmonic coefficients.

Windows
MacOS
Linux

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

Public variable

float[NumTotalF...

 

V

Constructors

Name Description

Public function

TSHVector()

Default constructor.

Public function

TSHVector

(
    const FVector4 & Vector
)

Public function

TSHVector

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

Public function

TSHVector

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

Functions

Name Description

Public function Static

TSHVector

 

AmbientFunction()

The ambient incident lighting function.

Public function

void

 

ApplyWindowing

(
    float Lambda
)

Public function Const

bool

 

AreFloatsValid()

Public function Static

TSHVector

 

CalcDiffuseTransfer

(
    const FVector & Normal
)

Public function Const

float

 

CalcIntegral()

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

Public function Static

float

 

FindWindowingLambda

(
    const TSHVector & Vector,
    float TargetLaplacian
)

Public function Const

FVector

 

GetMaximumDirection()

Compute the direction which the spherical harmonic is highest at.

Public function

void

 

Normalize()

Scales the function uniformly so its integral equals one.

Public function

TSHVector < 2...

 

SHBasisFunction

(
    const FVector & Vector
)

Specialization for 2nd order to avoid expensive trig functions.

Public function

TSHVector < 3...

 

SHBasisFunction

(
    const FVector & Vector
)

Specialization for 3rd order to avoid expensive trig functions.

Public function Static

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

Public function

TSHVector &

 

operator*=

(
    const float& B
)

In-place scalar multiplication operator.

Public function

TSHVector &

 

operator/=

(
    const float& Scalar
)

In-place scalar division operator.

Public function

TSHVector &

 

operator+=

(
    const TSHVector & B
)

In-place addition operator.

Public function

TSHVector &

 

operator-=

(
    const TSHVector & B
)

In-place subtraction operator.

Constants

Select Skin
Light
Dark

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.

Post Feedback