<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
	>
<channel>
	<title>6. 衝突検出 へのコメント</title>
	<atom:link href="http://demura.net/tutorials/ode6/feed" rel="self" type="application/rss+xml" />
	<link>http://demura.net</link>
	<description>ロボット達のサッカーW杯RoboCup，つくばチャレンジ，物理計算エンジンＯＤＥと本サイトで開発している３次元描画ライブラリirrDrawStuffなどのロボット開発プラットフォームを開発者の視点で情報発信． なお，ODE本では左下動画のようなロボットシミュレータ作成法を学びます．まずは動画をクリックして体験しよう！</description>
	<lastBuildDate>Fri, 03 Feb 2012 06:31:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/843080b3ff15706.png" alt="demu MonsterID Icon" height="48" width="48"/> demu より</title>
		<link>http://demura.net/tutorials/ode6/comment-page-1#comment-2440</link>
		<dc:creator><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/843080b3ff15706.png" alt="demu MonsterID Icon" height="48" width="48"/> demu</dc:creator>
		<pubDate>Fri, 08 Oct 2010 06:45:22 +0000</pubDate>
		<guid isPermaLink="false">http://demura.net/wordpress/?page_id=1804#comment-2440</guid>
		<description>いいえ。

nearCallbackには接触する可能性の２つのジオメトリ（つまり、o1, o2)が入力されます。o3といった感じに増やすのではなく、例えば、球とボックスジオメトリの衝突に関する属性を変えたい場合は、if (((o1==sphere)&amp;&amp;(o2==box))&#124;&#124;((o2==sphere)&amp;&amp;(o1==box))) としてください。

なお、物体間の衝突に関する属性が全て同じ場合は条件を分ける必要がありません。

でむ</description>
		<content:encoded><![CDATA[<p>いいえ。</p>
<p>nearCallbackには接触する可能性の２つのジオメトリ（つまり、o1, o2)が入力されます。o3といった感じに増やすのではなく、例えば、球とボックスジオメトリの衝突に関する属性を変えたい場合は、if (((o1==sphere)&amp;&amp;(o2==box))||((o2==sphere)&amp;&amp;(o1==box))) としてください。</p>
<p>なお、物体間の衝突に関する属性が全て同じ場合は条件を分ける必要がありません。</p>
<p>でむ</p>
]]></content:encoded>
	</item>
	<item>
		<title><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/f1aa84a1d49b4bf.png" alt="syan MonsterID Icon" height="48" width="48"/> syan より</title>
		<link>http://demura.net/tutorials/ode6/comment-page-1#comment-2436</link>
		<dc:creator><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/f1aa84a1d49b4bf.png" alt="syan MonsterID Icon" height="48" width="48"/> syan</dc:creator>
		<pubDate>Thu, 07 Oct 2010 05:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://demura.net/wordpress/?page_id=1804#comment-2436</guid>
		<description>返信ありがとうございます。
