Hello,<br><br>I tried to google the solution for this problem. But I guess there is no direct way to do this. The problem is as explained below:<br><br>There exists a trianglular mesh. Once I click on one of the element of the mesh, it is to be checked whether user has clicked inside the triangle or on the edges of triangle. If user has clicked inside the triangle, then, I need to find the 3 distances, i.e. distance from the clicked point to the 3 edges of the triangle (or 3 faces of the triangle). Is there a direct way to achieve this task?<br>
<br>One way what I found was using this logic here<br><br><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/SimpleOperations/DistancePointToLine">http://www.vtk.org/Wiki/VTK/Examples/Cxx/SimpleOperations/DistancePointToLine</a><br>
<br>Any other easy way will be appreciated. <br><br>Thanks in advance.<br><br>Regards<br>Rakesh Patil<br>