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

#include <StaticMeshLight.h>

+ Inheritance diagram for FStaticMeshStaticLightingMesh:

Public Member Functions

 FStaticMeshStaticLightingMesh (const UStaticMeshComponent *InPrimitive, int32 InLODIndex, const TArray< ULightComponent * > &InRelevantLights)
 
 FStaticMeshStaticLightingMesh ()
 
virtual void GetTriangle (int32 TriangleIndex, FStaticLightingVertex &OutV0, FStaticLightingVertex &OutV1, FStaticLightingVertex &OutV2) const
 
virtual void GetTriangleIndices (int32 TriangleIndex, int32 &OutI0, int32 &OutI1, int32 &OutI2) const
 
virtual bool ShouldCastShadow (ULightComponent *Light, const FStaticLightingMapping *Receiver) const
 
virtual bool IsTriangleCastingShadow (uint32 TriangleIndex) const
 
virtual bool IsControllingShadowPerElement () const
 
virtual bool IsUniformShadowCaster () const
 
virtual FLightRayIntersection IntersectLightRay (const FVector &Start, const FVector &End, bool bFindNearestIntersection) const
 
virtual bool IsInstancedMesh () const override
 
- Public Member Functions inherited from FStaticLightingMesh
ENGINE_API FStaticLightingMesh (int32 InNumTriangles, int32 InNumShadingTriangles, int32 InNumVertices, int32 InNumShadingVertices, int32 InTextureCoordinateIndex, bool bInCastShadow, bool bInTwoSidedMaterial, const TArray< ULightComponent * > &InRelevantLights, const UPrimitiveComponent *const InComponent, const FBox &InBoundingBox, const FGuid &InSourceMeshGuid, const FGuid &InComponentGuid)
 
ENGINE_API FStaticLightingMesh ()
 
virtual ENGINE_API void Serialize (FArchive &Ar)
 
virtual ~FStaticLightingMesh ()
 
virtual void GetShadingTriangle (int32 TriangleIndex, FStaticLightingVertex &OutV0, FStaticLightingVertex &OutV1, FStaticLightingVertex &OutV2) const
 
virtual void GetShadingTriangleIndices (int32 TriangleIndex, int32 &OutI0, int32 &OutI1, int32 &OutI2) const
 
virtual const FGuidGetLightingGuid () const
 
- Public Member Functions inherited from FRefCountedObject
 FRefCountedObject ()
 
virtual ~FRefCountedObject ()
 
 FRefCountedObject (const FRefCountedObject &Rhs)=delete
 
FRefCountedObjectoperator= (const FRefCountedObject &Rhs)=delete
 
FReturnedRefCountValue AddRef () const
 
uint32 Release () const
 
uint32 GetRefCount () const
 

Public Attributes

TArray< FStaticLightingMesh * > OtherLODs
 
- Public Attributes inherited from FStaticLightingMesh
const int32 NumTriangles
 
const int32 NumShadingTriangles
 
const int32 NumVertices
 
const int32 NumShadingVertices
 
const int32 TextureCoordinateIndex
 
TArray< int32VisibilityIds
 
const uint32 bCastShadow: 1
 
const uint32 bTwoSidedMaterial: 1
 
const TArray< ULightComponent * > RelevantLights
 
TArray< FGuidRelevantLightsGuid
 
const UPrimitiveComponent *const Component
 
FGuid ComponentGuid
 
FBox BoundingBox
 
FGuid Guid
 
FGuid SourceMeshGuid
 
TArray< TRefCountPtr< FStaticLightingMesh > > OtherMeshLODs
 
uint32 HLODTreeIndex
 
uint32 HLODChildStartIndex
 
uint32 HLODChildEndIndex
 

Protected Member Functions

void SetLocalToWorld (const FMatrix &InLocalToWorld)
 

Protected Attributes

const int32 LODIndex
 

Friends

class FLightmassExporter
 

Detailed Description

Represents the triangles of one LOD of a static mesh primitive to the static lighting system.

Constructor & Destructor Documentation

◆ FStaticMeshStaticLightingMesh() [1/2]

FStaticMeshStaticLightingMesh::FStaticMeshStaticLightingMesh ( const UStaticMeshComponent *  InPrimitive,
int32  InLODIndex,
const TArray< ULightComponent * > &  InRelevantLights 
)

