MCPcopy Create free account
hub / github.com/Kitware/VTK / LoadSkin

Method LoadSkin

IO/Geometry/vtkGLTFDocumentLoaderInternals.cxx:1152–1176  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1150
1151//------------------------------------------------------------------------------
1152bool 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//------------------------------------------------------------------------------
1179bool vtkGLTFDocumentLoaderInternals::LoadSparse(

Callers 1

LoadModelMetaDataMethod · 0.95

Calls 4

GetStringValueFunction · 0.70
GetIntValueFunction · 0.70
GetIntArrayFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected