Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/Parameterization
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/Parameterization/MeshLocalParam.h |
| Include | #include "Parameterization/MeshLocalParam.h" |
Syntax
template<class PointSetType>
class TMeshLocalParam
Remarks
TMeshLocalParam computes a local UV parameterization of a set of connected PointsWithNormals, where "local" means "in a geodesic disc around a starting point".
The computation is based on region-growing, and geodesic distances are actually graph distances, measured with Dijkstras algorithm.
Templated on the point set type, which must provide positions, normals, and neighbours. Currently will only work for FDynamicMesh3 and FDynamicPointSet3 because of call to PointSetType->VtxVerticesItr()
Variables
| Type | Name | Description | |
|---|---|---|---|
| TDynamicVector< FGraphNode > | AllocatedNodes | ||
| bool | bEnableExternalNormals | If true, ExternalNormalFunc will be used to fetch normals instead of requesting from PointSet->GetVertexNormal. | |
| TFunction< FVector3d(int32)> | ExternalNormalFunc | Normals will be requested from this function if bEnableExternalNormals == true | |
| TMap< int32, int32 > | IDToNodeIndexMap | To avoid constructing FGraphNode for all input points (because we are computing a "local" param), we only allocate on demand, and then store a sparse mapping in IDToNodeIndexMap | |
| double | MaxGraphDistance | Max distances encountered during last compute | |
| double | MaxUVDistance | ||
| ELocalParamTypes | ParamMode | Type of local parameterization to compute | |
| const PointSetType * | PointSet | ||
| FIndexPriorityQueue | Queue | Queue of nodes to process (for dijkstra front propagation) | |
| FFrame3d | SeedFrame | Seed frame, unwrap is centered around this position/axes |
Constructors
| Type | Name | Description | |
|---|---|---|---|
TMeshLocalParam
(
const PointSetType* PointSetIn |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ApplyUVs
(
TFunctionRef< void(int32 PointID, const FVector2d&UV)> ApplyFunc |
Apply a function to each calculated UV | |
| FVector2d | ComputeLocalUV
(
const FFrame3d& Frame, |
||
| void | ComputeToMaxDistance
(
int32 CenterPointVtxID, |
Computes UVs outwards from seed vertex to all points that are less/equal to ComputeToMaxDistance from the seed. | |
| void | ComputeToMaxDistance
(
const FFrame3d& SeedFrameIn, |
Computes UVs outwards from seed frame/nbrs to all points that are less/equal to ComputeToMaxDistance from the seed. | |
| void | GetAllComputedUVs
(
TArray< int32 >& PointIDsOut, |
Find all computed UVs within the specified distances | |
| FFrame3d | GetFrame
(
const FGraphNode& Node |
||
| double | |||
| double | |||
| const FGraphNode * | GetNodeForPointSetID
(
int32 PointSetID |
||
| FGraphNode * | GetNodeForPointSetID
(
int32 PointSetID, |
||
| FVector3d | |||
| void | GetPointsWithUV
(
TArray< int32 >& Points |
||
| FVector3d | GetPosition
(
const int32 PointID |
||
| FVector2d | |||
| FAxisAlignedBox2d | GetUVBounds () |
||
| bool | |||
| FVector2d | InvalidUV () |
||
| void | ProcessQueueUntilTermination
(
double MaxDistance |
||
| FVector2d | PropagateUV
(
const FVector3d& Position, |
Calculate the UV value at Position based on the existing NbrUV, using the frame at NbrFrame, and the original SeedFrame | |
| void | Reset () |
Reset internal data structures but keep allocated memory | |
| void | TransformUV
(
double Scale, |
Scale and then Translate all calculated UV values | |
| void | UpdateNeighboursSparse
(
FGraphNode* Parent |
Given new Distance/UV at Parent, check if any of its neighbours are in the queue, and if they are, and the new graph distance is shorter, update their queue position (this is basically the update step of Disjktras algorithm) | |
| void | UpdateUVExpmap
(
FGraphNode& Node |
||
| void | UpdateUVExpmapUpwind
(
FGraphNode& Node |
||
| void | UpdateUVPlanar
(
FGraphNode& Node |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FGraphNode | Information about each active/computed point |