Navigation
API > API/Runtime > API/Runtime/GeometryCore
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()
| Name | TMeshLocalParam |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Parameterization/MeshLocalParam.h |
| Include Path | #include "Parameterization/MeshLocalParam.h" |
Syntax
template<class PointSetType>
class TMeshLocalParam
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TMeshLocalParam
(
const PointSetType* PointSetIn |
Parameterization/MeshLocalParam.h |
Structs
| Name | Remarks |
|---|---|
| FGraphNode | Information about each active/computed point |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bEnableExternalNormals | bool | If true, ExternalNormalFunc will be used to fetch normals instead of requesting from PointSet->GetVertexNormal. | Parameterization/MeshLocalParam.h | |
| ExternalNormalFunc | TFunction< FVector3d(int32)> | Normals will be requested from this function if bEnableExternalNormals == true | Parameterization/MeshLocalParam.h | |
| ParamMode | ELocalParamTypes | Type of local parameterization to compute | Parameterization/MeshLocalParam.h | |
| PointSet | const PointSetType * | Parameterization/MeshLocalParam.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyUVs
(
TFunctionRef< void(int32 PointID, const FVector2d&UV)> ApplyFunc |
Apply a function to each calculated UV | Parameterization/MeshLocalParam.h | |
void ComputeToMaxDistance
(
int32 CenterPointVtxID, |
Computes UVs outwards from seed vertex to all points that are less/equal to ComputeToMaxDistance from the seed. | Parameterization/MeshLocalParam.h | |
void ComputeToMaxDistance
(
const FFrame3d& SeedFrameIn, |
Computes UVs outwards from seed frame/nbrs to all points that are less/equal to ComputeToMaxDistance from the seed. | Parameterization/MeshLocalParam.h | |
| Find all computed UVs within the specified distances | Parameterization/MeshLocalParam.h | ||
double GetMaxGraphDistance() |
Parameterization/MeshLocalParam.h | ||
double GetMaxUVDistance() |
Parameterization/MeshLocalParam.h | ||
void GetPointsWithUV
(
TArray< int32 >& Points |
Parameterization/MeshLocalParam.h | ||
FVector2d GetUV
(
int32 PointID |
Parameterization/MeshLocalParam.h | ||
FAxisAlignedBox2d GetUVBounds() |
Parameterization/MeshLocalParam.h | ||
bool HasUV
(
int32 PointID |
Parameterization/MeshLocalParam.h | ||
void Reset() |
Reset internal data structures but keep allocated memory | Parameterization/MeshLocalParam.h | |
void TransformUV
(
double Scale, |
Scale and then Translate all calculated UV values | Parameterization/MeshLocalParam.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FVector2d ComputeLocalUV
(
const FFrame3d& Frame, |
Parameterization/MeshLocalParam.h | ||
FFrame3d GetFrame
(
const FGraphNode& Node |
Parameterization/MeshLocalParam.h | ||
const FGraphNode * GetNodeForPointSetID
(
int32 PointSetID |
Parameterization/MeshLocalParam.h | ||
FGraphNode * GetNodeForPointSetID
(
int32 PointSetID, |
Parameterization/MeshLocalParam.h | ||
FVector3d GetNormal
(
const int32 PointID |
Parameterization/MeshLocalParam.h | ||
FVector3d GetPosition
(
const int32 PointID |
Parameterization/MeshLocalParam.h | ||
void ProcessQueueUntilTermination
(
double MaxDistance |
Parameterization/MeshLocalParam.h | ||
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 | Parameterization/MeshLocalParam.h | |
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) | Parameterization/MeshLocalParam.h | |
void UpdateUVExpmap
(
FGraphNode& Node |
Parameterization/MeshLocalParam.h | ||
void UpdateUVExpmapUpwind
(
FGraphNode& Node |
Parameterization/MeshLocalParam.h | ||
void UpdateUVPlanar
(
FGraphNode& Node |
Parameterization/MeshLocalParam.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FVector2d InvalidUV() |
Parameterization/MeshLocalParam.h |