6.3. The animation cascade

This section discusses how the CPopApp:animateAllDocs(dt) cascades its calls down to the simulation objects of each open document.

Sequence diagram of the animation

In this subsection we’ll give a description of the animation process and then we’ll draw a UML sequence diagram of it.

First let’s write out in words a description of how the animation process works.

  • The CPopApp::OnIdle function makes a call to the CPopApp:animateAllDocs(dt).

  • The cPerformanceTimer tick() method returns the time dt elapsed since the prior update.

  • CPopApp:animateAllDocs(dt) steps through the list of open CPopDoc documents and for each of these documents calls a CPopDoc::stepDoc(dt) function.

  • Firstly, CPopDoc::stepDoc(dt) calls the cGame::step(dt) ...

Get Software Engineering and Computer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.