<DIV>hi;</DIV>
<DIV> Who can tell me why numContact is always 0.Acturally two actors have been collided;</DIV>
<DIV> vtkMatrix4x4 *matrix0=vtkMatrix4x4::New();<BR> vtkMatrix4x4 *matrix1=vtkMatrix4x4::New();<BR> vtkCollisionDetectionFilter *CollisDetec=vtkCollisionDetectionFilter::New();<BR> collide->SetInput(0,(vtkPolyData *)this->Actortemp->GetMapper()->GetInput());<BR> collide->SetMatrix(0,matrix0);<BR> collide->SetInput(1,(vtkPolyData *)this->Actor1->GetMapper()->GetInput());<BR> collide->SetMatrix(1,matrix1);<BR> collide->SetBoxTolerance(0.0);<BR> collide->SetCellTolerance(0.0);<BR> collide->SetNumberOfCellsPerBucket(2);<BR> collide->GetCollisionModeMaxValue();<BR> collide->GeneratePolydataOutputOn();<BR> //-------------------------------------------------</DIV>
<DIV> int numContact;<BR> for(i=0;i<90;i++)<BR> {<BR> this->renWin->Render();<BR> this->Actor1->RotateWXYZ(1,0,0,-1); <BR> numContacts=CollisDetec->GetNumberOfContacts();<BR> if(numContacts>0)<BR> MessageBox("sdf0",NULL,MB_OK);<BR> } <BR> for(i=0;i<90;i++)<BR> {<BR> this->renWin->Render();<BR> this->Actortemp->RotateWXYZ(1,0,1,0);<BR> Source=this->Actortemp->GetMapper()->GetInput()->GetSource();<BR> numContact=CollisDetec->GetNumberOfContacts();<BR> if(numContact>0)<BR> MessageBox("sdf0",NULL,MB_OK);<BR> } </DIV>
<DIV> </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>