Skip to content

Commit 36a7f17

Browse files
committed
Regenerate HTML.
1 parent 3c06577 commit 36a7f17

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

html/dirty-flag.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ <h3><a href="#cached-world-transforms" name="cached-world-transforms">Cached wor
120120
<p>The obvious answer is to <em>cache</em> it. In each object, we store its local
121121
transform and its derived world transform. When we render, we only use the
122122
precalculated world transform. If the object never moves, the cached transform
123-
is always up-to-date and everything&#8217;s happy.</p>
123+
is always up to date and everything&#8217;s happy.</p>
124124
<p>When an object <em>does</em> move, the simple approach is to refresh its world
125125
transform right then. But don&#8217;t forget the hierarchy! When a parent moves, we
126126
have to recalculate its world transform <em>and all of its children&#8217;s,
@@ -413,7 +413,7 @@ <h3><a href="#an-unoptimized-traversal" name="an-unoptimized-traversal">An unopt
413413
walking <em>down</em> the chain.</p>
414414
<p>We calculate the node&#8217;s world transform and store it in <code>world</code>, then we render
415415
the mesh, if we have one. Finally, we recurse into the child nodes, passing in
416-
<em>this</em> node&#8217;s world transform. All in all, it&#8217;s nice, tight, simple recursive
416+
<em>this</em> node&#8217;s world transform. All in all, it&#8217;s a tight, simple recursive
417417
method.</p>
418418
<p>To draw an entire scene graph, we kick off the process at the root node:</p>
419419
<div class="codehilite"><pre><span class="n">graph_</span><span class="o">-&gt;</span><span class="n">render</span><span class="p">(</span><span class="n">Transform</span><span class="o">::</span><span class="n">origin</span><span class="p">());</span>
@@ -446,7 +446,7 @@ <h3><a href="#let's-get-dirty" name="let's-get-dirty">Let&#8217;s get dirty</a><
446446

447447
<p>The <code>world_</code> field caches the previously calculated world transform, and
448448
<code>dirty_</code>, of course, is the dirty flag. Note that the flag starts out <code>true</code>.
449-
When we create a new node, we haven&#8217;t calculated it&#8217;s world transform yet. At
449+
When we create a new node, we haven&#8217;t calculated its world transform yet. At
450450
birth, it&#8217;s already out of sync with the local transform.</p>
451451
<p>The only reason we need this pattern is because objects can <em>move</em>, so let&#8217;s add
452452
support for that:</p>
@@ -507,7 +507,7 @@ <h3><a href="#let's-get-dirty" name="let's-get-dirty">Let&#8217;s get dirty</a><
507507
be <code>true</code> if any node above this node in the parent chain was dirty. In much the
508508
same way that <code>parentWorld</code> updates the world transform incrementally as we
509509
traverse down the hierarchy, <code>dirty</code> tracks the dirtiness of the parent chain.</p>
510-
<p>This lets us avoid having to recursively set each child&#8217;s <code>dirty_</code> flag
510+
<p>This lets us avoid having to recursively mark each child&#8217;s <code>dirty_</code> flag
511511
in <code>setTransform()</code>. Instead, we pass the parent&#8217;s dirty flag down to its
512512
children when we render and look at that too to see if we need to recalculate
513513
the world transform.</p>
@@ -543,10 +543,10 @@ <h3><a href="#when-is-the-dirty-flag-cleaned" name="when-is-the-dirty-flag-clean
543543
</li>
544544
<li>
545545
<p><strong>At well-defined checkpoints:</strong></p>
546-
<p>Sometimes, there is a point in time in the progression of the game where it&#8217;s
546+
<p>Sometimes, there is a point in time or in the progression of the game where it&#8217;s
547547
natural to do the deferred processing. For example,
548548
we may want to save the game only when the pirate sails into port. Or the
549-
sync point may not be part of the game mechanics. We may want to hide the
549+
sync point may not be part of the game mechanics. We may just want to hide the
550550
work behind a loading screen or a cut scene.</p>
551551
<ul>
552552
<li>

0 commit comments

Comments
 (0)