UpdateMatrixWorld updates this node world transform matrix and of all its children
()
| 828 | |
| 829 | // UpdateMatrixWorld updates this node world transform matrix and of all its children |
| 830 | func (n *Node) UpdateMatrixWorld() { |
| 831 | |
| 832 | n.UpdateMatrix() |
| 833 | if n.parent == nil { |
| 834 | n.matrixWorld = n.matrix |
| 835 | } else { |
| 836 | n.matrixWorld.MultiplyMatrices(&n.parent.GetNode().matrixWorld, &n.matrix) |
| 837 | } |
| 838 | // Update this Node children matrices |
| 839 | for _, ichild := range n.children { |
| 840 | ichild.UpdateMatrixWorld() |
| 841 | } |
| 842 | } |
no test coverage detected