<DIV>hi;</DIV>
<DIV>&nbsp; Who can tell me why numContact is always 0.Acturally two actors have been collided;</DIV>
<DIV>&nbsp; vtkMatrix4x4 *matrix0=vtkMatrix4x4::New();<BR>&nbsp;&nbsp;vtkMatrix4x4 *matrix1=vtkMatrix4x4::New();<BR>&nbsp;&nbsp;vtkCollisionDetectionFilter *CollisDetec=vtkCollisionDetectionFilter::New();<BR>&nbsp;&nbsp;collide-&gt;SetInput(0,(vtkPolyData *)this-&gt;Actortemp-&gt;GetMapper()-&gt;GetInput());<BR>&nbsp;&nbsp;collide-&gt;SetMatrix(0,matrix0);<BR>&nbsp;&nbsp;collide-&gt;SetInput(1,(vtkPolyData *)this-&gt;Actor1-&gt;GetMapper()-&gt;GetInput());<BR>&nbsp;&nbsp;collide-&gt;SetMatrix(1,matrix1);<BR>&nbsp;&nbsp;collide-&gt;SetBoxTolerance(0.0);<BR>&nbsp;&nbsp;collide-&gt;SetCellTolerance(0.0);<BR>&nbsp;&nbsp;collide-&gt;SetNumberOfCellsPerBucket(2);<BR>&nbsp;&nbsp;collide-&gt;GetCollisionModeMaxValue();<BR>&nbsp;&nbsp;collide-&gt;GeneratePolydataOutputOn();<BR>&nbsp;&nbsp;//-------------------------------------------------</DIV>
<DIV>&nbsp; int numContact;<BR>&nbsp;&nbsp;for(i=0;i&lt;90;i++)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;this-&gt;renWin-&gt;Render();<BR>&nbsp;&nbsp;&nbsp;this-&gt;Actor1-&gt;RotateWXYZ(1,0,0,-1); &nbsp;<BR>&nbsp;&nbsp;&nbsp;numContacts=CollisDetec-&gt;GetNumberOfContacts();<BR>&nbsp;&nbsp;&nbsp;if(numContacts&gt;0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;MessageBox("sdf0",NULL,MB_OK);<BR>&nbsp;&nbsp;}&nbsp;<BR>&nbsp;&nbsp;for(i=0;i&lt;90;i++)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;this-&gt;renWin-&gt;Render();<BR>&nbsp;&nbsp;&nbsp;this-&gt;Actortemp-&gt;RotateWXYZ(1,0,1,0);<BR>&nbsp;&nbsp;&nbsp;Source=this-&gt;Actortemp-&gt;GetMapper()-&gt;GetInput()-&gt;GetSource();<BR>&nbsp;&nbsp;&nbsp;numContact=CollisDetec-&gt;GetNumberOfContacts();<BR>&nbsp;&nbsp;&nbsp;if(numContact&gt;0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;MessageBox("sdf0",NULL,MB_OK);<BR>&nbsp;&nbsp;}&nbsp;</DIV>
<DIV>&nbsp;</DIV><SPAN ></SPAN><br><!-- footer --><br><br><br><br><br><div style="border-bottom:1px solid #999"></div><br>

        <font color="black" style="font-size:14.8px">你 知 道 中 国 每 年 耗 费 多 少 一 次 性 筷 子 吗 ?</font>
        <br>
         <font style="font-size:13px;line-height:160%;color:blue">450亿双!相当于170万立方米的木材,大约需要砍伐2500万棵大树!</font> <a href="http://www.126.com/" target="_blank" style="font-size:13px;line-height:160%;color:blue"><网易邮箱公益宣传>
</a>