Navigation
API > API/Plugins > API/Plugins/DynamicMesh
Description
Detect if input Mesh is a meshed approximation of an analytic Sphere, and if so return best guess in SphereOut. Fits a sphere to input points with several rounds of incremental improvement, then measures chordal deviation of edge midpoints.
| Name | UE::Geometry::IsSphereMesh |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/ShapeApproximation/ShapeDetection3.h |
| Include Path | #include "ShapeApproximation/ShapeDetection3.h" |
| Source | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Private/ShapeApproximation/ShapeDetection3.cpp |
namespace UE
{
namespace Geometry
{
bool UE::Geometry::IsSphereMesh
(
const FDynamicMesh3 & Mesh,
FSphere3d & SphereOut,
double RelativeDeviationTol,
double MaxAngleRangeDegrees
)
}
}
true if mesh is a Sphere and SphereOut is initialized
Parameters
| Name | Remarks |
|---|---|
| RelativeDeviationTol | Scaled by sphere diameter. The allowed difference in the distance from edge midpoints to the surface of the sphere vs the ideal distance for an edge of the same length. |
| MaxAngleRangeDegrees | Maximum angle difference in vectors from center of sphere to the endpoints of any surface edge. Controls how coarsely tessellated a sphere can be before it is not considered a sphere. |