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::IsCapsuleMesh
(
const FDynamicMesh3 & Mesh,
FCapsule3d & CapsuleOut,
double RelativeDeviationTol,
double MaxAngleRangeDegrees
)
}
}
Remarks
Detect if input Mesh is a meshed approximation of an analytic Capsule, and if so return best guess in CapsuleOut. Fits a capsule to input points, then measures chordal deviation of edge midpoints. true if mesh is a Capsule and CapsuleOut is initialized
Parameters
| Name | Description |
|---|---|
| RelativeDeviationTol | Scaled by capsule diameter. The allowed difference in the distance from edge midpoints to the surface of the capsule vs the ideal distance for an edge of the same length. |
| MaxAngleRangeDegrees | Maximum angle range an edge can cover over the cylinder or the spherical endcaps. Controls how coarsely tessellated a capsule can be before it is not considered a capsule. |