Navigation
API > API/Plugins > API/Plugins/DynamicMesh > API/Plugins/DynamicMesh/ShapeApproximation
References
| Module | DynamicMesh |
| Header | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/ShapeApproximation/ShapeDetection3.h |
| Include | #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
)
}
}
Remarks
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. true if mesh is a Box and BoxOut is initialized
Parameters
| Name | Description |
|---|---|
| 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 |