Navigation
API > API/Plugins > API/Plugins/NearestNeighborModel
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UNearestNeighborModelSection
References
| Module | NearestNeighborModel |
| Header | /Engine/Plugins/Animation/MLDeformer/NearestNeighborModel/Source/NearestNeighborModel/Public/NearestNeighborModel.h |
| Include | #include "NearestNeighborModel.h" |
Syntax
UCLASS ()
class UNearestNeighborModelSection : public UObject
Remarks
The section of the nearest neighbor model. Each section contains a set of vertices in the original skeletal mesh. The nearest neighbor search is performed on each section separately. For example, if a character asset has both shirt and pants mesh, user can define sperate two separate sections for shirt and pants, and the nearest neighbor search will be performed separately on those two sections.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< float > | AssetNeighborCoeffs | Flattened array of neighbor coefficients before excluding frames. | |
| TArray< int32 > | AssetNeighborIndexMap | The index into the original nearest neighbor ROM asset after frames are excluded. | |
| TArray< float > | AssetNeighborOffsets | Flattened array of neighbor offsets before excluding frames. | |
| FName | AttributeName | A float vertex attribute that is used to compute weight maps | |
| TArray< float > | Basis | Flattened array of basis. The shape of basis is (CoeffNum, NumVertices * 3) | |
| TArray< FName > | BoneNames | Bone names used to create weight map. | |
| TArray< int32 > | ExcludedFrames | Frames to be excluded from the nearest neighbor ROM | |
| FString | ExternalTxtFile | The path to the txt file containing vertex weights. | |
| int32 | MeshIndex | The mesh index in SkeletalMeshRenderData | |
| TObjectPtr< UNearestNeighborModel > | Model | The parent nearest neighbor model | |
| TObjectPtr< UGeometryCache > | NeighborMeshes | Geometry cache of the nearest neighbor ROM. | |
| TObjectPtr< UAnimSequence > | NeighborPoses | Poses of the nearest neighbor ROM. | |
| int32 | NumPCACoeffs | Number of PCA coefficients for this section. | |
| int32 | NumVertices | Number of vertices in this section | |
| TArray< float > | RuntimeNeighborCoeffs | Flattened array of neighbor offsets after excluding frames. | |
| int32 | RuntimeNumNeighbors | Number of neighbors in this section after excluding frames | |
| TArray< int32 > | VertexMap | Vertex indices for this section. VertexMap.Num() == NumVertices | |
| FString | VertexMapString | A string containing vertex indices for this section, e.g. "2, 3, 5-8, 9, 11-20" | |
| TArray< float > | VertexMean | The vertex mean on the shape. This array has a size of NumVertices * 3 | |
| TArray< float > | VertexWeights | The vertex weights for this section. VertexWeights.Num() == NumVertices. | |
| ENearestNeighborModelSectionWeightMapCreationMethod | WeightMapCreationMethod | Method to create weight map for this section. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| bool | DoesUsePCA () |
||
| void | |||
| const TArray< float > & | |||
| const TArray< int32 > & | |||
| const TArray< float > & | |||
| int32 | |||
| FName | |||
| const TArray< float > & | GetBasis () |
||
| const TArray< FName > & | GetBoneNames () |
||
| FString | |||
| const TArray< int32 > & | |||
| FName | |||
| FString | |||
| FName | |||
| FMLDeformerGeomCacheTrainingInputAnim * | GetInputAnim () |
||
| int32 | GetMeshIndex () |
||
| const UNearestNeighborModel * | GetModel () |
||
| UGeometryCache * | |||
| UAnimSequence * | Avoid mutable getters. Changing NeighborPoses or NeighborMeshes may cause unexpected errors. | ||
| const TArray< float > & | |||
| const UGeometryCache * | |||
| FName | |||
| const UAnimSequence * | |||
| FName | |||
| int32 | GetNumBasis () |
||
| FName | |||
| int32 | |||
| bool | GetRuntimeNeighborOffsets
(
TArray< float >& OutNeighborOffsets |
||
| int32 | |||
| const TArray< int32 > & | GetVertexMap () |
||
| FName | |||
| const TArray< float > & | |||
| const TArray< float > & | |||
| ENearestNeighborModelSectionWeightMapCreationMethod | |||
| FName | |||
| PRAGMA_DISABLE_DEPRECATION_WARNINGS void | InitFromClothPartData
(
FClothPartData& InPart |
||
| void | |||
| void | |||
| bool | |||
| bool | |||
| EOpFlag | Do not call this function directly. Call UNearestNeighborModel::NormalizeVertexWeights() instead. | ||
| void | SetBoneNames
(
const TArray< FName >& InBoneNames |
||
| void | SetExternalTxtFile
(
const FString& InFile |
||
| void | SetMeshIndex
(
int32 Index |
||
| void | SetModel
(
UNearestNeighborModel* InModel |
||
| void | SetNumBasis
(
const int32 InNumBasis |
||
| void | SetVertexMapString
(
const FString& InString |
||
| EOpFlag | |||
| EOpFlag | |||
| bool | |||
| EOpFlag |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally |
Typedefs
| Name | Description |
|---|---|
| EOpFlag | |
| FPropertyChangedDelegate |