Skip to content

Commit

Permalink
rebuilding site Thu, Aug 22, 2024 10:48:23 PM
Browse files Browse the repository at this point in the history
  • Loading branch information
erincatto committed Aug 23, 2024
1 parent d15328c commit ea9a8b6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions posts/2024/08/simd-matters/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,6 @@ <h2 id="graph-coloring">Graph coloring</h2>
</span></span></code></pre></div><p>Even though bitsets are fast, it would be better not to redo the graph coloring every time step. So Box2D persists the graph coloring across time steps. When a contact constraint is created the color is determined and the body bits are turned on. When a constraint is removed the corresponding two body bits are cleared.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-c" data-lang="c"><span style="display:flex;"><span><span style="color:#66d9ef">void</span> <span style="color:#a6e22e">b2RemoveContactFromGraph</span>(b2ConstraintGraph<span style="color:#f92672">*</span> graph, b2Contact<span style="color:#f92672">*</span> contact)
</span></span><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">int</span> indexA <span style="color:#f92672">=</span> contact<span style="color:#f92672">-&gt;</span>bodyIndexA;
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">int</span> indexB <span style="color:#f92672">=</span> contact<span style="color:#f92672">-&gt;</span>bodyIndexB;
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span> b2GraphColor<span style="color:#f92672">*</span> color <span style="color:#f92672">=</span> graph<span style="color:#f92672">-&gt;</span>color <span style="color:#f92672">+</span> contact<span style="color:#f92672">-&gt;</span>colorIndex;
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">b2ClearBit</span>(color<span style="color:#f92672">-&gt;</span>bodySet, contact<span style="color:#f92672">-&gt;</span>bodyIndexA);
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">b2ClearBit</span>(color<span style="color:#f92672">-&gt;</span>bodySet, contact<span style="color:#f92672">-&gt;</span>bodyIndexB);
Expand Down Expand Up @@ -257,7 +254,7 @@ <h2 id="update">Update</h2>

<div class="post-info">

<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>1769 words</p>
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>1761 words</p>

<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>2024-08-18 17:00 -0700</p>
</div>
Expand Down

0 comments on commit ea9a8b6

Please sign in to comment.