Navigation
API > API/Plugins > API/Plugins/DynamicMesh
Given a single path initially defined by edges on a FDynamicMesh (the SurfaceMesh), this class uses an intrinsic mesh with the same vertex set to minimize the length of the path on the surface mesh. This is done iteratively by a succession of local path deformations comprised of (local) intrisic edge flips and path re-routing, each deformation locally reduces the path length. The resulting path is comprised of intrinsic mesh edges.
This is an implementation of the ideas in "You Can Find Geodesic Paths in Triangle Meshes by Just Flipping Edges" by Nicholas Sharp and Keenan Crane ACM Trans. Graph. Vol. 39, No. 6, 2020
The original path is constructed as a sequence of mesh edges relative to the SurfaceMesh ( the FDynamicMesh3 ), these edges are encoded with path direction as FDirectedSegments. Note: The current implementation does not support closed paths or multiple paths.
| Name | FDeformableEdgePath |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Operations/GeodesicPath.h |
| Include Path | #include "Operations/GeodesicPath.h" |
Syntax
class FDeformableEdgePath
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Only allow construction from a path and mesh. | Operations/GeodesicPath.h | ||
FDeformableEdgePath
(
const FDeformableEdgePath& |
Operations/GeodesicPath.h | ||
FDeformableEdgePath
(
const FDynamicMesh3& SurfaceMeshIn, |
Constructor assumes the directed segments are ordered from tail (at index 0) to head | Operations/GeodesicPath.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FDeformableEdgePath() |
Operations/GeodesicPath.h |
Structs
| Name | Remarks |
|---|---|
| FEdgePathDeformationInfo | Information gathered during minimization |
| FPathJoint |
Enums
Protected
| Name | Remarks |
|---|---|
| ESide |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FSurfacePoint | IntrinsicCorrespondenceUtils::FSurfacePoint | Struct that references a point on a mesh, by vertex, by edge-crossing, or barycentric coords | Operations/GeodesicPath.h |
| IntrinsicMeshType | FIntrinsicEdgeFlipMesh | Operations/GeodesicPath.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| InvalidID | int | Operations/GeodesicPath.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TArray< FSurfacePoint > AsSurfacePoints
(
double CoalesceThreshold |
Operations/GeodesicPath.h | ||
const FEdgePath & GetEdgePath() |
Operations/GeodesicPath.h | ||
const FIntrinsicEdgeFlipMesh & GetIntrinsicMesh() |
Operations/GeodesicPath.h | ||
double GetPathLength() |
Operations/GeodesicPath.h | ||
virtual void Minimize
(
FEdgePathDeformationInfo& DeformedPathInfo, |
Minimize the deformable edge path with respect to the total path length. | Operations/GeodesicPath.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ComputeWedgeAngles
(
int32 IncomingEID, |
Compute the two angles formed at the vertex CenterVID by the two wedges formed by splitting the local one-ring by local path specified as incoming and outgoing edges. | Operations/GeodesicPath.h | |
bool DeformJoint
(
const int32 IncomingEID, |
Edge flip the adjacent edges to the JointVID and collect the DeformedPath that can be used to replace the local incoming and outgoing edge path | Operations/GeodesicPath.h | |
void DeformJoint
(
FPathJoint& PathJoint |
Replace the specified two connected edge segments (FPathJoint) in the main path with a new sub-path that connects the same end points. | Operations/GeodesicPath.h | |
bool IsJointFlexible
(
const FPathJoint& PathJoint |
Operations/GeodesicPath.h | ||
bool OuterArcFlipEdges
(
int32 StartEID, |
Traveling either CCW or CW around vertex CenterVID, from edge StartEID to edge EndEID, flip edges adjacent to CVID. | Operations/GeodesicPath.h | |
void RemoveSegment
(
int32 SID |
Remove specified segment from the linked-list path and clean up joint-related data for the joint that ends with this segment. | Operations/GeodesicPath.h | |
void ReplaceJointWithPath
(
const FPathJoint PathJoint, |
Splice in a path to replace the joint and update the joint angle queue. | Operations/GeodesicPath.h | |
int32 SegmentHeadVID
(
int32 SID |
Operations/GeodesicPath.h | ||
int32 SegmentTailVID
(
int32 SID |
Operations/GeodesicPath.h | ||
void UpdateJointAndQueue
(
int32 OutgoingSegmentID |
Compute data associated with the joint formed by the specified segment (outgoing), and the preceding segment (incoming) in the path. | Operations/GeodesicPath.h |