nearCallbackが１個でいいのは分かったんですが剛体同士の衝突についてはどうしても分かりません。
この場合はサンプルであった((ground == o1) &#124;&#124; (ground == o2)); とは別に((ground == o1) &#124;&#124; (ground == o3));といった感じにif文を増やせばよろしいのでしょうか？</description>
		<content:encoded><![CDATA[<p>返信ありがとうございます。<br />
nearCallbackが１個でいいのは分かったんですが剛体同士の衝突についてはどうしても分かりません。<br />
この場合はサンプルであった((ground == o1) || (ground == o2)); とは別に((ground == o1) || (ground == o3));といった感じにif文を増やせばよろしいのでしょうか？</p>
]]></content:encoded>
	</item>
	<item>
		<title><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/843080b3ff15706.png" alt="demu MonsterID Icon" height="48" width="48"/> demu より</title>
		<link>http://demura.net/tutorials/ode6/comment-page-1#comment-2434</link>
		<dc:creator><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/843080b3ff15706.png" alt="demu MonsterID Icon" height="48" width="48"/> demu</dc:creator>
		<pubDate>Wed, 06 Oct 2010 23:59:33 +0000</pubDate>
		<guid isPermaLink="false">http://demura.net/wordpress/?page_id=1804#comment-2434</guid>
		<description>syanさん、

はじめまして。

nearCallbackの関数内で、すべてのジオメトリのペア毎に衝突検出に関する属性、例えば、摩擦係数や反発係数など、を変える場合は、if文で条件分けをする必要があります。nearCallbackは１個でＯＫです。

御回答になったでしょうか。

でむ</description>
		<content:encoded><![CDATA[<p>syanさん、</p>
<p>はじめまして。</p>
<p>nearCallbackの関数内で、すべてのジオメトリのペア毎に衝突検出に関する属性、例えば、摩擦係数や反発係数など、を変える場合は、if文で条件分けをする必要があります。nearCallbackは１個でＯＫです。</p>
<p>御回答になったでしょうか。</p>
<p>でむ</p>
]]></content:encoded>
	</item>
	<item>
		<title><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/f1aa84a1d49b4bf.png" alt="syan MonsterID Icon" height="48" width="48"/> syan より</title>
		<link>http://demura.net/tutorials/ode6/comment-page-1#comment-2431</link>
		<dc:creator><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/f1aa84a1d49b4bf.png" alt="syan MonsterID Icon" height="48" width="48"/> syan</dc:creator>
		<pubDate>Wed, 06 Oct 2010 02:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://demura.net/wordpress/?page_id=1804#comment-2431</guid>
		<description>はじめまして、このサイトと貴著でODEを勉強しているものです。
今、落下物と床とは別の剛体との衝突のシミュレーションを作成しようとしているのですが、落下物が剛体をすり抜けてしまいます。
この場合はnearCallbackをもう一つ作らなければならないのでしょうか？それともnearCallback関数内に衝突計算を複数作らなければならないんでしょうか？</description>
		<content:encoded><![CDATA[<p>はじめまして、このサイトと貴著でODEを勉強しているものです。<br />
今、落下物と床とは別の剛体との衝突のシミュレーションを作成しようとしているのですが、落下物が剛体をすり抜けてしまいます。<br />
この場合はnearCallbackをもう一つ作らなければならないのでしょうか？それともnearCallback関数内に衝突計算を複数作らなければならないんでしょうか？</p>
]]></content:encoded>
	</item>
	<item>
		<title><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/843080b3ff15706.png" alt="demu MonsterID Icon" height="48" width="48"/> demu より</title>
		<link>http://demura.net/tutorials/ode6/comment-page-#comment-1090</link>
		<dc:creator><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/843080b3ff15706.png" alt="demu MonsterID Icon" height="48" width="48"/> demu</dc:creator>
		<pubDate>Sun, 06 Dec 2009 23:28:30 +0000</pubDate>
		<guid isPermaLink="false">http://demura.net/wordpress/?page_id=1804#comment-1090</guid>
		<description>正確には衝突する可能性のあるジオメトリが２つとも地面あるいは地面ボックス，あるいは地面でも地面ボックスでないとき衝突検出をしないでリターンするということです．

排他的論理和^を使っているので少しわかりづらいですね．

今後ともご愛読やコメントよろしくお願いします．

でむ</description>
		<content:encoded><![CDATA[<p>正確には衝突する可能性のあるジオメトリが２つとも地面あるいは地面ボックス，あるいは地面でも地面ボックスでないとき衝突検出をしないでリターンするということです．</p>
<p>排他的論理和^を使っているので少しわかりづらいですね．</p>
<p>今後ともご愛読やコメントよろしくお願いします．</p>
<p>でむ</p>
]]></content:encoded>
	</item>
	<item>
		<title><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/b6a66c9477986af.png" alt="mel MonsterID Icon" height="48" width="48"/> mel より</title>
		<link>http://demura.net/tutorials/ode6/comment-page-1#comment-1089</link>
		<dc:creator><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/b6a66c9477986af.png" alt="mel MonsterID Icon" height="48" width="48"/> mel</dc:creator>
		<pubDate>Sun, 06 Dec 2009 21:24:26 +0000</pubDate>
		<guid isPermaLink="false">http://demura.net/wordpress/?page_id=1804#comment-1089</guid>
		<description>&gt;if (!(g1 ^ g2)) return;
衝突点の両方が地面あるいは障害物，あるいはどちらとも地面でも障害物でもないとき衝突処理を行わない、ということですね。
短いコードなのに理解するのに時間がかかってしまいましたが、例外処理もうまくいき、望んでいた挙動をさせることができました。

本当にありがとうございました。</description>
		<content:encoded><![CDATA[<p>&gt;if (!(g1 ^ g2)) return;<br />
衝突点の両方が地面あるいは障害物，あるいはどちらとも地面でも障害物でもないとき衝突処理を行わない、ということですね。<br />
短いコードなのに理解するのに時間がかかってしまいましたが、例外処理もうまくいき、望んでいた挙動をさせることができました。</p>
<p>本当にありがとうございました。</p>
]]></content:encoded>
	</item>
	<item>
		<title><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/843080b3ff15706.png" alt="demu MonsterID Icon" height="48" width="48"/> demu より</title>
		<link>http://demura.net/tutorials/ode6/comment-page-#comment-1088</link>
		<dc:creator><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/843080b3ff15706.png" alt="demu MonsterID Icon" height="48" width="48"/> demu</dc:creator>
		<pubDate>Sun, 06 Dec 2009 14:25:20 +0000</pubDate>
		<guid isPermaLink="false">http://demura.net/wordpress/?page_id=1804#comment-1088</guid>
		<description>melさん、

はじめまして。demura.netと拙著をご愛読ありがとうございます。

さて、ご質問ですが、if (!(g1 ^ g2)) return;の行をコメントアウトすると問題は解決すると思います。

でむ

static void nearCallback (void *data, dGeomID o1, dGeomID o2)
{
  int i,n;

  // only collide things with the ground
  int g1 = (o1 == ground &#124;&#124; o1 == ground_box);
  int g2 = (o2 == ground &#124;&#124; o2 == ground_box);
  if (!(g1 ^ g2)) return;</description>
		<content:encoded><![CDATA[<p>melさん、</p>
<p>はじめまして。demura.netと拙著をご愛読ありがとうございます。</p>
<p>さて、ご質問ですが、if (!(g1 ^ g2)) return;の行をコメントアウトすると問題は解決すると思います。</p>
<p>でむ</p>
<p>static void nearCallback (void *data, dGeomID o1, dGeomID o2)<br />
{<br />
  int i,n;</p>
<p>  // only collide things with the ground<br />
  int g1 = (o1 == ground || o1 == ground_box);<br />
  int g2 = (o2 == ground || o2 == ground_box);<br />
  if (!(g1 ^ g2)) return;</p>
]]></content:encoded>
	</item>
	<item>
		<title><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/b6a66c9477986af.png" alt="mel MonsterID Icon" height="48" width="48"/> mel より</title>
		<link>http://demura.net/tutorials/ode6/comment-page-1#comment-1087</link>
		<dc:creator><img class="monsterid" src="http://demura.net/wordpress/wp-content/plugins/wp-monsterid/monsterid/b6a66c9477986af.png" alt="mel MonsterID Icon" height="48" width="48"/> mel</dc:creator>
		<pubDate>Sat, 05 Dec 2009 18:25:18 +0000</pubDate>
		<guid isPermaLink="false">http://demura.net/wordpress/?page_id=1804#comment-1087</guid>
		<description>はじめまして。いつもこのサイトと貴著にお世話になっています。
いきなりですが物体間の衝突処理について分からないことがあるので質問させていただきます。

今ODEのサンプルコードのdemo_buggyをもとにして自作のプログラムを作成中なのですが，
設定がうまくいかず，物体同士が衝突せずにすりぬけてしまいます。
ジオメトリの設定はしてあり，地面とは接触することが確認済みなのですが、
バギーおよび新たに追加したパーツ同士はすりぬけが発生してしまいます。

このような症状がおきてしまう原因，おそらくは自分の設定が足りていないからですが，
解決方法に心当たりがありましたらご教授いただけないでしょうか。

よろしくお願いします。</description>
		<content:encoded><![CDATA[<p>はじめまして。いつもこのサイトと貴著にお世話になっています。<br />
いきなりですが物体間の衝突処理について分からないことがあるので質問させていただきます。</p>
<p>今ODEのサンプルコードのdemo_buggyをもとにして自作のプログラムを作成中なのですが，<br />
設定がうまくいかず，物体同士が衝突せずにすりぬけてしまいます。<br />
ジオメトリの設定はしてあり，地面とは接触することが確認済みなのですが、<br />
バギーおよび新たに追加したパーツ同士はすりぬけが発生してしまいます。</p>
<p>このような症状がおきてしまう原因，おそらくは自分の設定が足りていないからですが，<br />
解決方法に心当たりがありましたらご教授いただけないでしょうか。</p>
<p>よろしくお願いします。</p>
]]></content:encoded>
	</item>
</channel>
</rss>

