engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FStaticMeshVertexBuffer类 参考

Vertex buffer for a static mesh LOD 更多...

#include <StaticMeshVertexBuffer.h>

+ 类 FStaticMeshVertexBuffer 继承关系图:

Public 成员函数

ENGINE_API void AppendVertices (const FStaticMeshBuildVertex *Vertices, const uint32 NumVerticesToAppend)
 Appends the specified vertices to the end of the buffer 更多...
 
ENGINE_API void CleanUp ()
 Delete existing resources
 
void CopyRHIForStreaming (const FStaticMeshVertexBuffer &Other, bool InAllowCPUAccess)
 Copy everything, keeping reference to the same RHI resources.
 
FVertexBufferRHIRef CreateTangentsRHIBuffer_RenderThread ()
 Create an RHI vertex buffer with CPU data. 更多...
 
ENGINE_API FStaticMeshVertexBuffer ()
 Default constructor.
 
virtual FString GetFriendlyName () const override
 
FORCEINLINE_DEBUGGABLE FVector2D GetVertexUV (uint32 VertexIndex, uint32 UVIndex) const
 Set the vertex UV values at the given index in the vertex buffer 更多...
 
void Init (const FStaticMeshVertexBuffer &InVertexBuffer, bool bNeedsCPUAccess=true)
 Initializes this vertex buffer with the contents of the given vertex buffer. 更多...
 
ENGINE_API void Init (const TArray< FStaticMeshBuildVertex > &InVertices, uint32 InNumTexCoords, bool bNeedsCPUAccess=true)
 Initializes the buffer with the given vertices. 更多...
 
virtual ENGINE_API void InitResource () override
 Initializes the resource. 更多...
 
virtual ENGINE_API void InitRHI () override
 Initializes the RHI resources used by this resource. 更多...
 
template<uint32 MaxNumUpdates>
void InitRHIForStreaming (FRHIVertexBuffer *IntermediateTangentsBuffer, FRHIVertexBuffer *IntermediateTexCoordBuffer, TRHIResourceUpdateBatcher< MaxNumUpdates > &Batcher)
 Similar to Init/ReleaseRHI but only update existing SRV so references to the SRV stays valid
 
ENGINE_API void operator= (const FStaticMeshVertexBuffer &Other)
 Specialized assignment operator, only used when importing LOD's.
 
virtual ENGINE_API void ReleaseResource () override
 Prepares the resource for deletion. 更多...
 
virtual ENGINE_API void ReleaseRHI () override
 Releases the RHI resources used by this resource. 更多...
 
void Serialize (FArchive &Ar, bool bNeedsCPUAccess)
 Serializer 更多...
 
FORCEINLINE_DEBUGGABLE void SetVertexUV (uint32 VertexIndex, uint32 UVIndex, const FVector2D &Vec2D)
 Set the vertex UV values at the given index in the vertex buffer 更多...
 
FORCEINLINE_DEBUGGABLE FVector VertexTangentY (uint32 VertexIndex) const
 Calculate the binormal (TangentY) vector using the normal,tangent vectors 更多...
 
ENGINE_API ~FStaticMeshVertexBuffer ()
 Destructor.
 
- Public 成员函数 继承自 FRenderResource
 FRenderResource ()
 Default constructor.
 
 FRenderResource (ERHIFeatureLevel::Type InFeatureLevel)
 Constructor when we know what feature level this resource should support
 
virtual FString GetFriendlyName () const
 
virtual void InitDynamicRHI ()
 Initializes the dynamic RHI resource and/or RHI render target used by this resource. 更多...
 
virtual void InitResource ()
 Initializes the resource. 更多...
 
virtual void InitRHI ()
 Initializes the RHI resources used by this resource. 更多...
 
virtual void ReleaseDynamicRHI ()
 Releases the dynamic RHI resource and/or RHI render target resources used by this resource. 更多...
 
virtual void ReleaseResource ()
 Prepares the resource for deletion. 更多...
 
virtual void ReleaseRHI ()
 Releases the RHI resources used by this resource. 更多...
 
