<?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/7497" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2011-10-10T08:28:04+00:00</updated>

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

		<entry>
		<author><name><![CDATA[ayrton04]]></name></author>
		<updated>2011-10-10T08:28:04+00:00</updated>

		<published>2011-10-10T08:28:04+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25738#p25738</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25738#p25738"/>
		<title type="html"><![CDATA[Re: Collisions With Multiple Rays]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25738#p25738"><![CDATA[
Hmm...I suspect that nobody knows the answer to this, and that's probably because I made an unrelated coding error that was causing me to carry out my collision test once for every model in my scene. Once I removed it, it went much, much faster.  <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> <br><br>Thanks anyway!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=8803">ayrton04</a> — Mon Oct 10, 2011 8:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ayrton04]]></name></author>
		<updated>2011-10-07T12:35:48+00:00</updated>

		<published>2011-10-07T12:35:48+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25696#p25696</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25696#p25696"/>
		<title type="html"><![CDATA[Collisions With Multiple Rays]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25696#p25696"><![CDATA[
Hello,<br><br>I am using Bullet to carry out about approximately 650 ray collision tests against many (up to 20 or so) meshes, each of which has perhaps 500 faces, as fast as possible (and repeatedly). The collision data needs to be reasonably accurate. <br><br>I've noticed that when I have only a single mesh in the scene, the collision testing is very fast, but when more meshes are added to the scene, performance drops. This is, of course, expected, but I was hoping that using filter masks and groups would solve the problem, as I could weed out collisions against meshes that aren't in the field of view. The masks and groups correctly stop collisions from occurring, but don't seem to help performance. Only removing objects from the collision world seems to have any effect on performance. Does this seem correct?<br><br>Also, I was hoping someone could give me some tips as to how to make my use of the engine more efficient. I currently do something like this:<br><br>Initialization:<br><div class="codebox"><p>Code: </p><pre><code>m_pCollisionConfiguration = new btDefaultCollisionConfiguration();m_pDispatcher =  new btCollisionDispatcher(m_pCollisionConfiguration);m_pBroadphase = new btDbvtBroadphase();</code></pre></div>Then, for each mesh:<br><div class="codebox"><p>Code: </p><pre><code>m_pCollisionWorld-&gt;addCollisionObject(itModelIterator-&gt;second-&gt;m_pModelInUse-&gt;GetCollisionObject());</code></pre></div>Then, for each ray start and end point:<br><div class="codebox"><p>Code: </p><pre><code>btCollisionWorld::ClosestRayResultCallback hCallback(hStartPt, hEndPt);m_pCollisionWorld-&gt;rayTest(hStartPt, hEndPt, hCallback);</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=8803">ayrton04</a> — Fri Oct 07, 2011 12:35 pm</p><hr />
]]></content>
	</entry>
	</feed>
