// 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 RawV25 { static const unsigned char header[155]; 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 const unsigned char rbfBehavior[327]; static const unsigned char rbfBehaviorExt[228]; static const unsigned char jointBehaviorMetadata[58]; static const unsigned char twistSwingBehavior[200]; static std::vector getBytes(); }; struct RawV24DowngradedFromV25 { static std::vector getBytes(); }; struct DecodedV25 { 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; // RBF behavior static const pma::Vector > poseNames; static const pma::Vector poseDistanceMethod; static const pma::Vector poseFunctionType; static const pma::Vector poseScale; static const pma::Matrix solverIndicesPerLOD; static const pma::Vector > solverNames; static const pma::Vector solverRadius; static const pma::Vector solverWeightThreshold; static const pma::Vector solverType; static const pma::Vector solverAutomaticRadius; static const pma::Vector solverDistanceMethod; static const pma::Vector solverNormalizeMethod; static const pma::Vector solverFunctionType; static const pma::Vector solverTwistAxis; static const pma::Matrix solverRawControlIndices; static const pma::Matrix solverPoseIndices; static const pma::Matrix solverRawControlValues; // RBF behavior ext static const pma::Vector > poseControlNames; static const pma::Matrix poseInputControlIndices; static const pma::Matrix poseOutputControlIndices; static const pma::Matrix poseOutputControlWeights; // Joint behavior metadata static const pma::Matrix jointTranslationRepresentation; static const pma::Matrix jointRotationRepresentation; static const pma::Matrix jointScaleRepresentation; // Twist swing setups static const pma::Vector > swingInputControlIndices; static const pma::Vector > swingOutputJointIndices; static const pma::Vector > swingBlendWeights; static const pma::Matrix swingTwistAxes; static const pma::Vector > twistInputControlIndices; static const pma::Vector > twistOutputJointIndices; static const pma::Vector > twistBlendWeights; static const pma::Matrix twistTwistAxes; 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