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

#include <SkeletalMeshSampling.h>

+ Inheritance diagram for FSkeletalMeshAreaWeightedTriangleSampler:

Public Member Functions

ENGINE_API FSkeletalMeshAreaWeightedTriangleSampler ()
 
ENGINE_API void Init (USkeletalMesh *InOwner, int32 LODIndex, TArray< int32 > *InTriangleIndices)
 
virtual ENGINE_API float GetWeights (TArray< float > &OutWeights) override
 
- Public Member Functions inherited from FWeightedRandomSampler
 DECLARE_TYPE_LAYOUT (FWeightedRandomSampler, Abstract)
 
ENGINE_API FWeightedRandomSampler ()
 
virtual ENGINE_API ~FWeightedRandomSampler ()
 
int32 GetEntryIndex (float R0, float R1) const
 
float GetTotalWeight () const
 
virtual ENGINE_API void Initialize ()
 
virtual ENGINE_API void Serialize (FArchive &Ar)
 
int32 GetNumEntries () const
 
TArrayView< const floatGetProb () const
 
TArrayView< const int32GetAlias () const
 

Protected Attributes

USkeletalMeshOwner
 
TArray< int32 > * TriangleIndices
 
int32 LODIndex
 

Additional Inherited Members

- Protected Member Functions inherited from FWeightedRandomSampler
 LAYOUT_FIELD (TMemoryImageArray< float >, Prob)
 
 LAYOUT_FIELD (TMemoryImageArray< int32 >, Alias)
 
 LAYOUT_FIELD (float, TotalWeight)
 

Detailed Description

Allows area weighted sampling of triangles on a skeletal mesh.

Constructor & Destructor Documentation

◆ FSkeletalMeshAreaWeightedTriangleSampler()

FSkeletalMeshAreaWeightedTriangleSampler::FSkeletalMeshAreaWeightedTriangleSampler ( )

Member Function Documentation

◆ GetWeights()

float FSkeletalMeshAreaWeightedTriangleSampler::GetWeights ( TArray< float > &  OutWeights)
overridevirtual

Gets the weight of all elements and returns their sum.

Implements FWeightedRandomSampler.

◆ Init()

void FSkeletalMeshAreaWeightedTriangleSampler::Init ( USkeletalMesh InOwner,
int32  LODIndex,
TArray< int32 > *  InTriangleIndices 
)

Member Data Documentation

◆ LODIndex

int32 FSkeletalMeshAreaWeightedTriangleSampler::LODIndex
protected

◆ Owner

USkeletalMesh* FSkeletalMeshAreaWeightedTriangleSampler::Owner
protected

◆ TriangleIndices

TArray<int32>* FSkeletalMeshAreaWeightedTriangleSampler::TriangleIndices
protected

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