#include <MeshSurfacePointSampling.h>
◆ TWeightedSamplingAliasTable() [1/3]
◆ TWeightedSamplingAliasTable() [2/3]
◆ TWeightedSamplingAliasTable() [3/3]
◆ Init()
template<class RealType >
| bool TWeightedSamplingAliasTable::Init |
( |
TConstArrayView< RealType > |
Weights, |
|
|
RealType |
SumOfValidWeights, |
|
|
bool |
bAllowInvalidWeights |
|
) |
| |
Initialize sampling table
- Parameters
-
| Weights | The relative frequency that the element should be sampled – e.g., for uniform mesh sampling, these may be triangle areas. |
| SumOfValidWeights | Sum of all valid weights. Must not include negative (invalid) weights. |
| bAllowInvalidWeights | If true, then negative weights can be used to indicate invalid IDs, which must never be sampled. Otherwise, all weights should be non-negative. |
- Returns
- true if successfully created a valid sampling table, false otherwise (e.g., if there were no valid weights)
◆ IsValid()
◆ Num()
◆ Sample()
The documentation for this class was generated from the following files: