FPreviewScene

Encapsulates a simple scene setup for preview or thumbnail rendering.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/PreviewScene.h

Include

#include "PreviewScene.h"

Syntax

class FPreviewScene : public FGCObject

Remarks

Encapsulates a simple scene setup for preview or thumbnail rendering.

Variables

Name Description

Protected variable

bool

 

bForceAllUsedMipsResident

This controls whether or not all mip levels of textures used by UMeshComponents added to this preview window should be loaded and remain loaded.

Public variable

UDirectionalLig...

 

DirectionalLight

Protected variable

ULineBatchCompo...

 

LineBatcher

Protected variable

UWorld *

 

PreviewWorld

Public variable

USkyLightCompon...

 

SkyLight

Constructors

Name Description

Public function

FPreviewScene

(
    ConstructionValues CVS
)

For physical correct light computations we multiply diffuse and specular lights by PI (see LABEL_RealEnergy)

Destructors

Name Description

Public function Virtual

~FPreviewScene()

Functions

Name Description

Public function Virtual

void

 

AddComponent

(
    UActorComponent* Component,
    const FTransform& LocalToWorld,
    bool bAttachToRoot
)

Adds a component to the preview scene.

Public function

void

 

ClearLineBatcher()

Clean out the line batcher each frame

Public function Virtual Const

FLinearColor

 

GetBackgroundColor()

Get the background color we use by default

Public function

FRotator

 

GetLightDirection()

Accessor for finding the current direction of the preview scene's DirectionalLight.

Public function Const

ULineBatchCo...

 

GetLineBatcher()

Access to line drawing

Public function Const

FSceneInterf...

 

GetScene()

Public function Const

UWorld *

 

GetWorld()

Accessors.

Public function

void

 

LoadSettings

(
    const TCHAR* Section
)

Load/Save settings to the config, specifying the key

Public function Virtual

void

 

RemoveComponent

(
    UActorComponent* Component
)

Removes a component from the preview scene.

Public function

void

 

SaveSettings

(
    const TCHAR* Section
)

Public function

void

 

SetLightBrightness

(
    float LightBrightness
)

Public function

void

 

SetLightColor

(
    const FColor& LightColor
)

Public function

void

 

SetLightDirection

(
    const FRotator& InLightDir
)

Function for modifying the current direction of the preview scene's DirectionalLight.

Public function

void

 

SetSkyBrightness

(
    float SkyBrightness
)

Public function

void

 

SetSkyCubemap

(
    UTextureCube* Cubemap
)

Public function

void

 

UpdateCaptureContents()

Update sky and reflection captures

Overridden from FGCObject

Name Description

Public function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Serializer.

Public function Virtual Const

FString

 

GetReferencerName()

Use this method to report a name for your referencer.

Classes

Name

Description

Public struct

ConstructionValues

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