UModel

Windows
MacOS
Linux

Inheritance Hierarchy

Syntax

class UModel : public UObject

Variables

Name Description

Public variable

bool

 

bCachedOwnerTransformValid

Specifies whether the above cached transform is valid

Public variable

bool

 

bInvalidForStaticLighting

True if static lighting now can not be validly built for this model

Public variable

bool

 

bOnlyRebuildMaterialIndexBuffers

True if only the material index buffers should be rebuilt when committing model surfaces

Public variable

FBoxSphereBound...

 

Bounds

Public variable

TArray< class F...

 

CachedMappings

Cache the mappings that are going to be calculated during lighting (we delay applying to join mappings into bigger lightmaps)

Public variable

bool

 

InvalidSurfaces

True if surfaces in the model have been changed without calling ULevel::CommitModelSurfaces.

Public variable

TArray< int32 >

 

LeafHulls

Public variable

TArray< FLeaf >

 

Leaves

Public variable

FGuid

 

LightingGuid

Unique ID for this model, used for caching during distributed lighting

Public variable

ULevel *

 

LightingLevel

The level used to generate NodeGroups

Public variable

TArray< FLightm...

 

LightmassSettings

Public variable

bool

 

Linked

Public variable

TMap< UMaterial...

 

MaterialIndexBuffers

An index buffer for each material used by the model, containing all the nodes with that material applied.

Public variable

TMap< int32, FN...

 

NodeGroups

A map of NodeGroup ID to the NodeGroup object

Public variable

TArray< FBspNod...

 

Nodes

Public variable

int32

 

NumIncompleteNodeGroups

How many node groups still need to be completed before we start joining by brightness, etc

Public variable

int32

 

NumSharedSides

Public variable

uint32

 

NumUniqueVertices

The number of unique vertices.

Public variable

FVector

 

OwnerLocationWhenLastBuilt

Cached transform of the owner brush when the geometry was last built

Public variable

FRotator

 

OwnerRotationWhenLastBuilt

Public variable

FVector

 

OwnerScaleWhenLastBuilt

Public variable

TArray< FVector...

 

Points

Public variable

UPolys *

 

Polys

Arrays and subobjects.

Public variable

FRenderCommandF...

 

ReleaseResourcesFence

A fence which is used to keep track of the rendering thread releasing the model resources.

Public variable

bool

 

RootOutside

Other variables.

Public variable

TArray< FBspSur...

 

Surfs

Public variable

TArray< FVector...

 

Vectors

Public variable

FModelVertexBuf...

 

VertexBuffer

A vertex buffer containing the vertices for all nodes in the UModel.

Public variable

TArray< FVert >

 

Verts

Constructors

Name Description

Public function

UModel

(
    FVTableHelper& Helper
)

DO NOT USE. This constructor is for internal usage only for hot-reload purposes.

Public function

UModel

(
    const FObjectInitializer& ObjectIn...
)

Constructors.

Functions

Name Description

Public function Static

void

 

__DefaultConstructor

(
    const FObjectInitializer& X
)

Public function Static

UObject *...

 

__VTableCtorCaller

(
    FVTableHelper& Helper
)

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Public function

void

 

ApplyStaticLighting

(
    ULevel* LightingScenario
)

Applies all of the finished lighting cached in the NodeGroups

Public function

void

 

ApplyWorldOffset

(
    const FVector& InOffset,
    bool bWorldShift
)

Apply world origin changes

Public function

void

 

BeginReleaseResources()

Begins releasing the model's resources.

Public function

void

 

BuildBound()

Build the model's bounds (min and max).

Public function

int32

 

BuildVertexBuffers()

Initialize vertex buffer data from UModel data Returns the number of vertices in the vertex buffer.

Public function

void

 

CalculateUniqueVertCount()

Public function

void

 

ClearLocalMaterialIndexBuffersData()

Clears local (non RHI) data associated with MaterialIndexBuffers

Public function

void

 

EmptyModel

