Navigation
API > API/Plugins > API/Plugins/MLDeformerFrameworkEditor
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.
| Name | FMLDeformerSampler |
| Type | class |
| Header File | /Engine/Plugins/Animation/MLDeformer/MLDeformerFramework/Source/MLDeformerFrameworkEditor/Public/MLDeformerSampler.h |
| Include Path | #include "MLDeformerSampler.h" |
Syntax
class FMLDeformerSampler
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMLDeformerSampler() |
MLDeformerSampler.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SIZE_T CalcMemUsagePerFrameInBytes() |
Calculate the memory usage of the sampler. | MLDeformerSampler.h | |
void ExtractSkinnedPositions
(
int32 LODIndex, |
Get the skinned positions for a given LOD level. | MLDeformerSampler.h | |
const TArray< float > & GetBoneRotations () |
Get the current bone rotations that we can feed to a neural network. | MLDeformerSampler.h | |
const TArray< float > & GetCurveValues() |
Get the float values for the curves. One float per curve. | MLDeformerSampler.h | |
int32 GetNumBones() |
Get the number of bones. | MLDeformerSampler.h | |
int32 GetNumFloatsPerCurve() |
Get the number of floats per curve. | MLDeformerSampler.h | |
int32 GetNumImportedVertices() |
Get the number of imported vertices. | MLDeformerSampler.h | |
UDebugSkelMeshComponent * GetSkeletalMeshComponent() |
MLDeformerSampler.h | ||
const TArray< FVector3f > & GetSkinnedVertexPositions() |
Get the skinned vertex positions of the skeletal mesh. | MLDeformerSampler.h | |
EMLDeformerSkinningMode GetSkinningMode() |
Get the skinning mode. | MLDeformerSampler.h | |
virtual float GetTimeAtFrame
(
int32 InAnimFrameIndex |
Get the time in seconds, at a given frame index. | MLDeformerSampler.h | |
const TArray< FVector3f > & GetUnskinnedVertexPositions() |
Get the unskinned vertex positions of the skeletal mesh. | MLDeformerSampler.h | |
const TArray< float > & GetVertexDeltas () |
Get the calculated vertex deltas. | MLDeformerSampler.h | |
EVertexDeltaSpace GetVertexDeltaSpace() |
Get the space in which we will calculate the vertex deltas. | MLDeformerSampler.h | |
virtual void Init
(
FMLDeformerEditorModel* Model |
Call Init whenever assets or other relevant settings change. | MLDeformerSampler.h | |
virtual void Init
(
FMLDeformerEditorModel* Model, |
MLDeformerSampler.h | ||
bool IsInitialized() |
Have we already initialized this sampler? Is it ready for sampling? | MLDeformerSampler.h | |
virtual void Sample
(
int32 AnimFrameIndex |
Call this every time the frame changes. This will update all buffer contents. | MLDeformerSampler.h | |
void SetNumFloatsPerCurve
(
int32 NumFloats |
Set the number of floats used per curve. | MLDeformerSampler.h | |
void SetSkinningMode
(
const EMLDeformerSkinningMode Mode |
Set the skinning mode. | MLDeformerSampler.h | |
void SetVertexDeltaSpace
(
EVertexDeltaSpace DeltaSpace |
Set the space in which we should calculate the vertex deltas. | MLDeformerSampler.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FVector3f CalcDualQuaternionDelta
(
int32 VertexIndex, |
Calculate the delta using dual quaternions, taking a world space delta vector as input. | MLDeformerSampler.h | |
FMatrix44f CalcInverseSkinningTransform
(
int32 VertexIndex, |
Calculate the inverse skinning transform, which is used to convert from post-skinning to pre-skinning space. | MLDeformerSampler.h | |
virtual void CreateActors () |
Create the actors used for sampling. | MLDeformerSampler.h | |
| Create a new actor with a specific name, in a specified world. | MLDeformerSampler.h | ||
void ExtractSkinnedPositions
(
int32 LODIndex, |
Extract the skinned vertex positions, of the skeletal mesh. | MLDeformerSampler.h | |
void ExtractUnskinnedPositions
(
int32 LODIndex, |
Extract the unskinned vertex positions, of the skeletal mesh. | MLDeformerSampler.h | |
virtual void RegisterTargetComponents() |
Register the target mesh components. | MLDeformerSampler.h | |
void UpdateBoneRotations() |
Update the bone rotation buffers. | MLDeformerSampler.h | |
void UpdateCurveValues() |
Update the curve value buffers. | MLDeformerSampler.h | |
void UpdateSkeletalMeshComponent() |
Update the skeletal mesh component's play position, and refresh its bone transforms internally. | MLDeformerSampler.h | |
void UpdateSkinnedPositions() |
Update the skinned vertex positions. | MLDeformerSampler.h |