// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "DNAReader.h" #include "CoreMinimal.h" #include "Math/Vector.h" #include "UObject/NoExportTypes.h" #include "UObject/ObjectMacros.h" /** @brief A UE wrapper for a special purpose DNA Reader type which serves as the output parameter of DNACalib. */ class DNACALIBMODULE_API FDNACalibDNAReader : public IDNAReader { public: explicit FDNACalibDNAReader(IDNAReader* Source); // Header uint16 GetFileFormatGeneration() const override; uint16 GetFileFormatVersion() const override; // Descriptor FString GetName() const override; EArchetype GetArchetype() const override; EGender GetGender() const override; uint16 GetAge() const override; uint32 GetMetaDataCount() const override; FString GetMetaDataKey(uint32 Index) const override; FString GetMetaDataValue(const FString& Key) const override; ETranslationUnit GetTranslationUnit() const override; ERotationUnit GetRotationUnit() const override; FCoordinateSystem GetCoordinateSystem() const override; uint16 GetLODCount() const override; uint16 GetDBMaxLOD() const override; FString GetDBComplexity() const override; FString GetDBName() const override; // Definition uint16 GetGUIControlCount() const override; FString GetGUIControlName(uint16 Index) const override; uint16 GetRawControlCount() const override; FString GetRawControlName(uint16 Index) const override; uint16 GetJointCount() const override; FString GetJointName(uint16 Index) const override; uint16 GetJointIndexListCount() const override; TArrayView GetJointIndicesForLOD(uint16 LOD) const override; uint16 GetJointParentIndex(uint16 Index) const override; uint16 GetBlendShapeChannelCount() const override; FString GetBlendShapeChannelName(uint16 Index) const override; uint16 GetBlendShapeChannelIndexListCount() const override; TArrayView GetBlendShapeChannelIndicesForLOD(uint16 LOD) const override; uint16 GetAnimatedMapCount() const override; FString GetAnimatedMapName(uint16 Index) const override; uint16 GetAnimatedMapIndexListCount() const override; TArrayView GetAnimatedMapIndicesForLOD(uint16 LOD) const override; uint16 GetMeshCount() const override; FString GetMeshName(uint16 Index) const override; uint16 GetMeshIndexListCount() const override; TArrayView GetMeshIndicesForLOD(uint16 LOD) const override; uint16 GetMeshBlendShapeChannelMappingCount() const override; FMeshBlendShapeChannelMapping GetMeshBlendShapeChannelMapping(uint16 Index) const override; TArrayView GetMeshBlendShapeChannelMappingIndicesForLOD(uint16 LOD) const override; FVector GetNeutralJointTranslation(uint16 Index) const override; FVector GetNeutralJointRotation(uint16 Index) const override; // Behavior TArrayView GetGUIToRawInputIndices() const override; TArrayView GetGUIToRawOutputIndices() const override; TArrayView GetGUIToRawFromValues() const override; TArrayView GetGUIToRawToValues() const override; TArrayView GetGUIToRawSlopeValues() const override; TArrayView GetGUIToRawCutValues() const override; uint16 GetPSDCount() const override; TArrayView GetPSDRowIndices() const override; TArrayView GetPSDColumnIndices() const override; TArrayView GetPSDValues() const override; uint16 GetJointRowCount() const override; uint16 GetJointColumnCount() const override; TArrayView GetJointVariableAttributeIndices(uint16 LOD) const override; uint16 GetJointGroupCount() const override; TArrayView GetJointGroupLODs(uint16 JointGroupIndex) const override; TArrayView GetJointGroupInputIndices(uint16 JointGroupIndex) const override; TArrayView GetJointGroupOutputIndices(uint16 JointGroupIndex) const override; TArrayView GetJointGroupValues(uint16 JointGroupIndex) const override; TArrayView GetJointGroupJointIndices(uint16 JointGroupIndex) const override; TArrayView GetBlendShapeChannelLODs() const override; TArrayView GetBlendShapeChannelOutputIndices() const override; TArrayView GetBlendShapeChannelInputIndices() const override; TArrayView GetAnimatedMapLODs() const override; TArrayView GetAnimatedMapInputIndices() const override; TArrayView GetAnimatedMapOutputIndices() const override; TArrayView GetAnimatedMapFromValues() const override; TArrayView GetAnimatedMapToValues() const override; TArrayView GetAnimatedMapSlopeValues() const override; TArrayView GetAnimatedMapCutValues() const override; // Geometry uint32 GetVertexPositionCount(uint16 MeshIndex) const override; FVector GetVertexPosition(uint16 MeshIndex, uint32 VertexIndex) const override; TArrayView GetVertexPositionXs(uint16 MeshIndex) const override; TArrayView GetVertexPositionYs(uint16 MeshIndex) const override; TArrayView GetVertexPositionZs(uint16 MeshIndex) const override; uint32 GetVertexTextureCoordinateCount(uint16 MeshIndex) const override; FTextureCoordinate GetVertexTextureCoordinate(uint16 MeshIndex, uint32 TextureCoordinateIndex) const override; uint32 GetVertexNormalCount(uint16 MeshIndex) const override; FVector GetVertexNormal(uint16 MeshIndex, uint32 NormalIndex) const override; uint32 GetFaceCount(uint16 MeshIndex) const override; TArrayView GetFaceVertexLayoutIndices(uint16 MeshIndex, uint32 FaceIndex) const override; uint32 GetVertexLayoutCount(uint16 MeshIndex) const override; FVertexLayout GetVertexLayout(uint16 MeshIndex, uint32 LayoutIndex) const override; uint16 GetMaximumInfluencePerVertex(uint16 MeshIndex) const override; uint32 GetSkinWeightsCount(uint16 MeshIndex) const override; TArrayView GetSkinWeightsValues(uint16 MeshIndex, uint32 VertexIndex) const override; TArrayView GetSkinWeightsJointIndices(uint16 MeshIndex, uint32 VertexIndex) const override; uint16 GetBlendShapeTargetCount(uint16 MeshIndex) const override; uint16 GetBlendShapeChannelIndex(uint16 MeshIndex, uint16 BlendShapeTargetIndex) const override; uint32 GetBlendShapeTargetDeltaCount(uint16 MeshIndex, uint16 BlendShapeTargetIndex) const override; FVector GetBlendShapeTargetDelta(uint16 MeshIndex, uint16 BlendShapeTargetIndex, uint32 DeltaIndex) const override; TArrayView GetBlendShapeTargetDeltaXs(uint16 MeshIndex, uint16 BlendShapeTargetIndex) const override; TArrayView GetBlendShapeTargetDeltaYs(uint16 MeshIndex, uint16 BlendShapeTargetIndex) const override; TArrayView GetBlendShapeTargetDeltaZs(uint16 MeshIndex, uint16 BlendShapeTargetIndex) const override; TArrayView GetBlendShapeTargetVertexIndices(uint16 MeshIndex, uint16 BlendShapeTargetIndex) const override; // Machine Learned Behavior uint16 GetMLControlCount() const override; FString GetMLControlName(uint16 Index) const override; uint16 GetNeuralNetworkCount() const override; uint16 GetNeuralNetworkIndexListCount() const override; TArrayView GetNeuralNetworkIndicesForLOD(uint16 LOD) const override; uint16 GetMeshRegionCount(uint16 MeshIndex) const override; FString GetMeshRegionName(uint16 MeshIndex, uint16 RegionIndex) const override; TArrayView GetNeuralNetworkIndicesForMeshRegion(uint16 MeshIndex, uint16 RegionIndex) const override; TArrayView GetNeuralNetworkInputIndices(uint16 NetIndex) const override; TArrayView GetNeuralNetworkOutputIndices(uint16 NetIndex) const override; uint16 GetNeuralNetworkLayerCount(uint16 NetIndex) const override; EActivationFunction GetNeuralNetworkLayerActivationFunction(uint16 NetIndex, uint16 LayerIndex) const override; TArrayView GetNeuralNetworkLayerActivationFunctionParameters(uint16 NetIndex, uint16 LayerIndex) const override; TArrayView GetNeuralNetworkLayerBiases(uint16 NetIndex, uint16 LayerIndex) const override; TArrayView GetNeuralNetworkLayerWeights(uint16 NetIndex, uint16 LayerIndex) const override; // JointBehaviorMetadataReader ETranslationRepresentation GetJointTranslationRepresentation(uint16 JointIndex) const override; ERotationRepresentation GetJointRotationRepresentation(uint16 JointIndex) const override; EScaleRepresentation GetJointScaleRepresentation(uint16 JointIndex) const override; // RBFBehavior uint16 GetRBFPoseCount() const override; FString GetRBFPoseName(uint16 PoseIndex) const override; TArrayView GetRBFPoseJointOutputIndices(uint16 PoseIndex) const override; TArrayView GetRBFPoseBlendShapeChannelOutputIndices(uint16 PoseIndex) const override; TArrayView GetRBFPoseAnimatedMapOutputIndices(uint16 PoseIndex) const override; TArrayView GetRBFPoseJointOutputValues(uint16 PoseIndex) const override; float GetRBFPoseScale(uint16 PoseIndex) const override; uint16 GetRBFPoseControlCount() const override; FString GetRBFPoseControlName(uint16 PoseControlIndex) const override; TArrayView GetRBFPoseInputControlIndices(uint16 PoseIndex) const override; TArrayView GetRBFPoseOutputControlIndices(uint16 PoseIndex) const override; TArrayView GetRBFPoseOutputControlWeights(uint16 PoseIndex) const override; uint16 GetRBFSolverCount() const override; uint16 GetRBFSolverIndexListCount() const override; TArrayView GetRBFSolverIndicesForLOD(uint16 LOD) const override; FString GetRBFSolverName(uint16 SolverIndex) const override; TArrayView GetRBFSolverRawControlIndices(uint16 SolverIndex) const override; TArrayView GetRBFSolverPoseIndices(uint16 SolverIndex) const override; TArrayView GetRBFSolverRawControlValues(uint16 SolverIndex) const override; ERBFSolverType GetRBFSolverType(uint16 SolverIndex) const override; float GetRBFSolverRadius(uint16 SolverIndex) const override; EAutomaticRadius GetRBFSolverAutomaticRadius(uint16 SolverIndex) const override; float GetRBFSolverWeightThreshold(uint16 SolverIndex) const override; ERBFDistanceMethod GetRBFSolverDistanceMethod(uint16 SolverIndex) const override; ERBFNormalizeMethod GetRBFSolverNormalizeMethod(uint16 SolverIndex) const override; ERBFFunctionType GetRBFSolverFunctionType(uint16 SolverIndex) const override; ETwistAxis GetRBFSolverTwistAxis(uint16 SolverIndex) const override; // TwistSwingBehavior uint16 GetTwistCount() const override; ETwistAxis GetTwistSetupTwistAxis(uint16 TwistIndex) const override; TArrayView GetTwistInputControlIndices(uint16 TwistIndex) const override; TArrayView GetTwistOutputJointIndices(uint16 TwistIndex) const override; TArrayView GetTwistBlendWeights(uint16 TwistIndex) const override; uint16 GetSwingCount() const override; ETwistAxis GetSwingSetupTwistAxis(uint16 SwingIndex) const override; TArrayView GetSwingInputControlIndices(uint16 SwingIndex) const override; TArrayView GetSwingOutputJointIndices(uint16 SwingIndex) const override; TArrayView GetSwingBlendWeights(uint16 SwingIndex) const override; void Unload(EDNADataLayer layer) override; dna::Reader* Unwrap() const override; private: TUniquePtr ReaderPtr; };