(
    int32 EmptySurfInfo,
    int32 EmptyPolys
)

Public function Const

ABrush *

 

FindBrush

(
    const FVector& SourcePoint
)

Find the source brush actor associated with this point, or NULL if the point does not lie on a BSP surface.

Public function Const

float

 

FindNearestVertex

(
    const FVector& SourcePoint,
    FVector& DestPoint,
    float MinRadius,
    int32& pVertex
)

Public function

FVector

 

GetCenter()

Compute the "center" location of all the verts

Public function Static

float

 

GetGlobalBSPTexelScale()

Public function Const

void

 

GetNodeBoundingBox

(
    const FBspNode& Node,
    FBox& OutBox
)

Creates a bounding box for the passed in node

Public function

void

 

GetSurfacePlanes

(
    const AActor* Owner,
    TArray< FPlane >& OutPlanes
)

Public function

void

 

GroupAllNodes

(
    ULevel* Level,
    const TArray< class ULightComponent...
)

Groups all nodes in the model into NodeGroups (cached in the NodeGroups object)

Public function Const

bool

 

HasSelectedSurfaces()

Public function

void

 

Initialize

(
    ABrush* Owner,
    bool InRootOutside
)

Public function

void

 

Initialize()

Public function

void

 

ModifyAllSurfs

(
    bool UpdateMaster
)

Public function

void

 

ModifySelectedSurfs

(
    bool UpdateMaster
)

UModel transactions.

Public function

void

 

ModifySurf

(
    int32 InIndex,
    bool UpdateMaster
)

Public function

void

 

PrecomputeSphereFilter

(
    const FPlane& Sphere
)

Public function Static

void

 

SetGlobalBSPTexelScale

(
    float InBSPTexelScale
)

Sets the global texel scale used for BSP UV's

Public function

void

 

ShrinkModel()

Shrink all stuff to its minimum size.

Public function Static

UClass *

 

StaticClass()

Returns a UClass object representing this class at runtime

Public function Static

EClassCastFl...

 

StaticClassCastFlags()

Returns the static cast flags for this class

Public function Static

const TCHAR ...

 

StaticPackage()

Returns the package this class belongs in

Public function Static

void

 

StaticRegisterNativesUModel()

Public function

void

 

Transform

(
    ABrush* Owner
)

Transform this model by its coordinate system.

Public function

void

 

UpdateVertices()

Begins initializing the model's VertexBuffer.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

GetResourceSizeEx

(
    FResourceSizeEx& CumulativeResourc...
)

Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific).

Public function Virtual Const

bool

 

IsAsset()

Returns true if this object is considered an asset.

Public function Virtual

bool

 

IsReadyForFinishDestroy()

Called to check if the object is ready for FinishDestroy.

Public function Virtual

bool

 

Modify

(
    bool bAlwaysMarkDirty
)

Note that the object will be modified.

Public function Virtual

void

 

PostDuplicate

(
    bool bDuplicateForPIE
)

Called after duplication & serialization and before PostLoad.

Public function Virtual

void

 

PostEditUndo()

Called after applying a transaction to the object.

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

bool

 

Rename

(
    const TCHAR* NewName,
    UObject* NewOuter,
    ERenameFlags Flags
)

Rename this object to a unique name, or change its outer.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Operators

Name Description

Public function

void *

 

operator new

(
    const size_t InSize,
    EInternal InInternalOnly,
    UObject* InOuter,
    FName InName,
    EObjectFlags InSetFlags
)

For internal use only; use StaticConstructObject() to create new objects.

Public function

void *

 

operator new

(
    const size_t InSize,
    EInternal* InMem
)

For internal use only; use StaticConstructObject() to create new objects.

Typedefs

Name

Description

Super

Typedef for the base class (UObject)

ThisClass

Typedef for UModel.

Constants

Name

Description

BSPTexelScale

StaticClassFlags

Bitwise union of EClassFlags pertaining to this class.

References

Module

Engine

Header

Runtime/Engine/Public/Model.h

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