FImgMediaMipMapInfo

Contains information for working with mip maps.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

ImgMedia

Header

/Engine/Plugins/Media/ImgMedia/Source/ImgMedia/Public/ImgMediaMipMapInfo.h

Include

#include "ImgMediaMipMapInfo.h"

Syntax

class FImgMediaMipMapInfo :
    public IMediaOptions::FDataContainer,
    public FTickableGameObject

Remarks

Contains information for working with mip maps.

Variables

Name Description

Protected variable

bool

 

bIsCachedMipLevelValid

True if the cached mipmap data has been calculated this frame.

Protected variable

bool

 

bIsMipLevel0DistanceSetManually

True if MipLevel0Distance has been set manually.

Protected variable

int32

 

CachedMipLevel

Desired mipmap level at this current time.

Protected variable

FImgMediaTileSe...

 

CachedTileSelection

Desired tiles at this current tmie.

Protected variable

TArray< FImgMed...

 

CameraInfos

Info for each camera, used in mipmap calculations.

Protected variable

FCriticalSectio...

 

InfoCriticalSection

Protects info variables.

Protected variable

float

 

MipLevel0Distance

Ideal distance for mip level 0.

Protected variable

TArray< float >

 

MipLevelDistances

Ideal distances for all mip maps.

Protected variable

TArray< FImgMed...

 

Objects

Array of objects that are using our img sequence.

Protected variable

FName

 

SequenceName

Name of this sequence.

Protected variable

float

 

ViewportDistAdjust

Adjustment for current size of viewport, used in mipmap calculations.

Constructors

Name Description

Public function

FImgMediaMipMapInfo()

Destructors

Name Description

Public function Virtual

~FImgMediaMipMapInfo()

Functions

Name Description

Public function

void

 

AddObject

(
    AActor* InActor,
    float Width,
    float LODBias
)

This object is using our img sequence.

Public function

void

 

AddObjectsUsingThisMediaTexture

(
    UMediaTexture* InMediaTexture
)

All the objets that are using this media texture will be used in our mip map calculations.

Public function

void

 

ClearAllObjects()

Remove all objects from consideration.

Public function Const

const TArray...

 

GetCameraInfo()

Get information on all our cameras.

Public function

int32

 

GetDesiredMipLevel

(
    FImgMediaTileSelection& InTileSele...
)

Get what mipmap level should be used.

Public function Const

const TArray...

 

GetMipLevelDistances()

Get our mip level distances.

Public function Static

int

 

GetMipLevelForDistance

(
    float InDistance,
    const TArray< float >& InMipLevelD...
)

Determine which mip level to use for a given distance.

Public function Static

float

 

GetObjectDistToCamera

(
    const FVector& InCameraLocation,
    const FVector& InObjectLocation
)

Calculate object distance to camera.

Public function Const

const TArray...

 

GetObjects()

Get information on objects that are using our textures.

Public function Static

float

 

GetObjectWidth

(
    const AActor* InActor
)

Determine the size of an object.

Public function Const

float

 

GetViewportDistAdjust()

Get adjustment needed for distance to take the viewport size into account compared to the reference viewport

Public function

void

 

RemoveObject

(
    AActor* InActor
)

This object is no longer using our img sequence.

Public function

void

 

SetMipLevelDistance

(
    float Distance
)

Manually set when mip level 0 should appear.

Public function

void

 

SetTextureInfo

(
    FName InSequenceName,
    int NumMipMaps,
    const FIntPoint& Dim
)

Provide information on the texture needed for our image sequence.

Protected function

void

 

UpdateMipLevelCache()

Performs mipmap calculations and caches the data.

Protected function

void

 

UpdateMipLevelDistances()

Updates the MipLevelDistances based on current information.

Overridden from FTickableObjectBase

Name Description

Public function Virtual Const

TStatId

 

GetStatId()

Return the stat id to use for this tickable

Public function Virtual

void

 

Tick

(
    float DeltaTime
)

Pure virtual that must be overloaded by the inheriting class.

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