Hi,<br><br>I think that you can change actor for type you want.<br><br>virtual void OnMouseMove()<br> {<br> vtkImageActor* actor;<br><br> image->Update();<br> // Pick at the mouse location provided by the interactor<br>
Picker->Pick(this->GetInteractor()->GetEventPosition()[0],<br> this->GetInteractor()->GetEventPosition()[1],<br> 0, this->GetDefaultRenderer());<br>
<br><br> vtkAssemblyPath* path = this->Picker->GetPath();<br> bool validPick = false;<br><br> if (path)<br> {<br> vtkCollectionSimpleIterator sit;<br> path->InitTraversal(sit);<br>
vtkAssemblyNode *node;<br> for (int i = 0; i < path->GetNumberOfItems() && !validPick; ++i)<br> {<br> node = path->GetNextNode(sit);<br> if (actor == vtkImageActor::SafeDownCast(node->GetViewProp()))<br>
{<br> validPick = true;<br> }<br> }<br> }<br><br> vtkInteractorStyleTrackballCamera::OnMouseMove();<br> }<br><br><div class="gmail_quote">2010/9/20 rakesh patil <span dir="ltr"><<a href="mailto:prakeshofficial@gmail.com">prakeshofficial@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello,<div><br></div><div>I have one interpolation function, which accepts three nodes of a triangle and an arbitrary point inside triangle. Using these data, it computes the depth/bathymetry value of the point inside the triangle. I mean, bathymetry information is stored only at node points.</div>
<div><br></div><div>But this is done on mouse click. I click inside a triangle anywhere, and i get the bathymetry value at that location. Now i want this to change this behaviour from mouse click to mouse move. </div><div>
<br></div><div>The question is how can I come to know whether mouse is over the triangle or not? Actually, it is a triangular mesh, how can i find out whether mouse is moving over mesh or not?</div><div><br></div><div>Thanks</div>
<div><br></div><div>Regards</div><div>Rakesh Patil</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Ítalo Mendes<br><a href="http://ogre.irados.org">ogre.irados.org</a><br>