UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FGeomTools Namespace Reference

Functions

ENGINE_API void GetClippableStaticMeshTriangles (TArray< FClipSMTriangle > &OutClippableTriangles, const UStaticMesh *StaticMesh)
 
ENGINE_API void ClipMeshWithPlane (TArray< FClipSMTriangle > &OutTris, TArray< FUtilEdge3D > &OutClipEdges, const TArray< FClipSMTriangle > &InTriangles, const FPlane &Plane)
 
ENGINE_API void ProjectEdges (TArray< FUtilEdge2D > &Out2DEdges, FMatrix &ToWorld, const TArray< FUtilEdge3D > &In3DEdges, const FPlane &InPlane)
 
ENGINE_API void Buid2DPolysFromEdges (TArray< FUtilPoly2D > &OutPolys, const TArray< FUtilEdge2D > &InEdges, const FColor &VertColor)
 
ENGINE_API bool TriangulatePoly (TArray< FClipSMTriangle > &OutTris, const FClipSMPolygon &InPoly, bool bKeepColinearVertices=false)
 
ENGINE_API FClipSMPolygon Transform2DPolygonToSMPolygon (const FUtilPoly2D &InTri, const FMatrix &InMatrix)
 
ENGINE_API void GeneratePlanarFitPolyUVs (FUtilPoly2D &Polygon)
 
ENGINE_API void GeneratePlanarTilingPolyUVs (FUtilPoly2D &Polygon, float TileSize)
 
ENGINE_API void RemoveRedundantTriangles (TArray< FClipSMTriangle > &Tris)
 
ENGINE_API void Split2DPolysWithPlane (FUtilPoly2DSet &PolySet, const FPlane &Plane, const FColor &ExteriorVertColor, const FColor &InteriorVertColor)
 
ENGINE_API bool VectorsOnSameSide (const FVector3f &Vec, const FVector3f &A, const FVector3f &B, const float SameSideDotProductEpsilon=0.0f)
 
ENGINE_API bool PointInTriangle (const FVector3f &A, const FVector3f &B, const FVector3f &C, const FVector3f &P, const float InsideTriangleDotProductEpsilon=0.0f)
 

Function Documentation

◆ Buid2DPolysFromEdges()

void FGeomTools::Buid2DPolysFromEdges ( TArray< FUtilPoly2D > &  OutPolys,
const TArray< FUtilEdge2D > &  InEdges,
const FColor VertColor 
)

Given a set of edges, find the set of closed polygons created by them.

◆ ClipMeshWithPlane()

void FGeomTools::ClipMeshWithPlane ( TArray< FClipSMTriangle > &  OutTris,
TArray< FUtilEdge3D > &  OutClipEdges,
const TArray< FClipSMTriangle > &  InTris,
const FPlane Plane 
)

Take the input mesh and cut it with supplied plane, creating new verts etc. Also outputs new edges created on the plane.

◆ GeneratePlanarFitPolyUVs()

void FGeomTools::GeneratePlanarFitPolyUVs ( FUtilPoly2D Polygon)

Does a simple planar map using the bounds of this 2D polygon.

Does a simple box map onto this 2D polygon.

◆ GeneratePlanarTilingPolyUVs()

void FGeomTools::GeneratePlanarTilingPolyUVs ( FUtilPoly2D Polygon,
float  TileSize 
)

Applies tiling UVs to the verts of this polygon

◆ GetClippableStaticMeshTriangles()

void FGeomTools::GetClippableStaticMeshTriangles ( TArray< FClipSMTriangle > &  OutClippableTriangles,
const UStaticMesh StaticMesh 
)

Extracts the triangles from a static-mesh as clippable triangles.

◆ PointInTriangle()

bool FGeomTools::PointInTriangle ( const FVector3f A,
const FVector3f B,
const FVector3f C,
const FVector3f P,
const float  InsideTriangleDotProductEpsilon = 0.0f 
)

Util to see if P lies within triangle created by A, B and C.

◆ ProjectEdges()

void FGeomTools::ProjectEdges ( TArray< FUtilEdge2D > &  Out2DEdges,
FMatrix ToWorld,
const TArray< FUtilEdge3D > &  In3DEdges,
const FPlane InPlane 
)

Take a set of 3D Edges and project them onto the supplied plane. Also returns matrix use to convert them back into 3D edges.

◆ RemoveRedundantTriangles()

void FGeomTools::RemoveRedundantTriangles ( TArray< FClipSMTriangle > &  Tris)

Given a set of triangles, remove those which share an edge and could be collapsed into one triangle.

◆ Split2DPolysWithPlane()

void FGeomTools::Split2DPolysWithPlane ( FUtilPoly2DSet PolySet,
const FPlane Plane,
const FColor ExteriorVertColor,
const FColor InteriorVertColor 
)

Split 2D polygons with a 3D plane.

◆ Transform2DPolygonToSMPolygon()

FClipSMPolygon FGeomTools::Transform2DPolygonToSMPolygon ( const FUtilPoly2D InPoly,
const FMatrix InMatrix 
)

Transform triangle from 2D to 3D static-mesh triangle.

◆ TriangulatePoly()

bool FGeomTools::TriangulatePoly ( TArray< FClipSMTriangle > &  OutTris,
const FClipSMPolygon InPoly,
bool  bKeepColinearVertices = false 
)

Given a polygon, decompose into triangles and append to OutTris.

Returns
true if the triangulation was successful.

Given a polygon, decompose into triangles and append to OutTris.

◆ VectorsOnSameSide()

bool FGeomTools::VectorsOnSameSide ( const FVector3f Vec,
const FVector3f A,
const FVector3f B,
const float  SameSideDotProductEpsilon = 0.0f 
)

Given three direction vectors, indicates if A and B are on the same 'side' of Vec.