Module |
|
Header |
/Engine/Plugins/Experimental/GeometryProcessing/Source/DynamicMesh/Public/Sampling/MeshSurfaceSampler.h |
Include |
#include "Sampling/MeshSurfaceSampler.h" |
template<typename SampleType>
class TMeshSurfaceUVSampler
TMeshSurfaceUVSampler computes point samples of the given SampleType at positions on the mesh based on UV-space positions. The standard use case for this class is to compute samples used in building Normal Maps, AO Maps, etc.
that for UVOnly sample type, an internal UV-space BVTree will be constructed, and each sample will query that to find the UV/3D correspondence. If you already know the TriangleID, you can use the TriangleAndUV type to avoid the BVTree construction and queries.
that if you need to sample multiple things, rather than building up an uber-SampleType, you can first compute a sample with SampleType=FMeshUVSampleInfo to find the correspondence information, and then construction additional samplers of type EMeshSurfaceSamplerQueryType::TriangleAndUV, and call CachedSampleUV(), to avoid expensive BVTree constructions and UV-to-3D recalculation.
Name | Description | ||
---|---|---|---|
|
bUVSpatialValid |
||
|
const FDynamicM... |
Mesh |
|
|
QueryType |
||
|
TMeshAABBTree3<... |
UVBVTree |
|
|
UVMeshAdapter |
BV tree for finding triangle for a given UV. Not always initialized. |
|
|
const FDynamicM... |
UVOverlay |
|
|
ValueFunction |
||
|
SampleType |
ZeroValue |
Name | Description | |
---|---|---|
|
~TMeshSurfaceUVSampler() |
Name | Description | ||
---|---|---|---|
|
CachedSampleUV ( |
Compute a sample at the given UV/3D location specified by CachedSampleInfo, which presumably was produced by previous calls to SampleUV() |
|
|
Initialize ( |
Configure the sampler. |
|
|
InitializeBVTree() |
||
|
SampleUV ( |
Compute a sample at the given UV location |
|
|
SampleUV |
Compute a sample at the given UV location in the given Triangle |