#include <GeometryCollectionConvexUtility.h>
|
| static CHAOS_API FGeometryCollectionConvexData | GetValidConvexHullData (FGeometryCollection *GeometryCollection) |
| |
| static CHAOS_API TOptional< FGeometryCollectionConvexData > | GetConvexHullDataIfPresent (FManagedArrayCollection *GeometryCollection) |
| |
| static CHAOS_API bool | HasConvexHullData (const FManagedArrayCollection *GeometryCollection) |
| |
| static CHAOS_API FGeometryCollectionConvexData | CreateNonOverlappingConvexHullData (FGeometryCollection *GeometryCollection, double FractionAllowRemove=.3, double SimplificationDistanceThreshold=0.0, double CanExceedFraction=.5, EConvexOverlapRemoval OverlapRemovalMethod=EConvexOverlapRemoval::All, double OverlapRemovalShrinkPercent=0.0, UE::GeometryCollectionConvexUtility::FConvexHulls *ComputedLeafHullsToModify=nullptr) |
| |
| static CHAOS_API void | GenerateClusterConvexHullsFromChildrenHulls (FGeometryCollection &Collection, const FClusterConvexHullSettings &Settings, const TArrayView< const int32 > TransformSubset) |
| |
| static CHAOS_API void | GenerateClusterConvexHullsFromChildrenHulls (FGeometryCollection &Collection, const FClusterConvexHullSettings &Settings) |
| |
| static CHAOS_API void | GenerateClusterConvexHullsFromLeafHulls (FGeometryCollection &Collection, const FClusterConvexHullSettings &Settings, const TArrayView< const int32 > OptionalTransformSubset) |
| |
| static CHAOS_API void | GenerateClusterConvexHullsFromLeafHulls (FGeometryCollection &Collection, const FClusterConvexHullSettings &Settings) |
| |
| static CHAOS_API void | MergeHullsOnTransforms (FManagedArrayCollection &Collection, const FGeometryCollectionConvexUtility::FMergeConvexHullSettings &Settings, bool bRestrictToSelection, const TArrayView< const int32 > OptionalTransformSelection, UE::Geometry::FSphereCovering *OptionalSphereCoveringOut=nullptr) |
| |
| static CHAOS_API void | GenerateLeafConvexHulls (FGeometryCollection &Collection, bool bRestrictToSelection, const TArrayView< const int32 > TransformSubset, const FLeafConvexHullSettings &Settings, TArray< FSphereCoveringInfo > *OutComputedNavigableSpheres=nullptr) |
| |
| static CHAOS_API Chaos::FConvexPtr | GetConvexHull (const FGeometryCollection *GeometryCollection, int32 GeometryIndex) |
| |
| static TUniquePtr< Chaos::FConvex > | FindConvexHull (const FGeometryCollection *GeometryCollection, int32 GeometryIndex) |
| |
| static CHAOS_API bool | CopyConvexHulls (FManagedArrayCollection &Collection, const TArray< int32 > &TransformIndices, const FManagedArrayCollection &SourceCollection, const TArray< int32 > &SourceTransformIndices, bool bSkipIfEmpty=false) |
| |
| static CHAOS_API void | RemoveConvexHulls (FManagedArrayCollection *GeometryCollection, const TArray< int32 > &TransformsToClearHullsFrom) |
| |
| static CHAOS_API void | RemoveEmptyConvexHulls (FManagedArrayCollection &GeometryCollection) |
| |
| static CHAOS_API void | SetDefaults (FGeometryCollection *GeometryCollection, FName Group, uint32 StartSize, uint32 NumElements) |
| |
| static CHAOS_API TManagedArray< int32 > * | GetCustomConvexFlags (FGeometryCollection *GeometryCollection, bool bAddIfMissing=false) |
| |
| static CHAOS_API bool | ValidateConvexData (const FManagedArrayCollection *GeometryCollection) |
| |
| static CHAOS_API void | SetVolumeAttributes (FManagedArrayCollection *Collection) |
| |
| static CHAOS_API void | CopyChildConvexes (const FGeometryCollection *FromCollection, const TArrayView< const int32 > &FromTransformIdx, FGeometryCollection *ToCollection, const TArrayView< const int32 > &ToTransformIdx, bool bLeafOnly) |
| |
| static CHAOS_API UE::GeometryCollectionConvexUtility::FConvexHulls | ComputeLeafHulls (FGeometryCollection *GeometryCollection, const TArray< FTransform > &GlobalTransformArray, double SimplificationDistanceThreshold=0.0, double OverlapRemovalShrinkPercent=0.0, TFunction< bool(int32)> SkipBoneFn=nullptr, const FConvexDecompositionSettings *OptionalDecompositionSettings=nullptr, const TArray< FTransformedConvex > *OptionalIntersectConvexHulls=nullptr, const TArray< TSet< int32 > > *OptionalTransformToIntersectHulls=nullptr, TArray< FGeometryCollectionConvexUtility::FSphereCoveringInfo > *OutComputedNavigableSpheres=nullptr) |
| |
| static CHAOS_API void | ConvertImplicitToConvexArray (const Chaos::FImplicitObject &InImplicit, const FTransform &Transform, TArray< FTransformedConvex > &InOutConvex) |
| |
◆ ComputeLeafHulls()
◆ ConvertImplicitToConvexArray()
◆ CopyChildConvexes()
Copy convex hulls from below FromTransformIdx over to all live at ToTransformIdx. The two geometry collections can be the same but do not need to be. Note: This will also set HasCustomConvex flags for the ToTransformIdx.
- Parameters
-
| FromCollection | The collection to copy from |
| FromTransformIdx | The transform indices whose child nodes should be copied from (or, if it's a leaf, the hull on the leaf will be copied instead) |
| ToCollection | The collection to copy to (can be the same as FromCollection) |
| ToTransformIdx | The transform indices whose convexes will be replaced with copies of the child convexes. Must be same length as FromTransformIdx; can be the same array. |
| bLeafOnly | If true, we will only collect convexes from leaf bones, not from clusters. |
◆ CopyConvexHulls()
Copy convex hulls on the specified transforms from a source collection to the collection
- Parameters
-
| GeometryCollection | The collection to copy convex hulls to |
| TransformIndices | The transforms on the GeometryCollection to update w/ copied convex hulls. Must be same length as SourceTransformIndices array. |
| SourceCollection | The collection to copy convex hulls from |
| SourceTransformIndices | The transforms on the SourceCollection to copy from. Must be same length as TransformIndices array. |
| bSkipIfEmpty | Whether to skip copying from transforms that have no convex hulls |
◆ CreateNonOverlappingConvexHullData()
Create non-overlapping convex hull data for all transforms in the geometry collection (except transforms where it would be better to just use the hulls of the children)
- Parameters
-
| GeometryCollection | The collection to add convex hulls to |
| FractionAllowRemove | The fraction of a convex body we can cut away to remove overlaps with neighbors, before we fall back to using the hulls of the children directly. (Does not affect leaves of hierarchy) |
| SimplificationDistanceThreshold | Approximate minimum distance between vertices, below which we remove vertices to generate a simpler convex shape. If 0.0, no simplification will occur. |
| CanExceedFraction | The fraction by which the convex body volume on a cluster can exceed the volume of the geometry under that cluster (a value of 1 == exceed by 100% == convex hull has 2x the volume of the geometry) |
| OverlapRemovalMethod | If bRemoveOverlaps, control which overlaps are removed |
| OverlapRemovalShrinkPercent | Compute overlaps based on objects shrunk by this percentage, so objects that would not overlap with this value set as their 'Collision Object Reduction Percentage' will not be cut |
| ComputedLeafHullsToModify | Optional pre-computed hulls for geometry of rigid leaves, in the top-level coordinate space of the geometry collection. If passed in, the data will be updated and moved. |
◆ FindConvexHull()
◆ GenerateClusterConvexHullsFromChildrenHulls() [1/2]
◆ GenerateClusterConvexHullsFromChildrenHulls() [2/2]
◆ GenerateClusterConvexHullsFromLeafHulls() [1/2]
◆ GenerateClusterConvexHullsFromLeafHulls() [2/2]
◆ GenerateLeafConvexHulls()
◆ GetConvexHull()
Returns the convex hull of the vertices contained in the specified geometry.
◆ GetConvexHullDataIfPresent()
Get convex hull data for the Geometry Collection if it is present
◆ GetCustomConvexFlags()
Get the HasCustomConvex flags. If they're missing, either add them (if bAddIfMissing) or return nullptr
◆ GetValidConvexHullData()
Ensure that convex hull data exists for the Geometry Collection and construct it if not (or if some data is missing.
◆ HasConvexHullData()
- Returns
- true if convex hull data is present
◆ MergeHullsOnTransforms()
◆ RemoveConvexHulls()
Delete the convex hulls pointed at by the transform indices provided.
◆ RemoveEmptyConvexHulls()
Delete the convex hulls that are null
◆ SetDefaults()
Set default values for convex hull related managed arrays.
◆ SetVolumeAttributes()
Set Volume and Size attributes on the Collection (will be called by CreateNonOverlappingConvexHullData – Volumes must be up to date for convex calc)
◆ ValidateConvexData()
- Returns
- true if the GeometryCollection has convex data with no null pointers and no invalid indices
The documentation for this class was generated from the following files: