Navigation
API > API/Runtime > API/Runtime/Engine
Inheritance Hierarchy
- FWeightedRandomSampler
- FSkeletalMeshAreaWeightedTriangleSampler
- FStaticMeshAreaWeightedSectionSampler
- FStaticMeshSectionAreaWeightedTriangleSampler
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/WeightedRandomSampler.h |
| Include | #include "WeightedRandomSampler.h" |
Syntax
struct FWeightedRandomSampler
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
DECLARE_TYPE_LAYOUT
(
FWeightedRandomSampler, |
|||
| TArrayView< const int32 > | GetAlias () |
||
| int32 | GetEntryIndex
(
float R0, |
Takes two random values (0...1) and returns the corresponding element index. | |
| int32 | |||
| TArrayView< const float > | GetProb () |
||
| float | |||
| float | GetWeights
(
TArray< float >& OutWeights |
Gets the weight of all elements and returns their sum. | |
| void | Initialize () |
||
LAYOUT_FIELD
(
TMemoryImageArray< float >, |
|||
LAYOUT_FIELD
(
TMemoryImageArray< int32 >, |
|||
LAYOUT_FIELD
(
float, |
|||
| void |