UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FPositionVertexBuffer Class Reference

#include <PositionVertexBuffer.h>

+ Inheritance diagram for FPositionVertexBuffer:

Public Member Functions

ENGINE_API FPositionVertexBuffer ()
 
ENGINE_API ~FPositionVertexBuffer ()
 
ENGINE_API void CleanUp ()
 
void ENGINE_API Init (uint32 NumVertices, bool bInNeedsCPUAccess=true)
 
ENGINE_API void Init (const TArray< FStaticMeshBuildVertex > &InVertices, bool bInNeedsCPUAccess=true)
 
ENGINE_API void Init (const FConstMeshBuildVertexView &InVertices, bool bInNeedsCPUAccess=true)
 
ENGINE_API void Init (const FPositionVertexBuffer &InVertexBuffer, bool bInNeedsCPUAccess=true)
 
ENGINE_API void Init (const TArray< FVector3f > &InPositions, bool bInNeedsCPUAccess=true)
 
ENGINE_API bool AppendVertices (const FStaticMeshBuildVertex *Vertices, const uint32 NumVerticesToAppend)
 
ENGINE_API void Serialize (FArchive &Ar, bool bInNeedsCPUAccess)
 
void SerializeMetaData (FArchive &Ar)
 
ENGINE_API void SetMetaData (uint32 InStride, uint32 InNumVertices)
 
void ClearMetaData ()
 
ENGINE_API void operator= (const FPositionVertexBuffer &Other)
 
FVector3fVertexPosition (uint32 VertexIndex)
 
const FVector3fVertexPosition (uint32 VertexIndex) const
 
uint32 GetStride () const
 
uint32 GetNumVertices () const
 
ENGINE_API bool GetAllowCPUAccess () const
 
SIZE_T GetAllocatedSize () const
 
FBufferRHIRef CreateRHIBuffer (FRHICommandListBase &RHICmdList)
 
void InitRHIForStreaming (FRHIBuffer *IntermediateBuffer, FRHIResourceReplaceBatcher &Batcher)
 
void ReleaseRHIForStreaming (FRHIResourceReplaceBatcher &Batcher)
 
virtual ENGINE_API void InitRHI (FRHICommandListBase &RHICmdList) override
 
virtual ENGINE_API void ReleaseRHI () override
 
virtual FString GetFriendlyName () const override
 
ENGINE_API void BindPositionVertexBuffer (const class FVertexFactory *VertexFactory, struct FStaticMeshDataType &Data) const
 
voidGetVertexData ()
 
const voidGetVertexData () const
 
FRHIShaderResourceViewGetSRV () const
 
- Public Member Functions inherited from FVertexBuffer
RENDERCORE_API FVertexBuffer ()
 
RENDERCORE_API FVertexBuffer (const FVertexBuffer &)
 
RENDERCORE_API FVertexBufferoperator= (const FVertexBuffer &Other)
 
virtual RENDERCORE_API ~FVertexBuffer ()
 
const FBufferRHIRefGetRHI () const
 
RENDERCORE_API void SetRHI (const FBufferRHIRef &BufferRHI)
 
- Public Member Functions inherited from FRenderResource
RENDERCORE_API FRenderResource ()
 
RENDERCORE_API FRenderResource (ERHIFeatureLevel::Type InFeatureLevel)
 
RENDERCORE_API FRenderResource (const FRenderResource &)
 
RENDERCORE_API FRenderResource (FRenderResource &&)
 
RENDERCORE_API FRenderResourceoperator= (const FRenderResource &Other)
 
RENDERCORE_API FRenderResourceoperator= (FRenderResource &&Other)
 
virtual RENDERCORE_API ~FRenderResource ()
 
virtual RENDERCORE_API void InitResource (FRHICommandListBase &RHICmdList)
 
virtual RENDERCORE_API void ReleaseResource ()
 
RENDERCORE_API void UpdateRHI (FRHICommandListBase &RHICmdList)
 
bool IsInitialized () const
 
int32 GetListIndex () const
 
EInitPhase GetInitPhase () const
 
void SetOwnerName (FName InOwnerName)
 
FName GetOwnerName () const
 
void SetResourceName (FName InResourceName)
 
FName GetResourceName () const
 

Additional Inherited Members

- Public Types inherited from FRenderResource
enum class  EInitPhase : uint8 { Pre , Default , MAX }
 
- Static Public Member Functions inherited from FRenderResource
static RENDERCORE_API void ReleaseRHIForAllResources ()
 
static RENDERCORE_API void InitPreRHIResources ()
 
static RENDERCORE_API void ChangeFeatureLevel (ERHIFeatureLevel::Type NewFeatureLevel)
 
static RENDERCORE_API FName SetScopeName (FName Name)
 
- Public Attributes inherited from FVertexBuffer
FBufferRHIRef VertexBufferRHI
 
- Public Attributes inherited from FRenderResource
ERenderResourceState ResourceState = ERenderResourceState::Default
 
- Protected Member Functions inherited from FRenderResource
void SetFeatureLevel (const FStaticFeatureLevel InFeatureLevel)
 
const FStaticFeatureLevel GetFeatureLevel () const
 
bool HasValidFeatureLevel () const
 
template<typename T >
FBufferRHIRef CreateRHIBuffer (FRHICommandListBase &RHICmdList, T &InOutResourceObject, uint32 ResourceCount, EBufferUsageFlags InBufferUsageFlags, const TCHAR *InDebugName)
 
void SetInitPhase (EInitPhase InInitPhase)
 
