Navigation
API > API/Runtime > API/Runtime/GeometryCore
Class to help draw uniform-random surface samples from a (possibly non-compact) triangle mesh. TMeshType must implement: IsTriangle, MaxTriangleID, and GetTriVertices. RealType must be float or double.
| Name | TMeshUniformSurfaceSampling |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Sampling/MeshSurfacePointSampling.h |
| Include Path | #include "Sampling/MeshSurfacePointSampling.h" |
Syntax
template<typename TMeshType, typename RealType>
class TMeshUniformSurfaceSampling
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Sampling/MeshSurfacePointSampling.h | |||
TMeshUniformSurfaceSampling
(
const TMeshType& Mesh |
Sampling/MeshSurfacePointSampling.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AliasTable | TWeightedSamplingAliasTable< RealType > | Sampling/MeshSurfacePointSampling.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 DrawTriangleIDSample
(
RealType UniformRandom1, |
Sample a random triangle, with probability proportional to relative triangle area. | Sampling/MeshSurfacePointSampling.h | |
bool Init
(
const TMeshType& Mesh |
Sampling/MeshSurfacePointSampling.h | ||
bool IsValid() |
Sampling/MeshSurfacePointSampling.h |