UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FStaticMeshLODResources Struct Reference

#include <StaticMeshResources.h>

+ Inheritance diagram for FStaticMeshLODResources:

Public Member Functions

ENGINE_API FStaticMeshLODResources (bool bAddRef=true)
 
ENGINE_API ~FStaticMeshLODResources ()
 
template<typename TBatcher >
void ReleaseRHIForStreaming (TBatcher &Batcher)
 
void InitResources (UStaticMesh *Parent, int32 LODIndex)
 
void ReleaseResources ()
 
void Serialize (FArchive &Ar, UObject *Owner, int32 Idx)
 
ENGINE_API void GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize) const
 
SIZE_T GetCPUAccessMemoryOverhead () const
 
ENGINE_API int32 GetNumTriangles () const
 
ENGINE_API int32 GetNumVertices () const
 
ENGINE_API int32 GetNumTexCoords () const
 
- Public Member Functions inherited from FRefCountBase
 FRefCountBase ()=default
 
virtual ~FRefCountBase ()=default
 
 FRefCountBase (const FRefCountBase &Rhs)=delete
 
FRefCountBaseoperator= (const FRefCountBase &Rhs)=delete
 
FReturnedRefCountValue AddRef () const
 
uint32 Release () const
 
uint32 GetRefCount () const
 

Public Attributes

FStaticMeshSectionArray Sections
 
class FDistanceFieldVolumeDataDistanceFieldData = nullptr
 
class FCardRepresentationDataCardRepresentationData
 
FRayTracingGeometryRayTracingGeometry = nullptr
 
FBoxSphereBounds SourceMeshBounds { ForceInit }
 
float MaxDeviation
 
uint32 bHasDepthOnlyIndices: 1
 
uint32 bHasReversedIndices: 1
 
uint32 bHasReversedDepthOnlyIndices: 1
 
uint32 bHasColorVertexData: 1
 
uint32 bHasWireframeIndices: 1
 
uint32 bBuffersInlined: 1
 
uint32 bIsOptionalLOD: 1
 
uint32 DepthOnlyNumTriangles
 
uint32 BuffersSize
 
FByteBulkData StreamingBulkData
 
FStaticMeshVertexBuffers VertexBuffers
 
FRawStaticIndexBuffer IndexBuffer
 
FRawStaticIndexBuffer DepthOnlyIndexBuffer
 
FAdditionalStaticMeshIndexBuffersAdditionalIndexBuffers = nullptr
 
FStaticMeshAreaWeightedSectionSampler AreaWeightedSampler
 
FStaticMeshSectionAreaWeightedTriangleSamplerArray AreaWeightedSectionSamplers
 
FStaticMeshSectionAreaWeightedTriangleSamplerBuffer AreaWeightedSectionSamplersBuffer
 

Friends

class FStaticMeshRenderData
 
class FStaticMeshStreamIn
 
class FStaticMeshStreamIn_IO
 
class FStaticMeshStreamOut
 

Detailed Description

Rendering resources needed to render an individual static mesh LOD. This structure is ref counted to allow the LOD streamer to evaluate the number of readers to it (readers that could access the CPU data). Because the stream out clears the CPU readable data, CPU code that samples it must ensure to only reference LODs above CurrentFirstLODIdx.

Constructor & Destructor Documentation

◆ FStaticMeshLODResources()

FStaticMeshLODResources::FStaticMeshLODResources ( bool  bAddRef = true)

Default constructor. Add a reference if not stored with a TRefCountPtr

◆ ~FStaticMeshLODResources()

FStaticMeshLODResources::~FStaticMeshLODResources ( )

Member Function Documentation

◆ GetCPUAccessMemoryOverhead()

SIZE_T FStaticMeshLODResources::GetCPUAccessMemoryOverhead ( ) const

Get the estimated memory overhead of buffers marked as NeedsCPUAccess.

◆ GetNumTexCoords()

int32 FStaticMeshLODResources::GetNumTexCoords ( ) const

◆ GetNumTriangles()

int32 FStaticMeshLODResources::GetNumTriangles ( ) const

Return the triangle count of this LOD.

◆ GetNumVertices()

int32 FStaticMeshLODResources::GetNumVertices ( ) const

Return the number of vertices in this LOD.

◆ GetResourceSizeEx()

void FStaticMeshLODResources::GetResourceSizeEx ( FResourceSizeEx CumulativeResourceSize) const

◆ InitResources()

void FStaticMeshLODResources::InitResources ( UStaticMesh Parent,
int32  LODIndex 
)

Initializes all rendering resources.

◆ ReleaseResources()

void FStaticMeshLODResources::ReleaseResources ( )

Releases all rendering resources.

◆ ReleaseRHIForStreaming()

template<typename TBatcher >
void FStaticMeshLODResources::ReleaseRHIForStreaming ( TBatcher Batcher)
inline

◆ Serialize()

void FStaticMeshLODResources::Serialize ( FArchive Ar,
UObject Owner,
int32  Idx 
)

Serialize.

Friends And Related Symbol Documentation

◆ FStaticMeshRenderData

◆ FStaticMeshStreamIn

◆ FStaticMeshStreamIn_IO

◆ FStaticMeshStreamOut

Member Data Documentation

◆ AdditionalIndexBuffers

FAdditionalStaticMeshIndexBuffers* FStaticMeshLODResources::AdditionalIndexBuffers = nullptr

◆ AreaWeightedSampler

FStaticMeshAreaWeightedSectionSampler FStaticMeshLODResources::AreaWeightedSampler

Allows uniform random selection of mesh sections based on their area.

◆ AreaWeightedSectionSamplers

FStaticMeshSectionAreaWeightedTriangleSamplerArray FStaticMeshLODResources::AreaWeightedSectionSamplers

Allows uniform random selection of triangles on each mesh section based on triangle area.

◆ AreaWeightedSectionSamplersBuffer

FStaticMeshSectionAreaWeightedTriangleSamplerBuffer FStaticMeshLODResources::AreaWeightedSectionSamplersBuffer

Allows uniform random selection of triangles on GPU. It is not cooked and serialised but created at runtime from AreaWeightedSectionSamplers when it is available and static mesh bSupportGpuUniformlyDistributedSampling=true

◆ bBuffersInlined

uint32 FStaticMeshLODResources::bBuffersInlined

True if vertex and index data are serialized inline

◆ bHasColorVertexData

uint32 FStaticMeshLODResources::bHasColorVertexData

◆ bHasDepthOnlyIndices

uint32 FStaticMeshLODResources::bHasDepthOnlyIndices

True if the depth only index buffers contained data at init. Needed as it will not be available to the CPU afterwards.

◆ bHasReversedDepthOnlyIndices

uint32 FStaticMeshLODResources::bHasReversedDepthOnlyIndices

True if the reversed index buffers contained data at init. Needed as it will not be available to the CPU afterwards.

◆ bHasReversedIndices

uint32 FStaticMeshLODResources::bHasReversedIndices

True if the reversed index buffers contained data at init. Needed as it will not be available to the CPU afterwards.

◆ bHasWireframeIndices

uint32 FStaticMeshLODResources::bHasWireframeIndices

◆ bIsOptionalLOD

uint32 FStaticMeshLODResources::bIsOptionalLOD

True if this LOD is optional. That is, vertex and index data may not be available

◆ BuffersSize

uint32 FStaticMeshLODResources::BuffersSize

Sum of all vertex and index buffer sizes. Calculated in SerializeBuffers

◆ CardRepresentationData

class FCardRepresentationData* FStaticMeshLODResources::CardRepresentationData

Card Representation data associated with this mesh, null if not present.

◆ DepthOnlyIndexBuffer

FRawStaticIndexBuffer FStaticMeshLODResources::DepthOnlyIndexBuffer

Index buffer resource for rendering in depth only passes.

◆ DepthOnlyNumTriangles

uint32 FStaticMeshLODResources::DepthOnlyNumTriangles

◆ DistanceFieldData

class FDistanceFieldVolumeData* FStaticMeshLODResources::DistanceFieldData = nullptr

Distance field data associated with this mesh, null if not present.

◆ IndexBuffer

FRawStaticIndexBuffer FStaticMeshLODResources::IndexBuffer

Index buffer resource for rendering.

◆ MaxDeviation

float FStaticMeshLODResources::MaxDeviation

The maximum distance by which this LOD deviates from the base from which it was generated.

◆ RayTracingGeometry

FRayTracingGeometry* FStaticMeshLODResources::RayTracingGeometry = nullptr

Geometry for ray tracing.

◆ Sections

FStaticMeshSectionArray FStaticMeshLODResources::Sections

Sections for this LOD.

◆ SourceMeshBounds

FBoxSphereBounds FStaticMeshLODResources::SourceMeshBounds { ForceInit }

The bounds of the source mesh data for this LOD

◆ StreamingBulkData

FByteBulkData FStaticMeshLODResources::StreamingBulkData

◆ VertexBuffers

FStaticMeshVertexBuffers FStaticMeshLODResources::VertexBuffers

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