![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ConvexHull3.h>
Public Types | |
| using | FPolygonFace = TArray< int32, TInlineAllocator< 8 > > |
Static Public Member Functions | |
| static GEOMETRYCORE_API double | ComputeVolume (const TArrayView< const TVector< RealType > > Vertices) |
| static void | WalkBorder (const TArray< FIndex3i > &Triangles, const TArray< FIndex3i > &TriangleNeighbors, TFunctionRef< bool(int32)> InGroupFunc, int32 StartIdx, TArray< int32 > &OutBorderVertexIndices) |
Public Attributes | |
| bool | bSaveTriangleNeighbors = false |
| TConvexHullSimplificationSettings< RealType > | SimplificationSettings |
| FProgressCancel * | Progress = nullptr |
Protected Attributes | |
| int32 | Dimension |
| TLine3< RealType > | Line |
| TPlane3< RealType > | Plane |
| int | NumHullPoints = 0 |
| TArray< FIndex3i > | Hull |
| TArray< FIndex3i > | HullNeighbors |
Calculate the Convex Hull of a 3D point set as a Triangle Mesh
| using UE::Geometry::TConvexHull3< RealType >::FPolygonFace = TArray<int32, TInlineAllocator<8> > |
|
static |
|
inline |
Empty any previously-computed convex hull data. Frees the hull memory. Note: You do not need to call this before calling Generate() with new data.
|
inline |
Convert an already-computed convex hull into a halfspace representation Following the logic of ContainmentQueries3.h, all halfspaces are oriented "outwards," so a point is inside the convex hull if it is outside of all halfspaces in the array
| Points | Array of points to consider |
|
inline |
Convert an already-computed convex hull into a halfspace representation Following the logic of ContainmentQueries3.h, all halfspaces are oriented "outwards," so a point is inside the convex hull if it is outside of all halfspaces in the array
| GetPointFunc | Function providing array-style access into points |
|
inline |
Number of dimensions spanned by the input points.
| void UE::Geometry::TConvexHull3< RealType >::GetFaces | ( | TFunctionRef< void(TArray< int32 > &, TVector< RealType >)> | PolygonFunc, |
| TFunctionRef< TVector< RealType >(int32)> | GetPointFunc | ||
| ) | const |
Get faces of the convex hull as convex polygons, merging faces that are exactly coplanar
| PolygonFunc | Callback to be called for each polygon, with the array of vertex indices and the face normal |
| GetPointFunc | Function providing array-style access into points |
|
inline |
|
inline |
|
inline |
| void UE::Geometry::TConvexHull3< RealType >::GetSimplifiedFaces | ( | TArray< FPolygonFace > & | OutPolygons, |
| TFunctionRef< TVector< RealType >(int32)> | GetPointFunc, | ||
| RealType | FaceAngleToleranceInDegrees = (RealType)1.0, |
||
| RealType | PlaneDistanceTolerance = (RealType)1.0, |
||
| TArray< TVector< RealType > > * | OutPolygonNormals = nullptr |
||
| ) | const |
Get faces of the convex hull as convex polygons, simplifying the hull by merging near-coplanar faces and only keeping vertices that are on the corner of at least three merged faces
| OutPolygons | Polygons of the convex hull faces, as arrays of indices into the original points |
| GetPointFunc | Function providing array-style access into points |
| FaceAngleToleranceInDegrees | The hull will be simplified by merging faces with less than this dihedral angle between them |
| PlaneDistanceTolerance | Faces will not merge unless all points on the face are within this distance of the combined (average) face plane |
| OutPolygonNormals | Optional array of normals for each polygon |
| void UE::Geometry::TConvexHull3< RealType >::GetSimplifiedFaces | ( | TFunctionRef< void(TArray< int32 > &, TVector< RealType >)> | PolygonFunc, |
| TFunctionRef< TVector< RealType >(int32)> | GetPointFunc, | ||
| RealType | FaceAngleToleranceInDegrees = (RealType)1.0, |
||
| RealType | PlaneDistanceTolerance = (RealType)1.0 |
||
| ) | const |
Get faces of the convex hull as convex polygons, simplifying the hull by merging near-coplanar faces and only keeping vertices that are on the corner of at least three merged faces
| PolygonFunc | Callback to be called for each polygon, with the array of vertex indices and the face normal |
| GetPointFunc | Function providing array-style access into points |
| FaceAngleToleranceInDegrees | The hull will be simplified by merging faces with less than this dihedral angle between them |
| PlaneDistanceTolerance | Faces will not merge unless all points on the face are within this distance of the combined (average) face plane |
|
inline |
Only valid if bSaveTriangleNeighbors was true when Solve() was called
|
inline |
|
inline |
Call TriangleFunc for each triangle of the Convex Hull. The triangles index into the point set passed to Solve()
|
inline |
|
inline |
|
inline |
| bool UE::Geometry::TConvexHull3< RealType >::Solve | ( | int32 | NumPoints, |
| TFunctionRef< TVector< RealType >(int32)> | GetPointFunc, | ||
| TFunctionRef< bool(int32)> | FilterFunc | ||
| ) |
Generate convex hull as long as input is not degenerate If input is degenerate, this will return false, and caller can call GetDimension() to determine whether the points were coplanar, collinear, or all the same point
| NumPoints | Number of points to consider |
| GetPointFunc | Function providing array-style access into points |
| FilterFunc | Optional filter to include only a subset of the points in the output hull |
|
inline |
Generate convex hull as long as input is not degenerate If input is degenerate, this will return false, and caller can call GetDimension() to determine whether the points were collinear, or all the same point
| Points | Array of points to consider |
|
inline |
Generate convex hull as long as input is not degenerate If input is degenerate, this will return false, and caller can call GetDimension() to determine whether the points were collinear, or all the same point
| Points | Array of points to consider |
| FilterFunc | Optional filter to include only a subset of the points in the output hull |
|
static |
| bool UE::Geometry::TConvexHull3< RealType >::bSaveTriangleNeighbors = false |
Whether neighbors for the hull triangles should be computed/saved. If true, can call GetTriangleNeighbors() after Solve().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| FProgressCancel* UE::Geometry::TConvexHull3< RealType >::Progress = nullptr |
Set this to be able to cancel running operation
| TConvexHullSimplificationSettings<RealType> UE::Geometry::TConvexHull3< RealType >::SimplificationSettings |