------------------------------------------------------------------------------
| 1150 | |
| 1151 | //------------------------------------------------------------------------------ |
| 1152 | bool vtkGLTFDocumentLoaderInternals::LoadSkin( |
| 1153 | const nlohmann::json& root, vtkGLTFDocumentLoader::Skin& skin) |
| 1154 | { |
| 1155 | if (root.empty() || !root.is_object()) |
| 1156 | { |
| 1157 | vtkErrorWithObjectMacro(this->Self, "Invalid skin object"); |
| 1158 | return false; |
| 1159 | } |
| 1160 | |
| 1161 | skin.Name = ""; |
| 1162 | vtkGLTFUtils::GetStringValue(root, "name", skin.Name); |
| 1163 | |
| 1164 | skin.Skeleton = -1; |
| 1165 | vtkGLTFUtils::GetIntValue(root, "skeleton", skin.Skeleton); |
| 1166 | |
| 1167 | skin.InverseBindMatricesAccessorId = -1; |
| 1168 | vtkGLTFUtils::GetIntValue(root, "inverseBindMatrices", skin.InverseBindMatricesAccessorId); |
| 1169 | |
| 1170 | if (!vtkGLTFUtils::GetIntArray(root, "joints", skin.Joints)) |
| 1171 | { |
| 1172 | vtkErrorWithObjectMacro(this->Self, "Invalid skin.joints value for skin " << skin.Name); |
| 1173 | return false; |
| 1174 | } |
| 1175 | return true; |
| 1176 | } |
| 1177 | |
| 1178 | //------------------------------------------------------------------------------ |
| 1179 | bool vtkGLTFDocumentLoaderInternals::LoadSparse( |
no test coverage detected