<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/261" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2006-03-27T08:05:29+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/261</id>

		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2006-03-27T08:05:29+00:00</updated>

		<published>2006-03-27T08:05:29+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=805#p805</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=805#p805"/>
		<title type="html"><![CDATA[3D Axis Sweep and Prune added to CVS]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=805#p805"><![CDATA[
<blockquote class="uncited"><div>I noticed this code:<br><br><br>Since indices sort the same as positions, couldn't this be optimized as (you mentioned this before):<br><div class="codebox"><p>Code: </p><pre><code>bool AxisSweep3::TestOverlap(const Handle* pHandleA, const Handle* pHandleB){for (int axis = 0; axis &lt; 3; axis++){if (pHandleA-&gt;m_maxEdges[axis] &lt; pHandleB-&gt;m_minEdges[axis] ||pHandleB-&gt;m_maxEdges[axis] &lt; pHandleA-&gt;m_minEdges[axis]){return false;}}return true;}</code></pre></div>I think some of the calling code would have to be re-organized for this to work correctly.<br><br>BTW, this optimization never came up in my SAP because I (redundantly) store the Vector3 min, max in my Handle structure.</div></blockquote>Thanks for the reminder, the version in CVS has your update. The only change in calling code was to pass the current axis index into TestOverlap, so it can be ignored: You only need to check the other two axis, not the current one.<br><br>Thanks,<br>Erwin<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Mon Mar 27, 2006 8:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erin Catto]]></name></author>
		<updated>2006-03-25T07:04:23+00:00</updated>

		<published>2006-03-25T07:04:23+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=799#p799</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=799#p799"/>
		<title type="html"><![CDATA[3D Axis Sweep and Prune added to CVS]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=799#p799"><![CDATA[
I noticed this code:<br><div class="codebox"><p>Code: </p><pre><code>bool AxisSweep3::TestOverlap(const Handle* pHandleA, const Handle* pHandleB){for (int axis = 0; axis &lt; 3; axis++){if (m_pEdges[axis][pHandleA-&gt;m_maxEdges[axis]].m_pos &lt; m_pEdges[axis][pHandleB-&gt;m_minEdges[axis]].m_pos ||m_pEdges[axis][pHandleB-&gt;m_maxEdges[axis]].m_pos &lt; m_pEdges[axis][pHandleA-&gt;m_minEdges[axis]].m_pos){return false;}}return true;}</code></pre></div>Since indices sort the same as positions, couldn't this be optimized as (you mentioned this before):<br><div class="codebox"><p>Code: </p><pre><code>bool AxisSweep3::TestOverlap(const Handle* pHandleA, const Handle* pHandleB){for (int axis = 0; axis &lt; 3; axis++){if (pHandleA-&gt;m_maxEdges[axis] &lt; pHandleB-&gt;m_minEdges[axis] ||pHandleB-&gt;m_maxEdges[axis] &lt; pHandleA-&gt;m_minEdges[axis]){return false;}}return true;}</code></pre></div>I think some of the calling code would have to be re-organized for this to work correctly.<br><br>BTW, this optimization never came up in my SAP because I (redundantly) store the Vector3 min, max in my Handle structure.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12">Erin Catto</a> — Sat Mar 25, 2006 7:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2006-03-18T20:58:47+00:00</updated>

		<published>2006-03-18T20:58:47+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=774#p774</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=774#p774"/>
		<title type="html"><![CDATA[3D Axis Sweep and Prune added to CVS]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=774#p774"><![CDATA[
<blockquote class="uncited"><div>AxisSweep3 looks compact and efficient.<br><br>I'm curious though, why doesn't it use stabbing numbers for fast insertion, removal, and queries?</div></blockquote>There are several solutions for fast insertion and removal, and stabbing numbers is just one. Perhaps it can be added, but I plan to use a method that is better in my opinion:<br><br>1) adding/removing objects in larger batches, and presort this batch in advance<br>2) for single queries and single add/removal: using marker objects<br><br>Add marker objects in the broadphase, and just search for the closest marker object, and insert from there.<br><br>Stabbing numbers are fine too, but the approach easily breaks if there are large objects in the broadphase.<br><br>I can ask the original author of this implementation, but likely it is on the todolist, or not a bottleneck in his applications.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Sat Mar 18, 2006 8:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[omicron]]></name></author>
		<updated>2006-03-18T20:42:52+00:00</updated>

		<published>2006-03-18T20:42:52+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=773#p773</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=773#p773"/>
		<title type="html"><![CDATA[3D Axis Sweep and Prune added to CVS]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=773#p773"><![CDATA[
<blockquote class="uncited"><div>AxisSweep3 looks compact and efficient.<br><br>I'm curious though, why doesn't it use stabbing numbers for fast insertion, removal, and queries?</div></blockquote>Using the stabbing numbers it wouldn't be necessary to add/remove overlapping pairs when sorting the endpoints of each AABB. As it is now overlapping pairs are being added and removed for nothing in cases where one AABB completely passes others.<br><br>So, it should be, sort endpoints normally but just without adding/removing overlapping pairs ( updating stabbing numbers only ), and in the end ( when the AABB is sorted ), stabbing numbers can be used to figure out what overlaps occured due to that AABB update. Am I right ? I already implemented this but didn't test it yet, however, it seems to make sense to me. Correct me if I'm wrong.  <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Bye!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=408">omicron</a> — Sat Mar 18, 2006 8:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erin Catto]]></name></author>
		<updated>2006-03-18T01:01:12+00:00</updated>

		<published>2006-03-18T01:01:12+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=771#p771</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=771#p771"/>
		<title type="html"><![CDATA[3D Axis Sweep and Prune added to CVS]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=771#p771"><![CDATA[
AxisSweep3 looks compact and efficient.<br><br>I'm curious though, why doesn't it use stabbing numbers for fast insertion, removal, and queries?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12">Erin Catto</a> — Sat Mar 18, 2006 1:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2006-03-13T21:19:03+00:00</updated>

		<published>2006-03-13T21:19:03+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=765#p765</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=765#p765"/>
		<title type="html"><![CDATA[3D Axis Sweep and Prune added to CVS]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=765#p765"><![CDATA[
Simon Hobbs contributed a 3D Sweep and prune implementation, which has been added to Bullet CVS.<br><br>It required a bit of cleanup in Bullet, so some of the interfaces/code has been shuffled around.<br><br>Please let me know if this helps performance. SimpleBroadphase and AxisSweep3 both use the same interface now, so can be exchanged.<br>AxisSweep3 takes as input the world boundaries, because of internal storage (quantized integers), as well as optional maximum number of objects and overlap (both set to some arbitrary default).<br><br>Erwin<br><br>PS: Simon also contributed Win32 SIMD optimized classes and SAT (separating axis test) based convex hull code. But this requires more work to integrate, I'll post a message as soon as this is added to CVS.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Mon Mar 13, 2006 9:19 pm</p><hr />
]]></content>
	</entry>
	</feed>
