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

#include <RayTracingInstance.h>

Public Member Functions

bool OwnsMaterials () const
 
TArrayView< const FMeshBatchGetMaterials () const
 
bool OwnsPrimitiveInstanceIndices () const
 
TConstArrayView< uint32GetPrimitiveInstanceIndices () const
 
bool OwnsTransforms () const
 
TConstArrayView< FMatrixGetTransforms () const
 
PRAGMA_DISABLE_DEPRECATION_WARNINGS FRayTracingInstance ()=default
 
 FRayTracingInstance (const FRayTracingInstance &)=default
 
FRayTracingInstanceoperator= (const FRayTracingInstance &)=default
 
 FRayTracingInstance (FRayTracingInstance &&)=default
 
FRayTracingInstanceoperator= (FRayTracingInstance &&)=default
 
 ~FRayTracingInstance ()=default
 

Public Attributes

const FRayTracingGeometryGeometry
 
TArray< FMeshBatchMaterials
 
TConstArrayView< FMeshBatchMaterialsView
 
bool bApplyLocalBoundsTransform = false
 
bool bThinGeometry = false
 
ERayTracingInstanceLayer InstanceLayer = ERayTracingInstanceLayer::NearField
 
bool bInstanceMaskAndFlagsDirty = true
 
uint32 NumTransforms = 0
 
TArray< uint32PrimitiveInstanceIndices
 
TConstArrayView< uint32PrimitiveInstanceIndicesView
 
TArray< FMatrixInstanceTransforms
 
TConstArrayView< FMatrixInstanceTransformsView
 

Constructor & Destructor Documentation

◆ FRayTracingInstance() [1/3]

PRAGMA_DISABLE_DEPRECATION_WARNINGS FRayTracingInstance::FRayTracingInstance ( )
default

◆ FRayTracingInstance() [2/3]

FRayTracingInstance::FRayTracingInstance ( const FRayTracingInstance )
default

◆ FRayTracingInstance() [3/3]

FRayTracingInstance::FRayTracingInstance ( FRayTracingInstance &&  )
default

◆ ~FRayTracingInstance()

FRayTracingInstance::~FRayTracingInstance ( )
default

Member Function Documentation

◆ GetMaterials()

TArrayView< const FMeshBatch > FRayTracingInstance::GetMaterials ( ) const
inline

◆ GetPrimitiveInstanceIndices()

TConstArrayView< uint32 > FRayTracingInstance::GetPrimitiveInstanceIndices ( ) const
inline

◆ GetTransforms()

TConstArrayView< FMatrix > FRayTracingInstance::GetTransforms ( ) const
inline

◆ operator=() [1/2]

FRayTracingInstance & FRayTracingInstance::operator= ( const FRayTracingInstance )
default

◆ operator=() [2/2]

FRayTracingInstance & FRayTracingInstance::operator= ( FRayTracingInstance &&  )
default

◆ OwnsMaterials()

bool FRayTracingInstance::OwnsMaterials ( ) const
inline

◆ OwnsPrimitiveInstanceIndices()

bool FRayTracingInstance::OwnsPrimitiveInstanceIndices ( ) const
inline

◆ OwnsTransforms()

bool FRayTracingInstance::OwnsTransforms ( ) const
inline

Member Data Documentation

◆ bApplyLocalBoundsTransform

bool FRayTracingInstance::bApplyLocalBoundsTransform = false

Whether local bounds scale and center translation should be applied to the instance transform.

◆ bInstanceMaskAndFlagsDirty

bool FRayTracingInstance::bInstanceMaskAndFlagsDirty = true

Mark InstanceMaskAndFlags dirty to be automatically updated in the renderer module (dirty by default). If caching is used, clean the dirty state by setting it to false so no duplicate update will be performed in the renderer module.

◆ bThinGeometry

bool FRayTracingInstance::bThinGeometry = false

Whether the instance is thin geometry (e.g., Hair strands)

◆ Geometry

const FRayTracingGeometry* FRayTracingInstance::Geometry

The underlying geometry of this instance specification.

◆ InstanceLayer

ERayTracingInstanceLayer FRayTracingInstance::InstanceLayer = ERayTracingInstanceLayer::NearField

◆ InstanceTransforms

TArray<FMatrix> FRayTracingInstance::InstanceTransforms

Instance transforms.

◆ InstanceTransformsView

TConstArrayView<FMatrix> FRayTracingInstance::InstanceTransformsView

Similar to InstanceTransforms, but memory is owned by someone else (i.g. FPrimitiveSceneProxy).

◆ Materials

TArray<FMeshBatch> FRayTracingInstance::Materials

Materials for each segment, in the form of mesh batches. We will check whether every segment of the geometry has been assigned a material. Unlike the raster path, mesh batches assigned here are considered transient and will be discarded immediately upon we finished gathering for the current scene proxy.

◆ MaterialsView

TConstArrayView<FMeshBatch> FRayTracingInstance::MaterialsView

Similar to Materials, but memory is owned by someone else (i.g. FPrimitiveSceneProxy).

◆ NumTransforms

uint32 FRayTracingInstance::NumTransforms = 0

Transforms count. When NumTransforms == 1 we create a single instance. When it's more than one we create multiple identical instances with different transforms. When GPU transforms are used it is a conservative count. NumTransforms should be less or equal to `InstanceTransforms.Num()

◆ PrimitiveInstanceIndices

TArray<uint32> FRayTracingInstance::PrimitiveInstanceIndices

◆ PrimitiveInstanceIndicesView

TConstArrayView<uint32> FRayTracingInstance::PrimitiveInstanceIndicesView

Similar to PrimitiveInstanceIndices, but memory is owned by someone else (i.g. FPrimitiveSceneProxy).


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