------------------------------------------------------------------------------
| 1624 | |
| 1625 | //------------------------------------------------------------------------------ |
| 1626 | bool 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 | //------------------------------------------------------------------------------ |
| 1664 | void vtkGLTFDocumentLoader::BuildGlobalTransforms( |
no test coverage detected