![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <EmbedSurfacePath.h>
Public Member Functions | |
| FMeshSurfacePath (FDynamicMesh3 *Mesh) | |
| virtual | ~FMeshSurfacePath () |
| GEOMETRYCORE_API bool | IsConnected () const |
| bool | IsClosed () const |
| void | Reset () |
| GEOMETRYCORE_API bool | AddViaPlanarWalk (int StartTri, int StartVID, FVector3d StartPt, int EndTri, int EndVertID, FVector3d EndPt, FVector3d WalkPlaneNormal, TFunction< FVector3d(const FDynamicMesh3 *, int)> VertexToPosnFn=nullptr, bool bAllowBackwardsSearch=true, double AcceptEndPtOutsideDist=FMathd::ZeroTolerance, double PtOnPlaneThresholdSq=FMathf::ZeroTolerance *100, double BackwardsTolerance=FMathd::ZeroTolerance *10) |
| GEOMETRYCORE_API bool | ClosePath () |
| virtual EOperationValidationResult | Validate () |
| GEOMETRYCORE_API bool | EmbedSimplePath (bool bUpdatePath, TArray< int > &PathVertices, bool bDoNotDuplicateFirstVertexID=true, double SnapElementThresholdSq=FMathf::ZeroTolerance *100) |
| ** | |
Public Attributes | |
| FDynamicMesh3 * | Mesh |
| TArray< TPair< FMeshSurfacePoint, int > > | Path |
| bool | bIsClosed |
Walk the surface of an FDynamicMesh to try find a planar path connecting two points. Paths include every vertex and edge they need to cross. Greedy algorithm will only return one path if there are multiple. Represent a path on the surface of a mesh via barycentric coordinates and triangle references
|
inline |
Cut mesh with plane. Assumption is that plane normal is Z value.
|
inlinevirtual |
| bool FMeshSurfacePath::AddViaPlanarWalk | ( | int | StartTri, |
| int | StartVID, | ||
| FVector3d | StartPt, | ||
| int | EndTri, | ||
| int | EndVertID, | ||
| FVector3d | EndPt, | ||
| FVector3d | WalkPlaneNormal, | ||
| TFunction< FVector3d(const FDynamicMesh3 *, int)> | VertexToPosnFn = nullptr, |
||
| bool | bAllowBackwardsSearch = true, |
||
| double | AcceptEndPtOutsideDist = FMathd::ZeroTolerance, |
||
| double | PtOnPlaneThresholdSq = FMathf::ZeroTolerance*100, |
||
| double | BackwardsTolerance = FMathd::ZeroTolerance*10 |
||
| ) |
| GEOMETRYCORE_API bool UE::Geometry::FMeshSurfacePath::ClosePath | ( | ) |
Make the embedded path into a closed loop. Only succeeds if path start and end already share a triangle!
| bool FMeshSurfacePath::EmbedSimplePath | ( | bool | bUpdatePath, |
| TArray< int > & | PathVertices, | ||
| bool | bDoNotDuplicateFirstVertexID = true, |
||
| double | SnapElementThresholdSq = FMathf::ZeroTolerance*100 |
||
| ) |
**
Embed a surface path in mesh provided that the path only crosses vertices and edges except at the start and end, so we can add the path easily with local edge splits and possibly two triangle pokes (rather than needing general remeshing machinery)
| bUpdatePath | Updating the Path array with the new vertices (if false, the path will no longer be valid after running this function) |
| PathVertices | Indices of the vertices on the path after embedding succeeds; NOTE these will not be 1:1 with the input Path |
Embed a surface path in mesh provided that the path only crosses vertices and edges except at the start and end, so we can add the path easily with local edge splits and possibly two triangle pokes (rather than needing general remeshing machinery) Also assumes triangles are only crossed over once (except possibly to loop around to the start triangle on the end triangle) Planar walks naturally create simple paths, so this function can be used on any paths created by single planar walks.
| bUpdatePath | Updating the Path array with the new vertices (if false, the path will no longer be valid after running this function)\ |
| PathVertices | Indices of the vertices on the path after embedding succeeds; NOTE these will not be 1:1 with the input Path |
|
inline |
| bool FMeshSurfacePath::IsConnected | ( | ) | const |
|
inline |
|
inlinevirtual |
| bool UE::Geometry::FMeshSurfacePath::bIsClosed |
| FDynamicMesh3* UE::Geometry::FMeshSurfacePath::Mesh |
| TArray<TPair<FMeshSurfacePoint, int> > UE::Geometry::FMeshSurfacePath::Path |