![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MeshLocalParam.h>
Classes | |
| struct | FGraphNode |
Public Member Functions | |
| TMeshLocalParam (const PointSetType *PointSetIn) | |
| void | Reset () |
| void | ComputeToMaxDistance (const FFrame3d &SeedFrameIn, const FIndex3i &SeedNbrs, double ComputeToMaxDistanceIn) |
| void | ComputeToMaxDistance (int32 CenterPointVtxID, const FFrame3d &CenterPointFrame, double ComputeToMaxDistanceIn) |
| void | TransformUV (double Scale, FVector2d Translate) |
| double | GetMaxGraphDistance () const |
| double | GetMaxUVDistance () const |
| bool | HasUV (int32 PointID) const |
| void | GetPointsWithUV (TArray< int32 > &Points) const |
| FVector2d | GetUV (int32 PointID) const |
| void | GetAllComputedUVs (TArray< int32 > &PointIDsOut, TArray< FVector2d > &PointUVsOut, double MaxUVMagnitude=TNumericLimits< float >::Max(), double MaxGraphDist=TNumericLimits< float >::Max()) const |
| void | ApplyUVs (TFunctionRef< void(int32 PointID, const FVector2d &UV)> ApplyFunc) const |
| FAxisAlignedBox2d | GetUVBounds () const |
Public Attributes | |
| const PointSetType * | PointSet |
| ELocalParamTypes | ParamMode = ELocalParamTypes::ExponentialMapUpwindAvg |
| bool | bEnableExternalNormals = false |
| TFunction< FVector3d(int32)> | ExternalNormalFunc |
Protected Member Functions | |
| FVector3d | GetPosition (const int32 PointID) const |
| FVector3d | GetNormal (const int32 PointID) const |
| FFrame3d | GetFrame (const FGraphNode &Node) const |
| void | ProcessQueueUntilTermination (double MaxDistance) |
| FVector2d | ComputeLocalUV (const FFrame3d &Frame, FVector3d Position) const |
| FVector2d | PropagateUV (const FVector3d &Position, const FVector2d &NbrUV, const FFrame3d &NbrFrame, const FFrame3d &SeedFrameIn) const |
| void | UpdateUVExpmap (FGraphNode &Node) |
| void | UpdateUVExpmapUpwind (FGraphNode &Node) |
| void | UpdateUVPlanar (FGraphNode &Node) |
| FGraphNode * | GetNodeForPointSetID (int32 PointSetID, bool bCreateIfMissing) |
| const FGraphNode * | GetNodeForPointSetID (int32 PointSetID) const |
| void | UpdateNeighboursSparse (FGraphNode *Parent) |
Static Protected Member Functions | |
| static FVector2d | InvalidUV () |
Protected Attributes | |
| TMap< int32, int32 > | IDToNodeIndexMap |
| TDynamicVector< FGraphNode > | AllocatedNodes |
| FIndexPriorityQueue | Queue |
| FFrame3d | SeedFrame |
| double | MaxGraphDistance |
| double | MaxUVDistance |
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()
|
inline |
|
inline |
Apply a function to each calculated UV
|
inlineprotected |
|
inline |
Computes UVs outwards from seed frame/nbrs to all points that are less/equal to ComputeToMaxDistance from the seed.
| SeedFrameIn | 3D frame on surface of point set, parameterization is computed "in" this frame (eg will align u/v to x/y axes, at origin) |
| SeedNbrs | 3 points that will be planar-projected into the SeedFrame, to initialize the region-growing (kind of triangle-mesh-specific) |
| ComputeToMaxDistanceIn | target radius for parameterization, will not set UVs on points with graph-distance larger than this |
|
inline |
Computes UVs outwards from seed vertex to all points that are less/equal to ComputeToMaxDistance from the seed.
| CenterPointVtxID | ID of seed vertex |
| CenterPointFrame | 3D frame on surface of point set, parameterization is computed "in" this frame (eg will align u/v to x/y axes, at origin) |
| ComputeToMaxDistanceIn | target radius for parameterization, will not set UVs on points with graph-distance larger than this |
|
inline |
Find all computed UVs within the specified distances
| PointIDsOut | PointID corresponding to each computed UV is returned here |
| PointUVsOut | UV value corresponding to each PointID is returned here |
| MaxUVMagnitude | computed UVs will only be included if their magnitude is smaller than this value (eg, this is the UV-space radius) |
| MaxGraphDistance | computed UVs will only be included if their graph distance is smaller than this value. Graph distance is generally always be larger than UV distance. This can be used to avoid problematic UVs that might result from algorithm failures. |
|
inlineprotected |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inlinestaticprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
Reset internal data structures but keep allocated memory
|
inline |
Scale and then Translate all calculated UV values
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
| bool UE::Geometry::TMeshLocalParam< PointSetType >::bEnableExternalNormals = false |
If true, ExternalNormalFunc will be used to fetch normals instead of requesting from PointSet->GetVertexNormal. This allows for (1) vertex normals to be computed on the fly, if only a subset of the point set is being parameterizedx and (2) alternate normals (eg smoothed, etc) to be provided w/o having to define a separate class.
| TFunction<FVector3d(int32)> UE::Geometry::TMeshLocalParam< PointSetType >::ExternalNormalFunc |
Normals will be requested from this function if bEnableExternalNormals == true
|
protected |
|
protected |
|
protected |
| ELocalParamTypes UE::Geometry::TMeshLocalParam< PointSetType >::ParamMode = ELocalParamTypes::ExponentialMapUpwindAvg |
Type of local parameterization to compute
| const PointSetType* UE::Geometry::TMeshLocalParam< PointSetType >::PointSet |
|
protected |
|
protected |