Initialization constructor.

◆ FStaticMeshStaticLightingMesh() [2/2]

FStaticMeshStaticLightingMesh::FStaticMeshStaticLightingMesh ( )

Member Function Documentation

◆ GetTriangle()

void FStaticMeshStaticLightingMesh::GetTriangle ( int32  TriangleIndex,
FStaticLightingVertex OutV0,
FStaticLightingVertex OutV1,
FStaticLightingVertex OutV2 
) const
virtual

Accesses a triangle.

Parameters
TriangleIndex- The triangle to access.
OutV0- Upon return, should contain the first vertex of the triangle.
OutV1- Upon return, should contain the second vertex of the triangle.
OutV2- Upon return, should contain the third vertex of the triangle.

Implements FStaticLightingMesh.

◆ GetTriangleIndices()

void FStaticMeshStaticLightingMesh::GetTriangleIndices ( int32  TriangleIndex,
int32 OutI0,
int32 OutI1,
int32 OutI2 
) const
virtual

Accesses a triangle's vertex indices.

Parameters
TriangleIndex- The triangle to access.
OutI0- Upon return, should contain the first vertex index of the triangle.
OutI1- Upon return, should contain the second vertex index of the triangle.
OutI2- Upon return, should contain the third vertex index of the triangle.

Implements FStaticLightingMesh.

◆ IntersectLightRay()

FLightRayIntersection FStaticMeshStaticLightingMesh::IntersectLightRay ( const FVector Start,
const FVector End,
bool  bFindNearestIntersection 
) const
virtual

Checks if a line segment intersects the mesh.

Parameters
Start- The start point of the line segment.
End- The end point of the line segment.
bFindNearestIntersection- Whether the nearest intersection is needed, or any intersection.
Returns
The intersection of the light-ray with the mesh.

Implements FStaticLightingMesh.

◆ IsControllingShadowPerElement()

bool FStaticMeshStaticLightingMesh::IsControllingShadowPerElement ( ) const
virtual
Returns
true if the mesh wants to control shadow casting per element rather than per mesh.

Reimplemented from FStaticLightingMesh.

◆ IsInstancedMesh()

virtual bool FStaticMeshStaticLightingMesh::IsInstancedMesh ( ) const
inlineoverridevirtual

Returns true if this mesh is an instanced mesh.

Implements FStaticLightingMesh.

◆ IsTriangleCastingShadow()

bool FStaticMeshStaticLightingMesh::IsTriangleCastingShadow ( uint32  TriangleIndex) const
virtual
Returns
true if the specified triangle casts a shadow.

Reimplemented from FStaticLightingMesh.

◆ IsUniformShadowCaster()

bool FStaticMeshStaticLightingMesh::IsUniformShadowCaster ( ) const
virtual

Checks whether ShouldCastShadow will return true always.

Returns
true if ShouldCastShadow will return true always.

Reimplemented from FStaticLightingMesh.

◆ SetLocalToWorld()

void FStaticMeshStaticLightingMesh::SetLocalToWorld ( const FMatrix InLocalToWorld)
protected

Sets the local to world matrix for this mesh, will also update LocalToWorldInverseTranspose

Parameters
InLocalToWorldLocal to world matrix to apply

Sets the local to world matrix for this mesh, will also update LocalToWorldInverseTranspose and determinant

Parameters
InLocalToWorldLocal to world matrix to apply

◆ ShouldCastShadow()

bool FStaticMeshStaticLightingMesh::ShouldCastShadow ( ULightComponent Light,
const FStaticLightingMapping Receiver 
) const
virtual

Determines whether the mesh should cast a shadow from a specific light on a specific mapping. This doesn't determine if the mesh actually shadows the receiver, just whether it should be allowed to.

Parameters
Light- The light source.
Receiver- The mapping which is receiving the light.
Returns
true if the mesh should shadow the receiver from the light.

Reimplemented from FStaticLightingMesh.

Friends And Related Symbol Documentation

◆ FLightmassExporter

friend class FLightmassExporter
friend

Member Data Documentation

◆ LODIndex

const int32 FStaticMeshStaticLightingMesh::LODIndex
protected

The LOD this mesh represents.

◆ OtherLODs

TArray<FStaticLightingMesh*> FStaticMeshStaticLightingMesh::OtherLODs

The meshes representing other LODs of this primitive.


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