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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2006-12-04T16:02:02+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2006-12-04T16:02:02+00:00</updated>

		<published>2006-12-04T16:02:02+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2689#p2689</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2689#p2689"/>
		<title type="html"><![CDATA[Bullet 2.38 release: btNearCallback]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2689#p2689"><![CDATA[
Bullet 2.38 is released.<br><br>Similar to Open Dynamics Engine, Bullet 2.38 provides the option of a collision detection nearCallback. Main differences with ODE are:<br>- unlike ODE, this is optional: by default Bullet uses its built-in defaultNearCallback<br>- continuous collision detection (time of impact) next to discrete<br>- contact points are persistent and incrementally added/removed/maintained<br><br>See example in CcdPhysicsDemo how to register your own custom nearCallback. This can be useful to have more control over the collision detection pipeline:<br><div class="codebox"><p>Code: </p><pre><code>//by default, Bullet will use its own nearcallback, but you can override it using dispatcher-&gt;setNearCallback()void customNearCallback(btBroadphasePair&amp; collisionPair, btCollisionDispatcher&amp; dispatcher, btDispatcherInfo&amp; dispatchInfo){btCollisionObject* colObj0 = (btCollisionObject*)collisionPair.m_pProxy0-&gt;m_clientObject;btCollisionObject* colObj1 = (btCollisionObject*)collisionPair.m_pProxy1-&gt;m_clientObject;if (dispatcher.needsCollision(colObj0,colObj1)){//dispatcher will keep algorithms persistent in the collision pairif (!collisionPair.m_algorithm){collisionPair.m_algorithm = dispatcher.findAlgorithm(colObj0,colObj1);}if (collisionPair.m_algorithm){btManifoldResult contactPointResult(colObj0,colObj1);if (dispatchInfo.m_dispatchFunc == btDispatcherInfo::DISPATCH_DISCRETE){//discrete collision detection querycollisionPair.m_algorithm-&gt;processCollision(colObj0,colObj1,dispatchInfo,&amp;contactPointResult);} else{//continuous collision detection query, time of impact (toi)float toi = collisionPair.m_algorithm-&gt;calculateTimeOfImpact(colObj0,colObj1,dispatchInfo,&amp;contactPointResult);if (dispatchInfo.m_timeOfImpact &gt; toi)dispatchInfo.m_timeOfImpact = toi;}}}}</code></pre></div>Other additions toBullet 2.38:<br><br>- an optional angularFactor scalar in btRigidBody, which allows to diminish/completely remove angular impulses. This can be handy for character control and cars. When you hit a wall, it won't fully get the rotational impact.<br>- bool btRigidBody::isInWorld(), which returns true is the btRigidBody is currently in a btCollisionWorld/btDynamicsWorld derived class.<br><br>Download at <a href="http://www.continuousphysics.com/mediawiki-1.5.8/index.php?title=Download" class="postlink">http://www.continuousphysics.com/mediaw ... e=Download</a><br>Enjoy!<br>Erwin<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Mon Dec 04, 2006 4:02 pm</p><hr />
]]></content>
	</entry>
	</feed>
