UModelComponent

Inheritance Hierarchy

Syntax

class UModelComponent :
    public UPrimitiveComponent ,
    public IInterface_CollisionDataProvider

Remarks

ModelComponents are PrimitiveComponents that represent elements of BSP geometry in a ULevel object. They are used exclusively by ULevel and are not intended as general-purpose components.

Variables

Name Description

Public variable

UBodySetup *...

 

ModelBodySetup

Description of collision

Constructors

Name Description

Public function

UModelComponent

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function Static

void

 

AddReferencedObjects

(
    UObject * InThis,
    FReferenceCollector & Collector
)

WITH_EDITOR.

Public function Static

[ENGINE_API](API\Runtime\Engine\AI\Navigation\ENGINE_API) v...

 

ApplyTempElements

(
    bool bLightingWasSuccessful
)

Apply all the elements that we were putting into the TempBSPElements map to the Elements arrays in all components

Public function

void

 

BuildRenderData()

Rebuild the model's rendering info.

Public function

void

 

CommitSurfaces()

WITH_EDITOR.

Public function

[ENGINE_API](API\Runtime\Engine\AI\Navigation\ENGINE_API) v...

 

CopyElementsFrom

(
    UModelComponent * OtherModelCom...
)

WITH_EDITOR.

Public function

void

 

CreateModelBodySetup()

Ensure ModelBodySetup is present and correctly configured.

Public function Static

FModelElemen ...

 

CreateNewTempElement

(
    UModelComponent * Component
)

WITH_EDITOR.

Public function Virtual

bool

 

GenerateElements

(
    bool bBuildRenderData
)

Generate the Elements array.

bool true if successful, false if not.

Public function

const TIndir ...

 

GetElements()

Public function

TIndirectArr ...

 

GetElements()

Public function

UModel *

 

GetModel()

WITH_EDITOR.

Public function Virtual

void

 

GetStaticLightingInfo

(
    FStaticLightingPrimitiveInfo & OutP...,
    const TArray < ULightComponent *...,
    const FLightingBuildOptions & Optio...
)

Public function

[ENGINE_API](API\Runtime\Engine\AI\Navigation\ENGINE_API) v...

 

GetSurfaceLightMapResolution

(
    int32 SurfaceIndex,
    int32 QualityScale,
    int32 & Width,
    int32 & Height,
    FMatrix & WorldToMap,
    TArray < int32 >* GatheredNodes
)

Calculate the lightmap resolution to be used by the given surface.

Public function

void

 

InitializeModelComponent

(
    UModel * InModel,
    uint16 InComponentIndex,
    uint32 MaskedSurfaceFlags,
    const TArray < uint16 >& InNodes
)

Minimal initialization.

Public function

void

 

InvalidateCollisionData()

Invalidate current collision data

Public function

[ENGINE_API](API\Runtime\Engine\AI\Navigation\ENGINE_API) v...

 

SelectAllSurfaces()

Selects all surfaces that are part of this model component.

Public function

void

 

ShrinkElements()

Free empty elements.

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc ...

 

CreateSceneProxy()

Creates a proxy to represent the primitive to the scene manager in the rendering thread.

Public function Virtual

UBodySetup &...

 

GetBodySetup()

Return the BodySetup to use for this PrimitiveComponent (single body case)

Public function Virtual

void

 

GetLightAndShadowMapMemoryUsage

(
    int32 & LightMapMemoryUsage,
    int32 & ShadowMapMemoryUsage
)

Returns the light and shadow map memory for this primitive in its out variables.

Public function Virtual

bool

 

GetLightMapResolution

(
    int32 & Width,
    int32 & Height
)

Returns the lightmap resolution used for this primitive instance in the case of it supporting texture light/ shadow maps.

Public function Virtual

UMaterialInt ...

 

GetMaterial

(
    int32 ElementIndex
)

Returns the material used by the element at the specified index

Public function Virtual

UMaterialInt ...

 

GetMaterialFromCollisionFaceIndex

(
    int32 FaceIndex
)

Try and retrieve the material applied to a particular collision face of mesh.

Public function Virtual

int32

 

GetNumMaterials()

Number of material elements in this primitive

Public function Virtual

ELightMapInt ...

 

GetStaticLightingType()

Requests whether the component will use texture, vertex or no lightmaps.

Public function Virtual

int32

 

GetStaticLightMapResolution()

Returns the static lightmap resolution used for this primitive.

Public function Virtual

void

 

GetStreamingTextureInfo

WITH_EDITOR.

Public function Virtual

void

 

GetUsedMaterials

(
    TArray < UMaterialInterface * > ...,
    bool bGetDebugMaterials
)

Retrieves the materials used in this component

Public function Virtual

bool

 

ShouldRecreateProxyOnUpdateTransform()

Determines whether the proxy for this primitive type needs to be recreated whenever the primitive moves.

Protected function Virtual

bool

 

SupportsStaticLighting()

Whether the component type supports static lighting.

Overridden from USceneComponent

Name Description

Public function Virtual

FBoxSphereBo ...

 

CalcBounds

(
    const FTransform & LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Public function Virtual

bool

 

IsPrecomputedLightingValid()

Public function Virtual

void

 

PropagateLightingScenarioChange()

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

InvalidateLightingCacheDetailed

(
    bool bInvalidateBuildEnqueuedLighti...,
    bool bTranslationOnly
)

WITH_EDITOR.

Overridden from UObject

Name Description

Public function Virtual

void

 

GetResourceSizeEx

(
    FResourceSizeEx & CumulativeResourc...
)

WITH_EDITOR.

Public function Virtual

bool

 

IsNameStableForNetworking()

IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network

Public function Virtual

void

 

PostEditUndo()

Called after applying a transaction to the object.

Public function Virtual

void

 

PostLoad()

WITH_EDITOR.

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject serializer.

Overridden from IInterface_CollisionDataProvider

Name Description

Public function Virtual

bool

 

ContainsPhysicsTriMeshData

(
    bool InUseAllTriData
)

Interface for checking if the implementing objects contains triangle mesh collision data

Public function Virtual

bool

 

GetPhysicsTriMeshData

(
    FTriMeshCollisionData * Collisi...,
    bool InUseAllTriData
)

WITH_EDITOR.

Public function Virtual

bool

 

WantsNegXTriMesh()

Do we want to create a negative version of this mesh

Constants

Name

Description

TempBSPElements

The new BSP elements that are made during lighting, and will be applied to the components when all lighting is done

See Also

References

Module

Engine

Header

Runtime/Engine/Classes/Components/ModelComponent.h