SMeshWidget

A widget that draws vertexes provided by a 2.5D StaticMesh.

Windows
MacOS
Linux

Inheritance Hierarchy

SLeafWidget

FGCObject

SMeshWidget

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Slate/SMeshWidget.h

Include

#include "Slate/SMeshWidget.h"

Syntax

class SMeshWidget :
    public SLeafWidget,
    public FGCObject

Remarks

A widget that draws vertexes provided by a 2.5D StaticMesh. The Mesh's material is used. Hardware instancing is supported.

Variables

Name Description

Protected variable

TArray< FRender...

 

RenderData

Functions

Name Description

Public function

uint32

 

AddMesh

(
    USlateVectorArtData& InMeshData
)

Draw the InStaticMesh when this widget paints.

Public function

uint32

 

AddMeshWithInstancing

(
    USlateVectorArtData& InMeshData,
    int32 InitialBufferSize
)

Much like AddMesh, but also enables instancing support for this MeshId.

Public function

void

 

AddRenderRun

(
    uint32 InMeshIndex,
    uint32 InInstanceOffset,
    uint32 InNumInstances
)

Tell the widget to draw instances of a mesh a given number of times starting at a given offset.

Public function

void

 

ClearRuns

(
    int32 NumRuns
)

Discard any previous runs and reserve space for new render runs if needed.

Public function

void

 

Construct

(
    const FArguments& Args
)

Public function

UMaterialIns...

 

ConvertToMID

(
    uint32 MeshId
)

Switch from static material to material instance dynamic.

Public function

void

 

EnableInstancing

(
    uint32 MeshId,
    int32 InitialSize
)

Enable hardware instancing

Protected function Static

void

 

PushUpdate

(
    uint32 VectorArtId,
    SMeshWidget& Widget,
    const FVector2D& Position,
    float Scale,
    uint32 BaseAddress
)

Protected function Static

void

 

PushUpdate

(
    uint32 VectorArtId,
    SMeshWidget& Widget,
    const FVector2D& Position,
    float Scale,
    float OptionalFloat
)

Public function

void

 

UpdatePerInstanceBuffer

(
    uint32 MeshId,
    FSlateInstanceBufferData& Data
)

Updates the per instance buffer. Automatically enables hardware instancing.

Overridden from SWidget

Name Description

Protected function Virtual Const

FVector2D

 

ComputeDesiredSize

(
    float
)

Overwritten from SWidget.

Protected function Virtual Const

int32

 

OnPaint

(
    const FPaintArgs& Args,
    const FGeometry& AllottedGeometry,
    const FSlateRect& MyCullingRect,
    FSlateWindowElementList& OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle& InWidgetStyle,
    bool bParentEnabled
)

Overwritten from SWidget.

Overridden from FGCObject

Name Description

Protected function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

~ FGCObject

Protected function Virtual Const

FString

 

GetReferencerName()

Use this method to report a name for your referencer.

Classes

Name

Description

Public struct

FArguments

Protected struct

FRenderData

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