void UpdateRHI ()
 If the resource's RHI resources have been initialized, then release and reinitialize it. 更多...
 
virtual ~FRenderResource ()
 Destructor used to catch unreleased resources.
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 FRenderResource
static void InitPreRHIResources ()
 Initialize all resources initialized before the RHI was initialized
 

详细描述

Vertex buffer for a static mesh LOD

成员函数说明

◆ AppendVertices()

ENGINE_API void FStaticMeshVertexBuffer::AppendVertices ( const FStaticMeshBuildVertex *  Vertices,
const uint32  NumVerticesToAppend 
)

Appends the specified vertices to the end of the buffer

参数
VerticesThe vertex data to be appended. Must not be nullptr.
NumVerticesToAppendHow many vertices should be added

◆ CreateTangentsRHIBuffer_RenderThread()

FVertexBufferRHIRef FStaticMeshVertexBuffer::CreateTangentsRHIBuffer_RenderThread ( )

Create an RHI vertex buffer with CPU data.

CPU data may be discarded after creation (see TResourceArray::Discard)

◆ GetFriendlyName()

virtual FString FStaticMeshVertexBuffer::GetFriendlyName ( ) const
inlineoverridevirtual
返回
The resource's friendly name. Typically a UObject name.

重载 FRenderResource .

◆ GetVertexUV()

FORCEINLINE_DEBUGGABLE FVector2D FStaticMeshVertexBuffer::GetVertexUV ( uint32  VertexIndex,
uint32  UVIndex 
) const
inline

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

参数
VertexIndex- index into the vertex buffer
UVIndex- [0,MAX_STATIC_TEXCOORDS] value to index into UVs array
2DUV values

◆ Init() [1/2]

void FStaticMeshVertexBuffer::Init ( const FStaticMeshVertexBuffer &  InVertexBuffer,
bool  bNeedsCPUAccess = true 
)

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

参数
InVertexBuffer- The vertex buffer to initialize from.

◆ Init() [2/2]

ENGINE_API void FStaticMeshVertexBuffer::Init ( const TArray< FStaticMeshBuildVertex > &  InVertices,
uint32  InNumTexCoords,
bool  bNeedsCPUAccess = true 
)

Initializes the buffer with the given vertices.

参数
InVertices- The vertices to initialize the buffer with.
InNumTexCoords- The number of texture coordinate to store in the buffer.

◆ InitResource()

virtual ENGINE_API void FStaticMeshVertexBuffer::InitResource ( )
overridevirtual

Initializes the resource.

This is only called by the rendering thread.

重载 FRenderResource .

◆ InitRHI()

virtual ENGINE_API void FStaticMeshVertexBuffer::InitRHI ( )
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.

重载 FRenderResource .

◆ ReleaseResource()

virtual ENGINE_API void FStaticMeshVertexBuffer::ReleaseResource ( )
overridevirtual

Prepares the resource for deletion.

This is only called by the rendering thread.

重载 FRenderResource .

◆ ReleaseRHI()

virtual ENGINE_API void FStaticMeshVertexBuffer::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.

重载 FRenderResource .

◆ Serialize()

void FStaticMeshVertexBuffer::Serialize ( FArchive &  Ar,
bool  bNeedsCPUAccess 
)

Serializer

参数
ArArchive to serialize with
bNeedsCPUAccessWhether the elements need to be accessed by the CPU

◆ SetVertexUV()

FORCEINLINE_DEBUGGABLE void FStaticMeshVertexBuffer::SetVertexUV ( uint32  VertexIndex,
uint32  UVIndex,
const FVector2D &  Vec2D 
)
inline

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

参数
VertexIndex- index into the vertex buffer
UVIndex- [0,MAX_STATIC_TEXCOORDS] value to index into UVs array
Vec2D- UV values to set

◆ VertexTangentY()

FORCEINLINE_DEBUGGABLE FVector FStaticMeshVertexBuffer::VertexTangentY ( uint32  VertexIndex) const
inline

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

参数
VertexIndex- index into the vertex buffer
返回
binormal (TangentY) vector

该类的文档由以下文件生成: