dna/ReaderImpl.h dna/BaseImpl.h dna/DenormalizedData.h dna/TypeDefs.h cstddef limits tuple dna::ReaderImpl dna //CopyrightEpicGames,Inc.AllRightsReserved. #pragmaonce #include"dna/BaseImpl.h" #include"dna/DenormalizedData.h" #include"dna/TypeDefs.h" #ifdef_MSC_VER #pragmawarning(push) #pragmawarning(disable:43654987) #endif #include<cstddef> #include<limits> #include<tuple> #ifdef_MSC_VER #pragmawarning(pop) #endif namespacedna{ template<classTReaderBase> classReaderImpl:publicTReaderBase,publicvirtualBaseImpl{ public: explicitReaderImpl(MemoryResource*memRes_); //DescriptorReadermethodsstart StringViewgetName()constoverride; ArchetypegetArchetype()constoverride; GendergetGender()constoverride; std::uint16_tgetAge()constoverride; std::uint32_tgetMetaDataCount()constoverride; StringViewgetMetaDataKey(std::uint32_tindex)constoverride; StringViewgetMetaDataValue(constchar*key)constoverride; TranslationUnitgetTranslationUnit()constoverride; RotationUnitgetRotationUnit()constoverride; CoordinateSystemgetCoordinateSystem()constoverride; std::uint16_tgetLODCount()constoverride; std::uint16_tgetDBMaxLOD()constoverride; StringViewgetDBComplexity()constoverride; StringViewgetDBName()constoverride; //DefinitionReadermethodsstart std::uint16_tgetGUIControlCount()constoverride; StringViewgetGUIControlName(std::uint16_tindex)constoverride; std::uint16_tgetRawControlCount()constoverride; StringViewgetRawControlName(std::uint16_tindex)constoverride; std::uint16_tgetJointCount()constoverride; StringViewgetJointName(std::uint16_tindex)constoverride; std::uint16_tgetJointIndexListCount()constoverride; ConstArrayView<std::uint16_t>getJointIndicesForLOD(std::uint16_tlod)constoverride; std::uint16_tgetJointParentIndex(std::uint16_tindex)constoverride; std::uint16_tgetBlendShapeChannelCount()constoverride; StringViewgetBlendShapeChannelName(std::uint16_tindex)constoverride; std::uint16_tgetBlendShapeChannelIndexListCount()constoverride; ConstArrayView<std::uint16_t>getBlendShapeChannelIndicesForLOD(std::uint16_tlod)constoverride; std::uint16_tgetAnimatedMapCount()constoverride; StringViewgetAnimatedMapName(std::uint16_tindex)constoverride; std::uint16_tgetAnimatedMapIndexListCount()constoverride; ConstArrayView<std::uint16_t>getAnimatedMapIndicesForLOD(std::uint16_tlod)constoverride; std::uint16_tgetMeshCount()constoverride; StringViewgetMeshName(std::uint16_tindex)constoverride; std::uint16_tgetMeshIndexListCount()constoverride; ConstArrayView<std::uint16_t>getMeshIndicesForLOD(std::uint16_tlod)constoverride; std::uint16_tgetMeshBlendShapeChannelMappingCount()constoverride; MeshBlendShapeChannelMappinggetMeshBlendShapeChannelMapping(std::uint16_tindex)constoverride; ConstArrayView<std::uint16_t>getMeshBlendShapeChannelMappingIndicesForLOD(std::uint16_tlod)constoverride; Vector3getNeutralJointTranslation(std::uint16_tindex)constoverride; ConstArrayView<float>getNeutralJointTranslationXs()constoverride; ConstArrayView<float>getNeutralJointTranslationYs()constoverride; ConstArrayView<float>getNeutralJointTranslationZs()constoverride; Vector3getNeutralJointRotation(std::uint16_tindex)constoverride; ConstArrayView<float>getNeutralJointRotationXs()constoverride; ConstArrayView<float>getNeutralJointRotationYs()constoverride; ConstArrayView<float>getNeutralJointRotationZs()constoverride; //BehaviorReadermethodsstart ConstArrayView<std::uint16_t>getGUIToRawInputIndices()constoverride; ConstArrayView<std::uint16_t>getGUIToRawOutputIndices()constoverride; ConstArrayView<float>getGUIToRawFromValues()constoverride; ConstArrayView<float>getGUIToRawToValues()constoverride; ConstArrayView<float>getGUIToRawSlopeValues()constoverride; ConstArrayView<float>getGUIToRawCutValues()constoverride; std::uint16_tgetPSDCount()constoverride; ConstArrayView<std::uint16_t>getPSDRowIndices()constoverride; ConstArrayView<std::uint16_t>getPSDColumnIndices()constoverride; ConstArrayView<float>getPSDValues()constoverride; std::uint16_tgetJointRowCount()constoverride; std::uint16_tgetJointColumnCount()constoverride; ConstArrayView<std::uint16_t>getJointVariableAttributeIndices(std::uint16_tlod)constoverride; std::uint16_tgetJointGroupCount()constoverride; ConstArrayView<std::uint16_t>getJointGroupLODs(std::uint16_tjointGroupIndex)constoverride; ConstArrayView<std::uint16_t>getJointGroupInputIndices(std::uint16_tjointGroupIndex)constoverride; ConstArrayView<std::uint16_t>getJointGroupOutputIndices(std::uint16_tjointGroupIndex)constoverride; ConstArrayView<float>getJointGroupValues(std::uint16_tjointGroupIndex)constoverride; ConstArrayView<std::uint16_t>getJointGroupJointIndices(std::uint16_tjointGroupIndex)constoverride; ConstArrayView<std::uint16_t>getBlendShapeChannelLODs()constoverride; ConstArrayView<std::uint16_t>getBlendShapeChannelOutputIndices()constoverride; ConstArrayView<std::uint16_t>getBlendShapeChannelInputIndices()constoverride; ConstArrayView<std::uint16_t>getAnimatedMapLODs()constoverride; ConstArrayView<std::uint16_t>getAnimatedMapInputIndices()constoverride; ConstArrayView<std::uint16_t>getAnimatedMapOutputIndices()constoverride; ConstArrayView<float>getAnimatedMapFromValues()constoverride; ConstArrayView<float>getAnimatedMapToValues()constoverride; ConstArrayView<float>getAnimatedMapSlopeValues()constoverride; ConstArrayView<float>getAnimatedMapCutValues()constoverride; //GeometryReadermethodsstart std::uint32_tgetVertexPositionCount(std::uint16_tmeshIndex)constoverride; PositiongetVertexPosition(std::uint16_tmeshIndex,std::uint32_tvertexIndex)constoverride; ConstArrayView<float>getVertexPositionXs(std::uint16_tmeshIndex)constoverride; ConstArrayView<float>getVertexPositionYs(std::uint16_tmeshIndex)constoverride; ConstArrayView<float>getVertexPositionZs(std::uint16_tmeshIndex)constoverride; std::uint32_tgetVertexTextureCoordinateCount(std::uint16_tmeshIndex)constoverride; TextureCoordinategetVertexTextureCoordinate(std::uint16_tmeshIndex, std::uint32_ttextureCoordinateIndex)constoverride; ConstArrayView<float>getVertexTextureCoordinateUs(std::uint16_tmeshIndex)constoverride; ConstArrayView<float>getVertexTextureCoordinateVs(std::uint16_tmeshIndex)constoverride; std::uint32_tgetVertexNormalCount(std::uint16_tmeshIndex)constoverride; NormalgetVertexNormal(std::uint16_tmeshIndex,std::uint32_tnormalIndex)constoverride; ConstArrayView<float>getVertexNormalXs(std::uint16_tmeshIndex)constoverride; ConstArrayView<float>getVertexNormalYs(std::uint16_tmeshIndex)constoverride; ConstArrayView<float>getVertexNormalZs(std::uint16_tmeshIndex)constoverride; std::uint32_tgetFaceCount(std::uint16_tmeshIndex)constoverride; ConstArrayView<std::uint32_t>getFaceVertexLayoutIndices(std::uint16_tmeshIndex,std::uint32_tfaceIndex)constoverride; std::uint32_tgetVertexLayoutCount(std::uint16_tmeshIndex)constoverride; VertexLayoutgetVertexLayout(std::uint16_tmeshIndex,std::uint32_tlayoutIndex)constoverride; ConstArrayView<std::uint32_t>getVertexLayoutPositionIndices(std::uint16_tmeshIndex)constoverride; ConstArrayView<std::uint32_t>getVertexLayoutTextureCoordinateIndices(std::uint16_tmeshIndex)constoverride; ConstArrayView<std::uint32_t>getVertexLayoutNormalIndices(std::uint16_tmeshIndex)constoverride; std::uint16_tgetMaximumInfluencePerVertex(std::uint16_tmeshIndex)constoverride; std::uint32_tgetSkinWeightsCount(std::uint16_tmeshIndex)constoverride; ConstArrayView<float>getSkinWeightsValues(std::uint16_tmeshIndex,std::uint32_tvertexIndex)constoverride; ConstArrayView<std::uint16_t>getSkinWeightsJointIndices(std::uint16_tmeshIndex, std::uint32_tvertexIndex)constoverride; std::uint16_tgetBlendShapeTargetCount(std::uint16_tmeshIndex)constoverride; std::uint16_tgetBlendShapeChannelIndex(std::uint16_tmeshIndex,std::uint16_tblendShapeTargetIndex)constoverride; std::uint32_tgetBlendShapeTargetDeltaCount(std::uint16_tmeshIndex,std::uint16_tblendShapeTargetIndex)constoverride; DeltagetBlendShapeTargetDelta(std::uint16_tmeshIndex,std::uint16_tblendShapeTargetIndex, std::uint32_tdeltaIndex)constoverride; ConstArrayView<float>getBlendShapeTargetDeltaXs(std::uint16_tmeshIndex, std::uint16_tblendShapeTargetIndex)constoverride; ConstArrayView<float>getBlendShapeTargetDeltaYs(std::uint16_tmeshIndex, std::uint16_tblendShapeTargetIndex)constoverride; ConstArrayView<float>getBlendShapeTargetDeltaZs(std::uint16_tmeshIndex, std::uint16_tblendShapeTargetIndex)constoverride; ConstArrayView<std::uint32_t>getBlendShapeTargetVertexIndices(std::uint16_tmeshIndex, std::uint16_tblendShapeTargetIndex)constoverride; protected: mutableDenormalizedData<TReaderBase>cache; }; #ifdef_MSC_VER #pragmawarning(push) #pragmawarning(disable:4589) #endif template<classTReaderBase> inlineReaderImpl<TReaderBase>::ReaderImpl(MemoryResource*memRes_):BaseImpl{memRes_},cache{memRes_}{ } #ifdef_MSC_VER #pragmawarning(pop) #endif #ifdef_MSC_VER #pragmawarning(push) #pragmawarning(disable:4505) #endif template<classTReaderBase> inlineStringViewReaderImpl<TReaderBase>::getName()const{ return{dna.descriptor.name.data(),dna.descriptor.name.size()}; } template<classTReaderBase> inlineArchetypeReaderImpl<TReaderBase>::getArchetype()const{ returnstatic_cast<Archetype>(dna.descriptor.archetype); } template<classTReaderBase> inlineGenderReaderImpl<TReaderBase>::getGender()const{ returnstatic_cast<Gender>(dna.descriptor.gender); } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getAge()const{ returndna.descriptor.age; } template<classTReaderBase> inlinestd::uint32_tReaderImpl<TReaderBase>::getMetaDataCount()const{ returnstatic_cast<std::uint32_t>(dna.descriptor.metadata.size()); } template<classTReaderBase> inlineStringViewReaderImpl<TReaderBase>::getMetaDataKey(std::uint32_tindex)const{ if(index<dna.descriptor.metadata.size()){ constauto&key=std::get<0>(dna.descriptor.metadata[index]); return{key.data(),key.size()}; } return{}; } template<classTReaderBase> inlineStringViewReaderImpl<TReaderBase>::getMetaDataValue(constchar*key)const{ for(constauto&data:dna.descriptor.metadata){ if(std::get<0>(data)==key){ constauto&value=std::get<1>(data); return{value.data(),value.size()}; } } return{}; } template<classTReaderBase> inlineTranslationUnitReaderImpl<TReaderBase>::getTranslationUnit()const{ returnstatic_cast<TranslationUnit>(dna.descriptor.translationUnit); } template<classTReaderBase> inlineRotationUnitReaderImpl<TReaderBase>::getRotationUnit()const{ returnstatic_cast<RotationUnit>(dna.descriptor.rotationUnit); } template<classTReaderBase> inlineCoordinateSystemReaderImpl<TReaderBase>::getCoordinateSystem()const{ return{ static_cast<Direction>(dna.descriptor.coordinateSystem.xAxis), static_cast<Direction>(dna.descriptor.coordinateSystem.yAxis), static_cast<Direction>(dna.descriptor.coordinateSystem.zAxis) }; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getLODCount()const{ returndna.descriptor.lodCount; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getDBMaxLOD()const{ returndna.descriptor.maxLOD; } template<classTReaderBase> inlineStringViewReaderImpl<TReaderBase>::getDBComplexity()const{ return{dna.descriptor.complexity.data(),dna.descriptor.complexity.size()}; } template<classTReaderBase> inlineStringViewReaderImpl<TReaderBase>::getDBName()const{ return{dna.descriptor.dbName.data(),dna.descriptor.dbName.size()}; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getGUIControlCount()const{ returnstatic_cast<std::uint16_t>(dna.definition.guiControlNames.size()); } template<classTReaderBase> inlineStringViewReaderImpl<TReaderBase>::getGUIControlName(std::uint16_tindex)const{ if(index<dna.definition.guiControlNames.size()){ constauto&guiControlName=dna.definition.guiControlNames[index]; return{guiControlName.data(),guiControlName.size()}; } return{}; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getRawControlCount()const{ returnstatic_cast<std::uint16_t>(dna.definition.rawControlNames.size()); } template<classTReaderBase> inlineStringViewReaderImpl<TReaderBase>::getRawControlName(std::uint16_tindex)const{ if(index<dna.definition.rawControlNames.size()){ constauto&rawControlName=dna.definition.rawControlNames[index]; return{rawControlName.data(),rawControlName.size()}; } return{}; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getJointCount()const{ returnstatic_cast<std::uint16_t>(dna.definition.jointNames.size()); } template<classTReaderBase> inlineStringViewReaderImpl<TReaderBase>::getJointName(std::uint16_tindex)const{ if(index<dna.definition.jointNames.size()){ constauto&jointName=dna.definition.jointNames[index]; return{jointName.data(),jointName.size()}; } return{}; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getJointIndexListCount()const{ returndna.definition.lodJointMapping.getIndexListCount(); } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getJointIndicesForLOD(std::uint16_tlod)const{ returndna.definition.lodJointMapping.getIndices(lod); } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getJointParentIndex(std::uint16_tindex)const{ if(index<dna.definition.jointHierarchy.size()){ returndna.definition.jointHierarchy[index]; } returnstd::numeric_limits<std::uint16_t>::max(); } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getBlendShapeChannelCount()const{ returnstatic_cast<std::uint16_t>(dna.definition.blendShapeChannelNames.size()); } template<classTReaderBase> inlineStringViewReaderImpl<TReaderBase>::getBlendShapeChannelName(std::uint16_tindex)const{ if(index<dna.definition.blendShapeChannelNames.size()){ constauto&blendShapeName=dna.definition.blendShapeChannelNames[index]; return{blendShapeName.data(),blendShapeName.size()}; } return{}; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getBlendShapeChannelIndexListCount()const{ returndna.definition.lodBlendShapeMapping.getIndexListCount(); } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getBlendShapeChannelIndicesForLOD(std::uint16_tlod)const{ returndna.definition.lodBlendShapeMapping.getIndices(lod); } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getAnimatedMapCount()const{ returnstatic_cast<std::uint16_t>(dna.definition.animatedMapNames.size()); } template<classTReaderBase> inlineStringViewReaderImpl<TReaderBase>::getAnimatedMapName(std::uint16_tindex)const{ if(index<dna.definition.animatedMapNames.size()){ constauto&animatedMapName=dna.definition.animatedMapNames[index]; return{animatedMapName.data(),animatedMapName.size()}; } return{}; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getAnimatedMapIndexListCount()const{ returndna.definition.lodAnimatedMapMapping.getIndexListCount(); } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getAnimatedMapIndicesForLOD(std::uint16_tlod)const{ returndna.definition.lodAnimatedMapMapping.getIndices(lod); } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getMeshCount()const{ returnstatic_cast<std::uint16_t>(dna.definition.meshNames.size()); } template<classTReaderBase> inlineStringViewReaderImpl<TReaderBase>::getMeshName(std::uint16_tindex)const{ if(index<dna.definition.meshNames.size()){ constauto&meshName=dna.definition.meshNames[index]; return{meshName.data(),meshName.size()}; } return{}; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getMeshIndexListCount()const{ returndna.definition.lodMeshMapping.getIndexListCount(); } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getMeshIndicesForLOD(std::uint16_tlod)const{ returndna.definition.lodMeshMapping.getIndices(lod); } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getMeshBlendShapeChannelMappingCount()const{ returnstatic_cast<std::uint16_t>(dna.definition.meshBlendShapeChannelMapping.size()); } template<classTReaderBase> inlineMeshBlendShapeChannelMappingReaderImpl<TReaderBase>::getMeshBlendShapeChannelMapping(std::uint16_tindex)const{ constautomapping=dna.definition.meshBlendShapeChannelMapping.get(index); return{mapping.from,mapping.to}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getMeshBlendShapeChannelMappingIndicesForLOD(std::uint16_tlod) const{ if(cache.meshBlendShapeMappingIndices.getLODCount()==static_cast<std::uint16_t>(0)){ cache.populate(this); } returncache.meshBlendShapeMappingIndices.getIndices(lod); } template<classTReaderBase> inlineVector3ReaderImpl<TReaderBase>::getNeutralJointTranslation(std::uint16_tindex)const{ constauto&translations=dna.definition.neutralJointTranslations; if(index<translations.xs.size()){ return{translations.xs[index],translations.ys[index],translations.zs[index]}; } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getNeutralJointTranslationXs()const{ constauto&xs=dna.definition.neutralJointTranslations.xs; return{xs.data(),xs.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getNeutralJointTranslationYs()const{ constauto&ys=dna.definition.neutralJointTranslations.ys; return{ys.data(),ys.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getNeutralJointTranslationZs()const{ constauto&zs=dna.definition.neutralJointTranslations.zs; return{zs.data(),zs.size()}; } template<classTReaderBase> inlineVector3ReaderImpl<TReaderBase>::getNeutralJointRotation(std::uint16_tindex)const{ constauto&rotations=dna.definition.neutralJointRotations; if(index<rotations.size()){ return{rotations.xs[index],rotations.ys[index],rotations.zs[index]}; } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getNeutralJointRotationXs()const{ constauto&xs=dna.definition.neutralJointRotations.xs; return{xs.data(),xs.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getNeutralJointRotationYs()const{ constauto&ys=dna.definition.neutralJointRotations.ys; return{ys.data(),ys.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getNeutralJointRotationZs()const{ constauto&zs=dna.definition.neutralJointRotations.zs; return{zs.data(),zs.size()}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getGUIToRawInputIndices()const{ constauto&inputIndices=dna.behavior.controls.conditionals.inputIndices; return{inputIndices.data(),inputIndices.size()}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getGUIToRawOutputIndices()const{ constauto&outputIndices=dna.behavior.controls.conditionals.outputIndices; return{outputIndices.data(),outputIndices.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getGUIToRawFromValues()const{ constauto&fromValues=dna.behavior.controls.conditionals.fromValues; return{fromValues.data(),fromValues.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getGUIToRawToValues()const{ constauto&toValues=dna.behavior.controls.conditionals.toValues; return{toValues.data(),toValues.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getGUIToRawSlopeValues()const{ constauto&slopeValues=dna.behavior.controls.conditionals.slopeValues; return{slopeValues.data(),slopeValues.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getGUIToRawCutValues()const{ constauto&cutValues=dna.behavior.controls.conditionals.cutValues; return{cutValues.data(),cutValues.size()}; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getPSDCount()const{ returndna.behavior.controls.psdCount; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getPSDRowIndices()const{ constauto&rows=dna.behavior.controls.psds.rows; return{rows.data(),rows.size()}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getPSDColumnIndices()const{ constauto&columns=dna.behavior.controls.psds.columns; return{columns.data(),columns.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getPSDValues()const{ constauto&values=dna.behavior.controls.psds.values; return{values.data(),values.size()}; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getJointRowCount()const{ returndna.behavior.joints.rowCount; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getJointColumnCount()const{ returndna.behavior.joints.colCount; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getJointVariableAttributeIndices(std::uint16_tlod)const{ if(cache.jointVariableAttributeIndices.getLODCount()==static_cast<std::uint16_t>(0)){ cache.populate(this); } returncache.jointVariableAttributeIndices.getIndices(lod); } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getJointGroupCount()const{ returnstatic_cast<std::uint16_t>(dna.behavior.joints.jointGroups.size()); } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getJointGroupLODs(std::uint16_tjointGroupIndex)const{ if(jointGroupIndex<dna.behavior.joints.jointGroups.size()){ constauto&lods=dna.behavior.joints.jointGroups[jointGroupIndex].lods; return{lods.data(),lods.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getJointGroupInputIndices(std::uint16_tjointGroupIndex)const{ if(jointGroupIndex<dna.behavior.joints.jointGroups.size()){ constauto&inputIndices=dna.behavior.joints.jointGroups[jointGroupIndex].inputIndices; return{inputIndices.data(),inputIndices.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getJointGroupOutputIndices(std::uint16_tjointGroupIndex)const{ if(jointGroupIndex<dna.behavior.joints.jointGroups.size()){ constauto&outputIndices=dna.behavior.joints.jointGroups[jointGroupIndex].outputIndices; return{outputIndices.data(),outputIndices.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getJointGroupValues(std::uint16_tjointGroupIndex)const{ if(jointGroupIndex<dna.behavior.joints.jointGroups.size()){ constauto&values=dna.behavior.joints.jointGroups[jointGroupIndex].values; return{values.data(),values.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getJointGroupJointIndices(std::uint16_tjointGroupIndex)const{ if(jointGroupIndex<dna.behavior.joints.jointGroups.size()){ constauto&jointIndices=dna.behavior.joints.jointGroups[jointGroupIndex].jointIndices; return{jointIndices.data(),jointIndices.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getBlendShapeChannelLODs()const{ constauto&lods=dna.behavior.blendShapeChannels.lods; return{lods.data(),lods.size()}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getBlendShapeChannelInputIndices()const{ constauto&inputIndices=dna.behavior.blendShapeChannels.inputIndices; return{inputIndices.data(),inputIndices.size()}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getBlendShapeChannelOutputIndices()const{ constauto&outputIndices=dna.behavior.blendShapeChannels.outputIndices; return{outputIndices.data(),outputIndices.size()}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getAnimatedMapLODs()const{ constauto&lods=dna.behavior.animatedMaps.lods; return{lods.data(),lods.size()}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getAnimatedMapInputIndices()const{ constauto&inputIndices=dna.behavior.animatedMaps.conditionals.inputIndices; return{inputIndices.data(),inputIndices.size()}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getAnimatedMapOutputIndices()const{ constauto&outputIndices=dna.behavior.animatedMaps.conditionals.outputIndices; return{outputIndices.data(),outputIndices.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getAnimatedMapFromValues()const{ constauto&fromValues=dna.behavior.animatedMaps.conditionals.fromValues; return{fromValues.data(),fromValues.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getAnimatedMapToValues()const{ constauto&toValues=dna.behavior.animatedMaps.conditionals.toValues; return{toValues.data(),toValues.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getAnimatedMapSlopeValues()const{ constauto&slopeValues=dna.behavior.animatedMaps.conditionals.slopeValues; return{slopeValues.data(),slopeValues.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getAnimatedMapCutValues()const{ constauto&cutValues=dna.behavior.animatedMaps.conditionals.cutValues; return{cutValues.data(),cutValues.size()}; } template<classTReaderBase> inlinestd::uint32_tReaderImpl<TReaderBase>::getVertexPositionCount(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ returnstatic_cast<std::uint32_t>(dna.geometry.meshes[meshIndex].positions.xs.size()); } return0u; } template<classTReaderBase> inlinePositionReaderImpl<TReaderBase>::getVertexPosition(std::uint16_tmeshIndex,std::uint32_tvertexIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&positions=dna.geometry.meshes[meshIndex].positions; if(vertexIndex<positions.size()){ return{positions.xs[vertexIndex],positions.ys[vertexIndex],positions.zs[vertexIndex]}; } } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getVertexPositionXs(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&xPositions=dna.geometry.meshes[meshIndex].positions.xs; return{xPositions.data(),xPositions.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getVertexPositionYs(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&yPositions=dna.geometry.meshes[meshIndex].positions.ys; return{yPositions.data(),yPositions.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getVertexPositionZs(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&zPositions=dna.geometry.meshes[meshIndex].positions.zs; return{zPositions.data(),zPositions.size()}; } return{}; } template<classTReaderBase> inlinestd::uint32_tReaderImpl<TReaderBase>::getVertexTextureCoordinateCount(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ returnstatic_cast<std::uint32_t>(dna.geometry.meshes[meshIndex].textureCoordinates.us.size()); } return0u; } template<classTReaderBase> inlineTextureCoordinateReaderImpl<TReaderBase>::getVertexTextureCoordinate(std::uint16_tmeshIndex, std::uint32_ttextureCoordinateIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&textureCoordinates=dna.geometry.meshes[meshIndex].textureCoordinates; if(textureCoordinateIndex<textureCoordinates.size()){ return{textureCoordinates.us[textureCoordinateIndex],textureCoordinates.vs[textureCoordinateIndex]}; } } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getVertexTextureCoordinateUs(std::uint16_tmeshIndex)const{ constauto&uTextureCoordinates=dna.geometry.meshes[meshIndex].textureCoordinates.us; return{uTextureCoordinates.data(),uTextureCoordinates.size()}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getVertexTextureCoordinateVs(std::uint16_tmeshIndex)const{ constauto&vTextureCoordinates=dna.geometry.meshes[meshIndex].textureCoordinates.vs; return{vTextureCoordinates.data(),vTextureCoordinates.size()}; } template<classTReaderBase> inlinestd::uint32_tReaderImpl<TReaderBase>::getVertexNormalCount(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ returnstatic_cast<std::uint32_t>(dna.geometry.meshes[meshIndex].normals.xs.size()); } return0u; } template<classTReaderBase> inlineNormalReaderImpl<TReaderBase>::getVertexNormal(std::uint16_tmeshIndex,std::uint32_tnormalIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&normals=dna.geometry.meshes[meshIndex].normals; if(normalIndex<normals.size()){ return{normals.xs[normalIndex],normals.ys[normalIndex],normals.zs[normalIndex]}; } } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getVertexNormalXs(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&xNormals=dna.geometry.meshes[meshIndex].normals.xs; return{xNormals.data(),xNormals.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getVertexNormalYs(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&yNormals=dna.geometry.meshes[meshIndex].normals.ys; return{yNormals.data(),yNormals.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getVertexNormalZs(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&zNormals=dna.geometry.meshes[meshIndex].normals.zs; return{zNormals.data(),zNormals.size()}; } return{}; } template<classTReaderBase> inlinestd::uint32_tReaderImpl<TReaderBase>::getFaceCount(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ returnstatic_cast<std::uint32_t>(dna.geometry.meshes[meshIndex].faces.size()); } return0u; } template<classTReaderBase> inlineConstArrayView<std::uint32_t>ReaderImpl<TReaderBase>::getFaceVertexLayoutIndices(std::uint16_tmeshIndex, std::uint32_tfaceIndex)const{ constauto&meshes=dna.geometry.meshes; if((meshIndex<meshes.size())&&(faceIndex<meshes[meshIndex].faces.size())){ constauto&layoutIndices=meshes[meshIndex].faces[faceIndex].layoutIndices; return{layoutIndices.data(),layoutIndices.size()}; } return{}; } template<classTReaderBase> inlinestd::uint32_tReaderImpl<TReaderBase>::getVertexLayoutCount(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ returnstatic_cast<std::uint32_t>(dna.geometry.meshes[meshIndex].layouts.positions.size()); } return0u; } template<classTReaderBase> inlineVertexLayoutReaderImpl<TReaderBase>::getVertexLayout(std::uint16_tmeshIndex,std::uint32_tlayoutIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&layouts=dna.geometry.meshes[meshIndex].layouts; if(layoutIndex<layouts.size()){ return{layouts.positions[layoutIndex],layouts.textureCoordinates[layoutIndex],layouts.normals[layoutIndex]}; } } return{}; } template<classTReaderBase> inlineConstArrayView<std::uint32_t>ReaderImpl<TReaderBase>::getVertexLayoutPositionIndices(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&positions=dna.geometry.meshes[meshIndex].layouts.positions; return{positions.data(),positions.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<std::uint32_t>ReaderImpl<TReaderBase>::getVertexLayoutTextureCoordinateIndices(std::uint16_tmeshIndex) const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&textureCoordinated=dna.geometry.meshes[meshIndex].layouts.textureCoordinates; return{textureCoordinated.data(),textureCoordinated.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<std::uint32_t>ReaderImpl<TReaderBase>::getVertexLayoutNormalIndices(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ constauto&normals=dna.geometry.meshes[meshIndex].layouts.normals; return{normals.data(),normals.size()}; } return{}; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getMaximumInfluencePerVertex(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ returndna.geometry.meshes[meshIndex].maximumInfluencePerVertex; } return{}; } template<classTReaderBase> inlinestd::uint32_tReaderImpl<TReaderBase>::getSkinWeightsCount(std::uint16_tmeshIndex)const{ constauto&meshes=dna.geometry.meshes; if(meshIndex<meshes.size()){ returnstatic_cast<std::uint32_t>(meshes[meshIndex].skinWeights.size()); } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getSkinWeightsValues(std::uint16_tmeshIndex, std::uint32_tvertexIndex)const{ constauto&meshes=dna.geometry.meshes; if((meshIndex<meshes.size())&&(vertexIndex<meshes[meshIndex].skinWeights.size())){ constauto&weights=meshes[meshIndex].skinWeights[vertexIndex].weights; return{weights.data(),weights.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<std::uint16_t>ReaderImpl<TReaderBase>::getSkinWeightsJointIndices(std::uint16_tmeshIndex, std::uint32_tvertexIndex)const{ constauto&meshes=dna.geometry.meshes; if((meshIndex<meshes.size())&&(vertexIndex<meshes[meshIndex].skinWeights.size())){ constauto&jointIndices=meshes[meshIndex].skinWeights[vertexIndex].jointIndices; return{jointIndices.data(),jointIndices.size()}; } return{}; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getBlendShapeTargetCount(std::uint16_tmeshIndex)const{ if(meshIndex<dna.geometry.meshes.size()){ returnstatic_cast<std::uint16_t>(dna.geometry.meshes[meshIndex].blendShapeTargets.size()); } return{}; } template<classTReaderBase> inlinestd::uint16_tReaderImpl<TReaderBase>::getBlendShapeChannelIndex(std::uint16_tmeshIndex, std::uint16_tblendShapeTargetIndex)const{ constauto&meshes=dna.geometry.meshes; if((meshIndex<meshes.size())&&(blendShapeTargetIndex<meshes[meshIndex].blendShapeTargets.size())){ returnmeshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].blendShapeChannelIndex; } return{}; } template<classTReaderBase> inlinestd::uint32_tReaderImpl<TReaderBase>::getBlendShapeTargetDeltaCount(std::uint16_tmeshIndex, std::uint16_tblendShapeTargetIndex)const{ constauto&meshes=dna.geometry.meshes; if((meshIndex<meshes.size())&&(blendShapeTargetIndex<meshes[meshIndex].blendShapeTargets.size())){ returnstatic_cast<std::uint32_t>(meshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].deltas.xs.size()); } return{}; } template<classTReaderBase> inlineDeltaReaderImpl<TReaderBase>::getBlendShapeTargetDelta(std::uint16_tmeshIndex, std::uint16_tblendShapeTargetIndex, std::uint32_tdeltaIndex)const{ constauto&meshes=dna.geometry.meshes; if((meshIndex<meshes.size())&&(blendShapeTargetIndex<meshes[meshIndex].blendShapeTargets.size())&& (deltaIndex<meshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].deltas.size())){ constauto&deltas=meshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].deltas; return{deltas.xs[deltaIndex],deltas.ys[deltaIndex],deltas.zs[deltaIndex]}; } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getBlendShapeTargetDeltaXs(std::uint16_tmeshIndex, std::uint16_tblendShapeTargetIndex)const{ constauto&meshes=dna.geometry.meshes; if((meshIndex<meshes.size())&&(blendShapeTargetIndex<meshes[meshIndex].blendShapeTargets.size())){ constauto&xDeltas=meshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].deltas.xs; return{xDeltas.data(),xDeltas.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getBlendShapeTargetDeltaYs(std::uint16_tmeshIndex, std::uint16_tblendShapeTargetIndex)const{ constauto&meshes=dna.geometry.meshes; if((meshIndex<meshes.size())&&(blendShapeTargetIndex<meshes[meshIndex].blendShapeTargets.size())){ constauto&yDeltas=meshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].deltas.ys; return{yDeltas.data(),yDeltas.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<float>ReaderImpl<TReaderBase>::getBlendShapeTargetDeltaZs(std::uint16_tmeshIndex, std::uint16_tblendShapeTargetIndex)const{ constauto&meshes=dna.geometry.meshes; if((meshIndex<meshes.size())&&(blendShapeTargetIndex<meshes[meshIndex].blendShapeTargets.size())){ constauto&zDeltas=meshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].deltas.zs; return{zDeltas.data(),zDeltas.size()}; } return{}; } template<classTReaderBase> inlineConstArrayView<std::uint32_t>ReaderImpl<TReaderBase>::getBlendShapeTargetVertexIndices(std::uint16_tmeshIndex, std::uint16_tblendShapeTargetIndex) const{ constauto&meshes=dna.geometry.meshes; if((meshIndex<meshes.size())&&(blendShapeTargetIndex<meshes[meshIndex].blendShapeTargets.size())){ constauto&vertexIndices=meshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].vertexIndices; return{vertexIndices.data(),vertexIndices.size()}; } return{}; } #ifdef_MSC_VER #pragmawarning(pop) #endif }//namespacedna