- Static Protected Member Functions inherited from FRenderResource
static RENDERCORE_API FRHICommandListBaseGetImmediateCommandList ()
 

Detailed Description

A vertex buffer of positions.

Constructor & Destructor Documentation

◆ FPositionVertexBuffer()

FPositionVertexBuffer::FPositionVertexBuffer ( )

Default constructor.

◆ ~FPositionVertexBuffer()

FPositionVertexBuffer::~FPositionVertexBuffer ( )

Destructor.

Member Function Documentation

◆ AppendVertices()

bool FPositionVertexBuffer::AppendVertices ( const FStaticMeshBuildVertex Vertices,
const uint32  NumVerticesToAppend 
)

Appends the specified vertices to the end of the buffer

Parameters
VerticesThe vertex data to be appended. Must not be nullptr.
NumVerticesToAppendHow many vertices should be added
Returns
true if append operation is successful

◆ BindPositionVertexBuffer()

void FPositionVertexBuffer::BindPositionVertexBuffer ( const class FVertexFactory VertexFactory,
struct FStaticMeshDataType Data 
) const

◆ CleanUp()

void FPositionVertexBuffer::CleanUp ( )

Delete existing resources

◆ ClearMetaData()

void FPositionVertexBuffer::ClearMetaData ( )

◆ CreateRHIBuffer()

FBufferRHIRef FPositionVertexBuffer::CreateRHIBuffer ( FRHICommandListBase RHICmdList)

Create an RHI vertex buffer with CPU data. CPU data may be discarded after creation (see TResourceArray::Discard)

◆ GetAllocatedSize()

SIZE_T FPositionVertexBuffer::GetAllocatedSize ( ) const
inline

◆ GetAllowCPUAccess()

bool FPositionVertexBuffer::GetAllowCPUAccess ( ) const

◆ GetFriendlyName()

virtual FString FPositionVertexBuffer::GetFriendlyName ( ) const
inlineoverridevirtual
Returns
The resource's friendly name. Typically a UObject name.

Reimplemented from FVertexBuffer.

◆ GetNumVertices()

uint32 FPositionVertexBuffer::GetNumVertices ( ) const
inline

◆ GetSRV()

FRHIShaderResourceView * FPositionVertexBuffer::GetSRV ( ) const
inline

◆ GetStride()

uint32 FPositionVertexBuffer::GetStride ( ) const
inline

◆ GetVertexData() [1/2]

void * FPositionVertexBuffer::GetVertexData ( )
inline

◆ GetVertexData() [2/2]

const void * FPositionVertexBuffer::GetVertexData ( ) const
inline

◆ Init() [1/5]

void FPositionVertexBuffer::Init ( const FConstMeshBuildVertexView InVertices,
bool  bInNeedsCPUAccess = true 
)

◆ Init() [2/5]

void FPositionVertexBuffer::Init ( const FPositionVertexBuffer InVertexBuffer,
bool  bInNeedsCPUAccess = true 
)

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

Parameters
InVertexBuffer- The vertex buffer to initialize from.

◆ Init() [3/5]

void FPositionVertexBuffer::Init ( const TArray< FStaticMeshBuildVertex > &  InVertices,
bool  bInNeedsCPUAccess = true 
)

Initializes the buffer with the given vertices, used to convert legacy layouts.

Parameters
InVertices- The vertices to initialize the buffer with.

◆ Init() [4/5]

void FPositionVertexBuffer::Init ( const TArray< FVector3f > &  InPositions,
bool  bInNeedsCPUAccess = true 
)

◆ Init() [5/5]

void FPositionVertexBuffer::Init ( uint32  NumVertices,
bool  bInNeedsCPUAccess = true 
)

◆ InitRHI()

void FPositionVertexBuffer::InitRHI ( FRHICommandListBase RHICmdList)
overridevirtual

Initializes the RHI resources used by this resource. Called when entering the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.

Reimplemented from FRenderResource.

◆ InitRHIForStreaming()

void FPositionVertexBuffer::InitRHIForStreaming ( FRHIBuffer IntermediateBuffer,
FRHIResourceReplaceBatcher Batcher 
)

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

◆ operator=()

void FPositionVertexBuffer::operator= ( const FPositionVertexBuffer Other)

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

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

◆ ReleaseRHI()

void FPositionVertexBuffer::ReleaseRHI ( )
overridevirtual

Releases the RHI resources used by this resource. Called when leaving the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.

Reimplemented from FVertexBuffer.

◆ ReleaseRHIForStreaming()

void FPositionVertexBuffer::ReleaseRHIForStreaming ( FRHIResourceReplaceBatcher Batcher)

◆ Serialize()

void FPositionVertexBuffer::Serialize ( FArchive Ar,
bool  bInNeedsCPUAccess 
)

Serializer

Parameters
ArArchive to serialize with
bInNeedsCPUAccessWhether the elements need to be accessed by the CPU

◆ SerializeMetaData()

void FPositionVertexBuffer::SerializeMetaData ( FArchive Ar)

◆ SetMetaData()

void FPositionVertexBuffer::SetMetaData ( uint32  InStride,
uint32  InNumVertices 
)

◆ VertexPosition() [1/2]

FVector3f & FPositionVertexBuffer::VertexPosition ( uint32  VertexIndex)
inline

◆ VertexPosition() [2/2]

const FVector3f & FPositionVertexBuffer::VertexPosition ( uint32  VertexIndex) const
inline

The documentation for this class was generated from the following files: