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

Method BuildModelVTKGeometry

IO/Geometry/vtkGLTFDocumentLoader.cxx:1626–1661  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1624
1625//------------------------------------------------------------------------------
1626bool vtkGLTFDocumentLoader::BuildModelVTKGeometry()
1627{
1628 if (this->InternalModel == nullptr)
1629 {
1630 vtkErrorMacro("Error building model data: metadata was not loaded");
1631 return false;
1632 }
1633
1634 // Build poly data
1635 for (Mesh& mesh : this->InternalModel->Meshes)
1636 {
1637 for (Primitive& primitive : mesh.Primitives)
1638 {
1639 if (!this->BuildPolyDataFromPrimitive(primitive))
1640 {
1641 vtkErrorMacro("Error building poly data for primitives");
1642 return false;
1643 }
1644 }
1645 }
1646 // Compute global transforms
1647 for (const auto& scene : this->InternalModel->Scenes)
1648 {
1649 for (unsigned int node : scene.Nodes)
1650 {
1651 this->BuildGlobalTransforms(node, nullptr);
1652 }
1653 }
1654 // Build armatures
1655 for (Skin& skin : this->InternalModel->Skins)
1656 {
1657 this->BuildPolyDataFromSkin(skin);
1658 }
1659
1660 return true;
1661}
1662
1663//------------------------------------------------------------------------------
1664void vtkGLTFDocumentLoader::BuildGlobalTransforms(

Callers 2

RequestDataMethod · 0.80
ImportBeginMethod · 0.80

Calls 3

BuildGlobalTransformsMethod · 0.95
BuildPolyDataFromSkinMethod · 0.95

Tested by

no test coverage detected