FStaticMeshVertexBuffer

Vertex buffer for a static mesh LOD

Windows
MacOS
Linux

Inheritance Hierarchy

FRenderResource

FStaticMeshVertexBuffer

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/Rendering/StaticMeshVertexBuffer.h

Include

#include "Rendering/StaticMeshVertexBuffer.h"

Syntax

class FStaticMeshVertexBuffer : public FRenderResource

Remarks

Vertex buffer for a static mesh LOD

Variables

Constructors

Name Description

Public function

FStaticMeshVertexBuffer()

Default constructor.

Destructors

Name Description

Public function

~FStaticMeshVertexBuffer()

Destructor.

Functions

Name Description

Public function

void

 

AppendVertices

(
    const FStaticMeshBuildVertex* ...,
    const uint32 NumVerticesToAppend
)

Appends the specified vertices to the end of the buffer

Public function Const

void

 

BindLightMapVertexBuffer

(
    const FVertexFactory* VertexFa...,
    FStaticMeshDataType& Data,
    int LightMapCoordinateIndex
)

Public function Const

void

 

BindPackedTexCoordVertexBuffer

(
    const FVertexFactory* VertexFa...,
    FStaticMeshDataType& Data
)

Public function Const

void

 

BindTangentVertexBuffer

(
    const FVertexFactory* VertexFa...,
    FStaticMeshDataType& Data
)

Public function Const

void

 

BindTexCoordVertexBuffer

(
    const FVertexFactory* VertexFa...,
    FStaticMeshDataType& Data,
    int ClampedNumTexCoords
)

Public function

void

 

CleanUp()

Delete existing resources

Public function

void

 

ClearMetaData()

Public function

FVertexBuffe...

 

CreateTangentsRHIBuffer_Async()

Public function

FVertexBuffe...

 

CreateTangentsRHIBuffer_RenderThread()

Create an RHI vertex buffer with CPU data.

Public function

FVertexBuffe...

 

CreateTexCoordRHIBuffer_Async()

Public function

FVertexBuffe...

 

CreateTexCoordRHIBuffer_RenderThread()

Public function

bool

 

GetAllowCPUAccess()

Public function Const

uint32

 

GetNumTexCoords()

Public function Const

uint32

 

GetNumVertices()

Public function Const

uint32

 

GetResourceSize()

Public function

void *

 

GetTangentData()

Public function

int

 

GetTangentSize()

Public function Const

FRHIShaderRe...

 

GetTangentsSRV()

Public function

void *

 

GetTexCoordData()

Public function

int

 

GetTexCoordSize()

Public function Const

FRHIShaderRe...

 

GetTexCoordsSRV()

Public function Const

bool

 

GetUseFullPrecisionUVs()

Public function Const

bool

 

GetUseHighPrecisionTangentBasis()

Public function Const

FVector2D

 

GetVertexUV

(
    uint32 VertexIndex,
    uint32 UVIndex
)

Set the vertex UV values at the given index in the vertex buffer

Public function Const

FVector2D

 

GetVertexUV_Typed

(
    uint32 VertexIndex,
    uint32 UVIndex
)

Public function

void

 

Init

(
    const FStaticMeshVertexBuffer& InV...,
    bool bNeedsCPUAccess
)

Initializes this vertex buffer with the contents of the given vertex buffer.

Public function

void

 

Init

(
    uint32 InNumVertices,
    uint32 InNumTexCoords,
    bool bNeedsCPUAccess
)

Public function

void

 

Init

(
    const TArray< FStaticMeshBuildVerte...,
    uint32 InNumTexCoords,
    bool bNeedsCPUAccess
)

Initializes the buffer with the given vertices.

Public function

void

 

InitRHIForStreaming

(
    FRHIVertexBuffer* Intermediate...,
    FRHIVertexBuffer* Intermediate...,
    TRHIResourceUpdateBatcher< MaxNumUp...
)

Similar to Init/ReleaseRHI but only update existing SRV so references to the SRV stays valid

Public function

bool

 

IsValid()

Public function

void

 

ReleaseRHIForStreaming

(
    TRHIResourceUpdateBatcher< MaxNumUp...
)

Public function

void

 

Serialize

(
    FArchive& Ar,
    bool bNeedsCPUAccess
)

Serializer

Public function

void

 

SerializeMetaData

(
    FArchive& Ar
)

Public function

void

 

SetUseFullPrecisionUVs

(
    bool UseFull
)

Public function

void

 

SetUseHighPrecisionTangentBasis

(
    bool bUseHighPrecision
)

Public function

void

 

SetVertexTangents

(
    uint32 VertexIndex,
    FVector X,
    FVector Y,
    FVector Z
)

Public function

void

 

SetVertexUV

(
    uint32 VertexIndex,
    uint32 UVIndex,
    const FVector2D& Vec2D
)

Set the vertex UV values at the given index in the vertex buffer

Public function Const

FVector4

 

VertexTangentX

(
    uint32 VertexIndex
)

Public function Const

FVector4

 

VertexTangentX_Typed

(
    uint32 VertexIndex
)

Public function Const

FVector

 

VertexTangentY

(
    uint32 VertexIndex
)

Calculate the binormal (TangentY) vector using the normal,tangent vectors

Public function Const

FVector4

 

VertexTangentY_Typed

(
    uint32 VertexIndex
)

Public function Const

FVector4

 

VertexTangentZ

(
    uint32 VertexIndex
)

Public function Const

FVector4

 

VertexTangentZ_Typed

(
    uint32 VertexIndex
)

Overridden from FRenderResource

Name Description

Public function Virtual Const

FString

 

GetFriendlyName()

Public function Virtual

void

 

InitResource()

Initializes the resource. This is only called by the rendering thread.

Public function Virtual

void

 

InitRHI()

Initializes the RHI resources used by this resource.

Public function Virtual

void

 

ReleaseResource()

Prepares the resource for deletion. This is only called by the rendering thread.

Public function Virtual

void

 

ReleaseRHI()

Releases the RHI resources used by this resource.

Operators

Name Description

Public function

void

 

operator=

(
    const FStaticMeshVertexBuffer& Oth...
)

Specialized assignment operator, only used when importing LOD's.

Classes

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