[vtkusers] vtkLine

valentina armenise valentina.armenise at gmail.com
Mon May 2 11:17:17 EDT 2011


HI!
I'm working with VTK for my master thesis and now I m facing a doubt. I need
to compute the distance of a point from a segment defined by two vertexes. I
found two functions in vtkLine.h

// Compute distance to finite line. Returns parametric coordinate t

// and point location on line.

double vtkLine::DistanceToLine(double x[3], double p1[3], double p2[3],

                              double &t, double closestPoint[3])


// Determine the distance of the current vertex to the edge defined by

// the vertices provided.  Returns distance squared. Note: line is assumed

// infinite in extent.

//

double vtkLine::DistanceToLine (double x[3], double p1[3], double p2[3])


So if I got it right, the first one gives me the distance from a segment
defined by two vertexes and the second

one gives me the distance from a line (infinite)? I got confused cause the
documentation speaks about edge and not line.


Can you help me?

Which of these should I use?


Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110502/8b388ea3/attachment.htm>


More information about the vtkusers mailing list