Navigation
API > API/Plugins > API/Plugins/DynamicMesh
Description
Detect if input Mesh is a meshed box, and if so return analytic box in BoxOut. Clusters face planes, looking to find 6 unique planes with normals grouped into 3 opposite-direction pairs. If this configuraiton is found, computing minimal box is trivial.
| Name | UE::Geometry::IsBoxMesh |
| 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::IsBoxMesh
(
const FDynamicMesh3 & Mesh,
FOrientedBox3d & BoxOut,
double AngleToleranceDeg,
double PlaneDistanceTolerance
)
}
}
true if mesh is a Box and BoxOut is initialized
Parameters
| Name | Remarks |
|---|---|
| AngleToleranceDeg | normals are allowed to deviate by this amount and still be considered coplanar |
| PlaneDistanceTolerance | planes with the same normal are allowed to be this far apart and still be considered coplanar |