vtkCellLocator::IntersectWithLine

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

vtkCellLocator::IntersectWithLine

Matthew DiFranco
I've noticed that there is a serious lack of explanation in the
documentation for vtkCellLocator::IntersectWithLine. I would like to
find the intersection of a line with a vtkPolyData surface. Can
someone explain what the inputs of said method represent?
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkCellLocator::IntersectWithLine

Obada Mahdi
Hi Matthew!

On Wed, 25 Jan 2006, Matthew DiFranco wrote:
 > I've noticed that there is a serious lack of explanation in the
 > documentation for vtkCellLocator::IntersectWithLine. I would like to
 > find the intersection of a line with a vtkPolyData surface. Can
 > someone explain what the inputs of said method represent?

I'll give it a try:

| int
| vtkCellLocator::IntersectWithLine(
| double a0[3], double a1[3], double tol,
| double &t, double x[3], double pcoords[3], int &subId)

This method takes as input:
- `a0' and `a1': (global) coordinates of the two endpoints of the finite
   line segment to be intersected with
- `tol': tolerance (directly in "units" of the coordinate system)

It produces:
- return value: non-zero if there was an intersection, in that case the
   following return parameters hold:
- `t': parametric coordinate along the line segment where the
   intersection occurred
- `x': global coordinates of the intersection
- `pcoords': same coordinates in parametric representation
- `subId': sub-ID of intersected cell

I am not entirely sure, any corrections are welcome.  Might help you to
get on the right track, though.


Regards

Obada
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers