TMeshLocalParam

[TMeshLocalParam](API\Plugins\GeometricObjects\Parameterization\TMeshLocalParam) computes a local UV parameterization of a set of connected PointsWithNormals, where "local" means "in a geodesic disc around a starting point".

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/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

Name Description

Protected variable

TDynamicVector<...

 

AllocatedNodes

Protected variable

TMap< int32, in...

 

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

Protected variable

double

 

MaxGraphDistance

Max distances encountered during last compute

Protected variable

double

 

MaxUVDistance

Public variable

ELocalParamType...

 

ParamMode

Type of local parameterization to compute

Public variable

const PointSetT...

 

PointSet

Protected variable

FIndexPriorityQ...

 

Queue

Queue of nodes to process (for dijkstra front propagation)

Protected variable

FFrame3d

 

SeedFrame

Seed frame, unwrap is centered around this position/axes

Constructors

Name Description

Public function

TMeshLocalParam

(
    const PointSetType* PointSetIn
)

Functions

Name Description

Public function Const

void

 

ApplyUVs

(
    TFunctionRef< void PointID, c...
)

Apply a function to each calculated UV

Protected function Const

FVector2d

 

ComputeLocalUV

(
    const FFrame3d& Frame,
    FVector3d Position
)

Public function

void

 

ComputeToMaxDistance

(
    const FFrame3d& SeedFrameIn,
    const FIndex3i& SeedNbrs,
    double ComputeToMaxDistance
)

Computes UVs outwards from seed frame/nbrs to all points that are less/equal to ComputeToMaxDistance from the seed.

Protected function Const

FFrame3d

 

GetFrame

(
    const int32 PointID
)

Public function Const

double

 

GetMaxGraphDistance()

Public function Const

double

 

GetMaxUVDistance()

Protected function Const

const FGraph...

 

GetNodeForPointSetID

(
    int32 PointSetID
)

Protected function

FGraphNode &...

 

GetNodeForPointSetID

(
    int32 PointSetID,
    bool bCreateIfMissing
)

Protected function Const

FVector3d

 

GetNormal

(
    const int32 PointID
)

Protected function Const

FVector3d

 

GetPosition

(
    const int32 PointID
)

Public function Const

FVector2d

 

GetUV

(
    int32 PointID
)

Public function Const

FAxisAligned...

 

GetUVBounds()

Public function Const

bool

 

HasUV

(
    int32 PointID
)

Protected function Static

FVector2d

 

InvalidUV()

Protected function Const

FVector2d

 

PropagateUV

(
    const FVector3d& Position,
    const FVector2d& NbrUV,
    const FFrame3d& NbrFrame,
    const FFrame3d& SeedFrameIn
)

Calculate the UV value at Position based on the existing NbrUV, using the frame at NbrFrame, and the original SeedFrame

Public function

void

 

Reset()

Reset internal data structures but keep allocated memory

Public function

void

 

TransformUV

(
    double Scale,
    FVector2d Translate
)

Scale and then Translate all calculated UV values

Protected function

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)

Protected function

void

 

UpdateUVExpmap

(
    FGraphNode& Node
)

Protected function

void

 

UpdateUVExpmapUpwind

(
    FGraphNode& Node
)

Protected function

void

 

UpdateUVPlanar

(
    FGraphNode& Node
)

Classes

Name

Description

Protected struct

FGraphNode

Information about each active/computed point

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss