// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "dnatests/Defs.h" #include "dna/DNA.h" #include "dna/Reader.h" #include namespace dna { struct RawV23 { static const unsigned char header[91]; static const unsigned char descriptor[87]; static const unsigned char definition[794]; static const unsigned char controls[2]; static const unsigned char conditionals[324]; static const unsigned char psds[204]; static const unsigned char joints[444]; static const unsigned char blendshapes[44]; static const unsigned char animatedmaps[8]; static const unsigned char geometry[1080]; static const unsigned char machineLearnedBehavior[762]; static std::vector getBytes(); }; struct RawV22DowngradedFromV23 { static std::vector getBytes(); }; struct DecodedV23 { using VectorOfCharStringMatrix = pma::Vector > >; using StringPair = std::pair, pma::String >; // Descriptor static const pma::String name; static const Archetype archetype; static const Gender gender; static const std::uint16_t age; static const pma::Vector metadata; static const TranslationUnit translationUnit; static const RotationUnit rotationUnit; static const CoordinateSystem coordinateSystem; static const std::uint16_t lodCount[3ul]; static const std::uint16_t maxLODs[3ul]; static const pma::String complexity; static const pma::String dbName; // Definition static const pma::Vector > guiControlNames; static const pma::Vector > rawControlNames; static const VectorOfCharStringMatrix jointNames; static const VectorOfCharStringMatrix blendShapeNames; static const VectorOfCharStringMatrix animatedMapNames; static const VectorOfCharStringMatrix meshNames; static const pma::Vector > meshBlendShapeIndices; static const pma::Matrix jointHierarchy; static const pma::Vector > neutralJointTranslations; static const pma::Vector > neutralJointRotations; // Behavior static const std::uint16_t guiControlCount; static const std::uint16_t rawControlCount; static const std::uint16_t psdCount; static const pma::Vector > conditionalInputIndices; static const pma::Vector > conditionalOutputIndices; static const pma::Vector > conditionalFromValues; static const pma::Vector > conditionalToValues; static const pma::Vector > conditionalSlopeValues; static const pma::Vector > conditionalCutValues; static const pma::Vector psdRowIndices; static const pma::Vector psdColumnIndices; static const pma::Vector psdValues; static const pma::Vector jointRowCount; static const std::uint16_t jointColumnCount; static const pma::Vector > jointVariableIndices; static const pma::Vector > jointGroupLODs; static const pma::Matrix > jointGroupInputIndices; static const pma::Matrix > jointGroupOutputIndices; static const pma::Matrix > jointGroupValues; static const pma::Matrix > jointGroupJointIndices; static const pma::Matrix blendShapeLODs; static const pma::Vector > blendShapeInputIndices; static const pma::Vector > blendShapeOutputIndices; static const pma::Vector animatedMapCount; static const pma::Matrix animatedMapLODs; // Geometry static const pma::Vector meshCount; static const pma::Vector > vertexPositions; static const pma::Vector > vertexTextureCoordinates; static const pma::Vector > vertexNormals; static const pma::Vector > vertexLayouts; static const pma::Matrix > faces; static const pma::Matrix maxInfluencePerVertex; static const pma::Matrix > skinWeightsValues; static const pma::Matrix > skinWeightsJointIndices; static const pma::Vector > correctiveBlendShapeIndices; static const pma::Matrix > correctiveBlendShapeDeltas; static const pma::Matrix > correctiveBlendShapeVertexIndices; // Machine learned behavior static const pma::Vector > mlControlNames; static const VectorOfCharStringMatrix regionNames; static const pma::Matrix neuralNetworkIndicesPerLOD; static const pma::Matrix > neuralNetworkIndicesPerMeshRegion; static const pma::Vector > neuralNetworkInputIndices; static const pma::Vector > neuralNetworkOutputIndices; static const pma::Matrix neuralNetworkLayerCount; static const pma::Vector > neuralNetworkActivationFunction; static const pma::Matrix > neuralNetworkActivationFunctionParameters; static const pma::Matrix > neuralNetworkBiases; static const pma::Matrix > neuralNetworkWeights; static std::size_t lodConstraintToIndex(std::uint16_t maxLOD, std::uint16_t minLOD); static RawJoints getJoints(std::uint16_t currentMaxLOD, std::uint16_t currentMinLOD, pma::MemoryResource* memRes); static RawBlendShapeChannels getBlendShapes(std::uint16_t currentMaxLOD, std::uint16_t currentMinLOD, pma::MemoryResource* memRes); static RawConditionalTable getConditionals(std::uint16_t currentMaxLOD, std::uint16_t currentMinLOD, pma::MemoryResource* memRes); static RawAnimatedMaps getAnimatedMaps(std::uint16_t currentMaxLOD, std::uint16_t currentMinLOD, pma::MemoryResource* memRes); }; } // namespace dna