Navigation
API > API/Plugins > API/Plugins/DynamicMesh
FMeshRegionGraph represents neighbourhood relationships between mesh patches. This is similar in some ways to a FGroupTopology, however only patch-adjacency connections are tracked. Connectivity between patches can be queried, and patches can be merged without rebuilding the graph.
Each mesh Patch/Region is assigned an integer ID/RegionIndex. After removing or merging regions, some RegionIndex values may be invalid, use IsRegion() to check
An integer ID can be associated with each Region using the ExternalIDFunc passed to the various Build() functions.
| Name | FMeshRegionGraph |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Parameterization/MeshRegionGraph.h |
| Include Path | #include "Parameterization/MeshRegionGraph.h" |
Syntax
class FMeshRegionGraph
Structs
| Name | Remarks |
|---|---|
| FNeighbour | |
| FRegion |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| EmptyTriSet | TArray< int32 > | Parameterization/MeshRegionGraph.h | ||
| Regions | TArray< FRegion > | Parameterization/MeshRegionGraph.h | ||
| TriangleNbrTris | TArray< FIndex3i > | Parameterization/MeshRegionGraph.h | ||
| TriangleToRegionMap | TArray< int32 > | Parameterization/MeshRegionGraph.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AreRegionsConnected
(
int32 RegionAIndex, |
Parameterization/MeshRegionGraph.h | ||
bool AreTrianglesConnected
(
int32 TriangleA, |
Parameterization/MeshRegionGraph.h | ||
void BuildFromComponents
(
const FDynamicMesh3& Mesh, |
Build a region graph for a Mesh using the given ConnectedComponents | Parameterization/MeshRegionGraph.h | |
void BuildFromTriangleSets
(
const FDynamicMesh3& Mesh, |
Build a region graph for a Mesh using the given triangle sets | Parameterization/MeshRegionGraph.h | |
int32 GetExternalID
(
int32 RegionIdx |
Parameterization/MeshRegionGraph.h | ||
TArray< int32 > GetNeighbours
(
int32 RegionIdx |
Parameterization/MeshRegionGraph.h | ||
int32 GetRegionTriCount
(
int32 RegionIdx |
Parameterization/MeshRegionGraph.h | ||
const TArray< int32 > & GetRegionTris
(
int32 RegionIdx |
Parameterization/MeshRegionGraph.h | ||
int32 IsRegion
(
int32 RegionIdx |
Parameterization/MeshRegionGraph.h | ||
int32 MaxRegionIndex() |
Parameterization/MeshRegionGraph.h | ||
bool MergeRegion
(
int32 RemoveRgnIdx, |
Merge one existing Region into another | Parameterization/MeshRegionGraph.h | |
bool MergeSmallRegions
(
int32 SmallThreshold, |
Incrementally merge regions with a triangle count below the given SmallThreshold. | Parameterization/MeshRegionGraph.h | |
TArray< int32 > && MoveRegionTris
(
int32 RegionIdx |
This method leaves the FMeshRegionGraph in an invalid state, and should only be used as a means to avoid memory copies while extracting the triangle sets from a FMeshRegionGraph that will then be discarded | Parameterization/MeshRegionGraph.h | |
bool OptimizeBorders
(
int32 MaxRounds |
Optimize region borders by swapping triangles. | Parameterization/MeshRegionGraph.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BuildNeigbours
(
int32 RegionIdx |
Parameterization/MeshRegionGraph.h | ||
bool MergeSmallRegionsPass
(
int32 SmallThreshold, |
Parameterization/MeshRegionGraph.h |