------------------------------------------------------------------------------
| 1662 | |
| 1663 | //------------------------------------------------------------------------------ |
| 1664 | void vtkGLTFDocumentLoader::BuildGlobalTransforms( |
| 1665 | unsigned int nodeIndex, vtkSmartPointer<vtkMatrix4x4> parentTransform) |
| 1666 | { |
| 1667 | if (nodeIndex >= this->InternalModel->Nodes.size()) |
| 1668 | { |
| 1669 | return; |
| 1670 | } |
| 1671 | Node& node = this->InternalModel->Nodes[nodeIndex]; |
| 1672 | |
| 1673 | node.GlobalTransform = vtkSmartPointer<vtkMatrix4x4>::New(); |
| 1674 | node.GlobalTransform->DeepCopy(node.Transform); |
| 1675 | if (parentTransform != nullptr) |
| 1676 | { |
| 1677 | vtkMatrix4x4::Multiply4x4(parentTransform, node.GlobalTransform, node.GlobalTransform); |
| 1678 | } |
| 1679 | for (auto childId : node.Children) |
| 1680 | { |
| 1681 | this->BuildGlobalTransforms(childId, node.GlobalTransform); |
| 1682 | } |
| 1683 | } |
| 1684 | |
| 1685 | //------------------------------------------------------------------------------ |
| 1686 | void vtkGLTFDocumentLoader::BuildGlobalTransforms() |
no test coverage detected