Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/CompGeom > API/Runtime/GeometryCore/CompGeom/FConvexDecomposition3
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/CompGeom/ConvexDecomposition3.h |
| Include | #include "CompGeom/ConvexDecomposition3.h" |
| Source | /Engine/Source/Runtime/GeometryCore/Private/CompGeom/ConvexDecomposition3.cpp |
int32 MergeBest
&40;
int32 TargetNumParts,
double ErrorTolerance,
double MinThicknessTolerance,
bool bAllowCompact,
bool bRequireHullTriangles,
int MaxOutputHulls,
const FSphereCovering &42; OptionalNegativeSpace,
const FTransform &42; OptionalTransformIntoNegativeSpace
&41;
Remarks
Merge the pairs of convex hulls in the decomposition that will least increase the error. Intermediate results can be used across merges, so it is best to do all merges in one call. Note: A future version of this function may replace NumOutputHulls with MaxOutputHulls, but this version keeps both parameters for compatibility / consistent behavior. The number of merges performed
Parameters
| Name | Description |
|---|---|
| TargetNumParts | The target number of parts for the decomposition; will be overriden by non-default ErrorTolerance or MinPartThickness |
| ErrorTolerance | If > 0, continue to merge (if there are possible merges) until the resulting error would be greater than this value. Overrides TargetNumParts as the stopping condition. Note: ErrorTolerance is expressed in cm, and will be cubed for volumetric error. |
| MinPartThickness | Optionally specify a minimum thickness (in cm) for convex parts; parts below this thickness will always be merged away. Overrides TargetNumParts and ErrorTolerance when needed. Note: These parts may be further split so they can be merged into multiple hulls |
| bAllowCompact | Allow the algorithm to discard underlying geometry once it will no longer be used, resulting in a smaller representation & faster merges |
| bRequireHullTriangles | Require all hulls to have associated triangles after MergeBest is completed. (If using InitializeFromHulls, will need to triangulate any un-merged hulls.) |
| MaxOutputHulls | If > 0, maximum number of convex hulls to generate. Overrides ErrorTolerance and TargetNumParts when needed |
| OptionalNegativeSpace | Optional representation of negative space that should not be covered by merges |
| OptionalNegativeSpaceTransform | Optional transform from space of the convex hulls into the space of the sphere covering; if not provided, assume spheres are in the same coordinate space as the hulls |