Navigation
API > API/Plugins > API/Plugins/MLDeformerFrameworkEditor
Inheritance Hierarchy
- FMLDeformerSampler
- FMLDeformerGeomCacheSampler
- FNearestNeighborGeomCacheSampler
References
| Module | MLDeformerFrameworkEditor |
| Header | /Engine/Plugins/Animation/MLDeformer/MLDeformerFramework/Source/MLDeformerFrameworkEditor/Public/MLDeformerSampler.h |
| Include | #include "MLDeformerSampler.h" |
Syntax
class FMLDeformerSampler
Remarks
The input data sampler. This class can sample bone rotations, curve values and vertex deltas. It does this by creating two temp actors, one with skeletal mesh component and one with geom cache component.
Variables
| Type | Name | Description | |
|---|---|---|---|
| int32 | AnimFrameIndex | The animation frame we sampled the deltas for. | |
| TArray< FMatrix44f > | BoneMatrices | The sampled bone matrices. | |
| TArray< float > | BoneRotations | The bone rotation floats. | |
| TArray< float > | CurveValues | A float for each Skeleton animation curve. | |
| FMLDeformerEditorModel * | EditorModel | The vertex delta editor model used to sample. | |
| TObjectPtr< UMLDeformerModel > | Model | The vertex delta model associated with this sampler. | |
| int32 | NumFloatsPerCurve | The number of floats per curve value. | |
| int32 | NumImportedVertices | The number of imported vertices of the skeletal mesh and geometry cache. This will be 8 for a cube. | |
| float | SampleTime | The current sample time, in seconds. | |
| TObjectPtr< UDebugSkelMeshComponent > | SkeletalMeshComponent | The skeletal mesh component used to sample skinned positions. | |
| TObjectPtr< AActor > | SkelMeshActor | The skeletal mesh actor used to sample the skinned vertex positions. | |
| TArray< FVector3f > | SkinnedVertexPositions | The skinned vertex positions. | |
| TObjectPtr< AActor > | TargetMeshActor | The actor used for the target mesh. | |
| TArray< FVector3f > | TempVertexPositions | A temp array to store vertex positions in. | |
| TArray< FVector3f > | UnskinnedVertexPositions | The unskinned vertex positions. | |
| TArray< float > | VertexDeltas | The vertex deltas as float buffer. | |
| EVertexDeltaSpace | VertexDeltaSpace | The vertex delta space (pre or post skinning) used when calculating the deltas. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| FMatrix44f | CalcInverseSkinningTransform
(
int32 VertexIndex, |
Calculate the inverse skinning transform, which is used to convert from post-skinning to pre-skinning space. | |
| SIZE_T | Calculate the memory usage of the sampler. | ||
| void | CreateActors () |
Create the actors used for sampling. | |
| AActor * | CreateNewActor
(
UWorld* InWorld, |
Create a new actor with a specific name, in a specified world. | |
| void | ExtractSkinnedPositions
(
int32 LODIndex, |
Extract the skinned vertex positions, of the skeletal mesh. | |
| void | ExtractUnskinnedPositions
(
int32 LODIndex, |
Extract the unskinned vertex positions, of the skeletal mesh. | |
| const TArray< float > & | Get the current bone rotations that we can feed to a neural network. | ||
| const TArray< float > & | Get the float values for the curves. One float per curve. | ||
| int32 | GetNumBones () |
Get the number of bones. | |
| int32 | Get the number of floats per curve. | ||
| int32 | Get the number of imported vertices. | ||
| UDebugSkelMeshComponent * | |||
| const TArray< FVector3f > & | Get the skinned vertex positions of the skeletal mesh. | ||
| float | GetTimeAtFrame
(
int32 InAnimFrameIndex |
Get the time in seconds, at a given frame index. | |
| const TArray< FVector3f > & | Get the unskinned vertex positions of the skeletal mesh. | ||
| const TArray< float > & | Get the calculated vertex deltas. | ||
| EVertexDeltaSpace | Get the space in which we will calculate the vertex deltas. | ||
| void | Init
(
FMLDeformerEditorModel* Model |
Call Init whenever assets or other relevant settings change. | |
| bool | Have we already initialized this sampler? Is it ready for sampling? | ||
| void | Register the target mesh components. | ||
| void | Sample
(
int32 AnimFrameIndex |
Call this every time the frame changes. This will update all buffer contents. | |
| void | SetNumFloatsPerCurve
(
int32 NumFloats |
Set the number of floats used per curve. | |
| void | SetVertexDeltaSpace
(
EVertexDeltaSpace DeltaSpace |
Set the space in which we should calculate the vertex deltas. | |
| void | Update the bone rotation buffers. | ||
| void | Update the curve value buffers. | ||
| void | Update the skeletal mesh component's play position, and refresh its bone transforms internally. | ||
| void | Update the skinned vertex positions. |