Navigation
API > API/Plugins > API/Plugins/GeometryAlgorithms > API/Plugins/GeometryAlgorithms/FShrinkMedialBall
Description
Shrink a sphere touching a given SurfacePoint, with center along the line through its SurfaceNormal until the sphere approximately touches two closest surface points including the input point Note: Sphere will often not actually touch the input surface point due to discretization error, since we set the radius s.t. the sphere remains inside the input surface
| Name | Find |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/GeometryAlgorithms/Public/Skeletonization/MeshMedialAxisSampling.h |
| Include Path | #include "Skeletonization/MeshMedialAxisSampling.h" |
template<typename MeshType>
FSphere Find
(
const TMeshAABBTree3 < MeshType > & MeshBVH,
const FVector3d & SurfacePoint,
const FVector3d & SurfaceNormal,
bool bRadiusHotStart,
double InitialRadius,
TFunctionRef < bool> EarlyStopAtTIDFn
)
Parameters
| Name | Remarks |
|---|---|
| MeshBVH | BVH of the surface |
| SurfacePoint | Reference point that the medial ball should approximately touch |
| SurfaceNormal | Normal at the SurfacePoint; note for vertices/edges this should be a smooth normal |
| bRadiusHotStart | If true, the InitialRadius should be a more accurate initial guess e.g. provided via one of the FindLocalMinCurvatureRadius methods |
| InitialRadius | If non-negative, initial radius to use for the sphere-shrinking search. Otherwise, will be automatically set from the surface bounding box's max dimension |
| EarlyStopAtTIDFn | Use when starting from a vertex/edge to stop in the discrete neighborhood of that source vertex/edge. Passed the current closest triangle ID. |