[RESOLVED] computeWorldMatrix(true) - source of its computational cost

Another clarification, calling computeWorldMatrix(true) on NodeN will have the following impact

  • In current frame it will recompute the world matrix on current node and all of its parents, so the complexity is O(d), where d is the depth of NodeN (this aligns with your analysis above)
  • On the next frame, when computeWorldMatrix is called default by the render loop, all the children of NodeN will see that the node is not synchronized with its parent, which will force a recomputation of that node (and thus their children will also not be synchronized with their parent) -. Note that if we hadn’t called computeWorldMatrix(true) on NodeN, then its children would skip the recalculation because theyd be syncronized with parent.

So the complexity of forcing recalculation on NodeN increases by # of ancestors (for current frame) and # of descendants (for next frame)

5 Likes