FGeometryCollectionClusteringUtility

Windows
MacOS
Linux

References

Module

Chaos

Header

/Engine/Source/Runtime/Experimental/Chaos/Public/GeometryCollection/GeometryCollectionClusteringUtility.h

Include

#include "GeometryCollection/GeometryCollectionClusteringUtility.h"

Syntax

class FGeometryCollectionClusteringUtility

Functions

Name Description

Public function Static

void

 

ClusterAllBonesUnderNewRoot

(
    FGeometryCollection* GeometryC...
)

Cluster all existing bones under a new root node, so there is now only one root node and a completely flat hierarchy underneath it

Public function Static

void

 

ClusterBonesByContext

(
    FGeometryCollection* GeometryC...,
    int32 MergeNode,
    const TArray< int32 >& SourceEleme...
)

Clusters using one of ClusterBonesUnderNewNode or ClusterBonesUnderExistingNode based on the context of what is being clustered

Public function Static

void

 

ClusterBonesUnderExistingNode

(
    FGeometryCollection* GeometryC...,
    const TArray< int32 >& SourceEleme...
)

Cluster all source bones under an existing node, algorithm chooses best node to add to 'closest to root'

Public function Static

void

 

ClusterBonesUnderExistingNode

(
    FGeometryCollection* GeometryC...,
    int32 MergeNode,
    const TArray< int32 >& SourceEleme...
)

Cluster all source bones under an existing node, existing node is specifiedas MergeNode

Public function Static

void

 

ClusterBonesUnderExistingRoot

(
    FGeometryCollection* GeometryC...,
    const TArray< int32 >& SourceEleme...
)

Reparent source bones under root bone

Public function Static

void

 

ClusterBonesUnderNewNode

(
    FGeometryCollection* GeometryC...,
    int32 InsertAtIndex,
    const TArray< int32 >& SelectedBon...,
    bool CalcNewLocalTransform,
    bool Validate
)

Creates a cluster in the node hierarchy by re-parenting the Selected Bones off a new node in the hierarchy It makes more sense to think that the Selected Bones are all at the same level in the hierarchy however it will re-parent multiple levels at the InsertAtIndex location bone

Public function Static

void

 

CollapseHierarchyOneLevel

(
    FGeometryCollection* GeometryC...,
    TArray< int32 >& SourceElements
)

Moved the selected bones closer to the root

Public function Static

void

 

CollapseLevelHierarchy

(
    int8 Level,
    FGeometryCollection* GeometryC...
)

Collapse hierarchy at specified level

Public function Static

void

 

CollapseSelectedHierarchy

(
    int8 Level,
    const TArray< int32 >& SelectedBon...,
    FGeometryCollection* GeometryC...
)

Collapse hierarchy of selected bones at specified level

Public function Static

bool

 

ContainsMultipleRootBones

(
    FGeometryCollection* GeometryC...
)

Returns true if bone hierarchy contains more than one root node

Public function Static

void

 

ContextBasedClusterSelection

(
    FGeometryCollection* GeometryC...,
    int ViewLevel,
    const TArray< int32 >& SelectedCom...,
    TArray< int32 >& SelectedComponent...,
    TArray< int32 >& HighlightedCompon...
)

Make logical editor selections based on the current selected hierarchy view level

Public function Static

int32

 

FindLowestCommonAncestor

(
    FGeometryCollection* GeometryC...,
    const TArray< int32 >& SelectedBon...
)

Find the lowest common ancestor index of currently selected nodes.

Public function Static

void

 

GetChildBonesFromLevel

(
    const FGeometryCollection* Geo...,
    int32 SourceBone,
    int32 Level,
    TArray< int32 >& BonesOut
)

Get list of child bones down from the source bone below the specified hierarchy level

Public function Static

void

 

GetClusteredBonesWithCommonParent

(
    const FGeometryCollection* Geo...,
    int32 SourceBone,
    TArray< int32 >& BonesOut
)

Finds all Bones in same cluster as the one specified

Public function Static

void

 

GetLeafBones

(
    FGeometryCollection* GeometryC...,
    int BoneIndex,
    bool bOnlyRigids,
    TArray< int32 >& LeafBonesOut
)

Return an array of all child leaf nodes below the specified node.

Public function Static

int32

 

GetParentOfBoneAtSpecifiedLevel

(
    const FGeometryCollection* Geo...,
    int32 SourceBone,
    int32 Level
)

Search hierarchy for the parent of the specified bone, where the parent exists at the given level in the hierarchy

Public function Static

void

 

GetRootBones

(
    const FGeometryCollection* Geo...,
    TArray< int32 >& RootBonesOut
)

Finds the root bone in the hierarchy, the one with an invalid parent bone index

Public function Static

bool

 

IsARootBone

(
    const FGeometryCollection* Geo...,
    int32 InBone
)

Return true if the specified bone is a root bone

Public function Static

void

 

MoveUpOneHierarchyLevel

(
    FGeometryCollection* GeometryC...,
    const TArray< int32 >& SelectedBon...
)

Move the selected node up a level in direction of root

Public function Static

bool

 

NodeExistsOnThisBranch

(
    const FGeometryCollection* Geo...,
    int32 TestNode,
    int32 TreeElement
)

Return true of Test Node exists on tree branch specified by TreeElement Node

Public function Static

void

 

RecursiveAddAllChildren

(
    const TManagedArray< TSet< int32 >>...,
    int32 SourceBone,
    TArray< int32 >& BonesOut
)

Recursively Add all children to output bone list from source bone down to the leaf nodes

Public function Static

void

 

RecursivelyUpdateChildBoneNames

(
    int32 BoneIndex,
    const TManagedArray< TSet< int32 >>...,
    TManagedArray< FString >& BoneName...,
    bool OverrideBoneNames
)

Maintains the bone naming convention of Root "Name" Level 1 "Name_001", "Name_0002", ...

Public function Static

void

 

RemoveDanglingClusters

(
    FGeometryCollection* GeometryC...
)

Delete any cluster nodes discovered to have no children

Public function Static

void

 

RenameBone

(
    FGeometryCollection* GeometryC...,
    int32 BoneIndex,
    const FString& NewName,
    bool UpdateChildren
)

Rename a bone node, will automatically update all child node names if requested (current default)

Public function Static

void

 

UpdateHierarchyLevelOfChildren

(
    FGeometryCollection* GeometryC...,
    int32 ParentElement
)

Recursively update the hierarchy level of all the children below this bone

Public function Static

void

 

ValidateResults

(
    FGeometryCollection* GeometryC...
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss