Navigation
API > API/Runtime > API/Runtime/Engine
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.
| Name | FStaticMeshLODResources |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/StaticMeshResources.h |
| Include Path | #include "StaticMeshResources.h" |
Syntax
struct FStaticMeshLODResources : public FRefCountBase
Inheritance Hierarchy
- TTransactionalAtomicRefCount → FRefCountBase → FStaticMeshLODResources
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FStaticMeshLODResources
(
bool bAddRef |
Default constructor. | StaticMeshResources.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FStaticMeshLODResources() |
StaticMeshResources.h |
Structs
| Name | Remarks |
|---|---|
| FStaticMeshBuffersSize | Due to discard on load, size of an static mesh LOD is not known at cook time and this struct is used to keep track of all the information needed to compute LOD size at load time |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AdditionalIndexBuffers | FAdditionalStaticMeshIndexBuffers * | StaticMeshResources.h | ||
| AreaWeightedSampler | FStaticMeshAreaWeightedSectionSampler | Allows uniform random selection of mesh sections based on their area. | StaticMeshResources.h | |
| AreaWeightedSectionSamplers | FStaticMeshSectionAreaWeightedTriangleSamplerArray | Allows uniform random selection of triangles on each mesh section based on triangle area. | StaticMeshResources.h | |
| AreaWeightedSectionSamplersBuffer | FStaticMeshSectionAreaWeightedTriangleSamplerBuffer | Allows uniform random selection of triangles on GPU. | StaticMeshResources.h | |
| bBuffersInlined | uint32 | True if vertex and index data are serialized inline | StaticMeshResources.h | |
| bHasColorVertexData | uint32 | StaticMeshResources.h | ||
| bHasDepthOnlyIndices | uint32 | True if the depth only index buffers contained data at init. | StaticMeshResources.h | |
| bHasReversedDepthOnlyIndices | uint32 | True if the reversed index buffers contained data at init. | StaticMeshResources.h | |
| bHasReversedIndices | uint32 | True if the reversed index buffers contained data at init. | StaticMeshResources.h | |
| bHasWireframeIndices | uint32 | StaticMeshResources.h | ||
| bIsOptionalLOD | uint32 | True if this LOD is optional. That is, vertex and index data may not be available | StaticMeshResources.h | |
| BuffersSize | uint32 | Sum of all vertex and index buffer sizes. Calculated in SerializeBuffers | StaticMeshResources.h | |
| BulkData | FByteBulkData | StaticMeshResources.h | ||
| CardRepresentationData | FCardRepresentationData * | Card Representation data associated with this mesh, null if not present. | StaticMeshResources.h | |
| DepthOnlyIndexBuffer | FRawStaticIndexBuffer | Index buffer resource for rendering in depth only passes. | StaticMeshResources.h | |
| DepthOnlyNumTriangles | uint32 | StaticMeshResources.h | ||
| DerivedDataKey | FString | StaticMeshResources.h | ||
| DistanceFieldData | FDistanceFieldVolumeData * | Distance field data associated with this mesh, null if not present. | StaticMeshResources.h | |
| IndexBuffer | FRawStaticIndexBuffer | Index buffer resource for rendering. | StaticMeshResources.h | |
| MaxDeviation | float | The maximum distance by which this LOD deviates from the base from which it was generated. | StaticMeshResources.h | |
| RayTracingGeometry | FRayTracingGeometry * | Geometry for ray tracing. | StaticMeshResources.h | |
| Sections | FStaticMeshSectionArray | Sections for this LOD. | StaticMeshResources.h | |
| SourceMeshBounds | FBoxSphereBounds | The bounds of the source mesh data for this LOD | StaticMeshResources.h | |
| StreamingBulkData | FByteBulkData | StaticMeshResources.h | ||
| VertexBuffers | FStaticMeshVertexBuffers | StaticMeshResources.h | ||
| WedgeMap | TArray< int32 > | Map of wedge index to vertex index. Each LOD need one | StaticMeshResources.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SIZE_T GetCPUAccessMemoryOverhead() |
Get the estimated memory overhead of buffers marked as NeedsCPUAccess. | StaticMeshResources.h | |
int32 GetNumTexCoords() |
StaticMeshResources.h | ||
int32 GetNumTriangles() |
Return the triangle count of this LOD. | StaticMeshResources.h | |
int32 GetNumVertices() |
Return the number of vertices in this LOD. | StaticMeshResources.h | |
void GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
StaticMeshResources.h | ||
void InitResources
(
UStaticMesh* Parent, |
Initializes all rendering resources. | StaticMeshResources.h | |
void ReleaseResources() |
Releases all rendering resources. | StaticMeshResources.h | |
void ReleaseRHIForStreaming
(
TBatcher& Batcher |
StaticMeshResources.h | ||
| Serialize. | StaticMeshResources.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AccumIndexBufferSize
(
const FRawStaticIndexBuffer& IndexBuffer, |
Compute the size of IndexBuffer and add the result to OutSize | StaticMeshResources.h | |
static void AccumRayTracingGeometrySize
(
const FRayTracingGeometry& RayTracingGeometry, |
Compute the size of RayTracingGeometry and add the result to OutSize | StaticMeshResources.h | |
static void AccumVertexBuffersSize
(
const FStaticMeshVertexBuffers& VertexBuffers, |
Compute the size of VertexBuffers and add the result to OutSize | StaticMeshResources.h | |
static uint8 GenerateClassStripFlags
(
FArchive& Ar, |
StaticMeshResources.h | ||
static int32 GetNumOptionalLODsAllowed
(
const ITargetPlatform* TargetPlatform, |
StaticMeshResources.h | ||
static int32 GetPlatformMinLODIdx
(
const ITargetPlatform* TargetPlatform, |
StaticMeshResources.h | ||
static bool IsLODCookedOut
(
const ITargetPlatform* TargetPlatform, |
StaticMeshResources.h | ||
static bool IsLODInlined
(
const ITargetPlatform* TargetPlatform, |
StaticMeshResources.h |