[vtk-developers] vtkCell::IntersectWithLine issues
Kaushik .
shekhar.kaushik at gmail.com
Tue Jul 1 17:13:32 EDT 2008
Hi
I am trying to implement the following algorithm and I am stuck. I need to
cast rays
from each pixel into a dataset. Along each ray , I need to find the first
cell that satisfies
some characteristics. I go about implementing it as follows :
Using the vtkCellLocator::IntersectWithLine() , i find the first cell the
ray intersects in the dataset.
If this cell satisfies the conditions , we exit.
else we continue searching cells along the ray until one such cell is found
, or until we eventually reach
the boundary of the dataset.
Now this searching cell along a ray is causing me trouble. Given the first
cell that the ray intersected,
I find the faces of the cell that the ray intersects. From these faces I
choose the one that is nearer to the
end point of the ray and the next cell to search is the cell adjacent to the
chosen face.
The algorithm seems to be correct logically atleast.
The vtkCell::IntersectWithLine() functions however seem to be giving
inconsistent results ! Are there
any known issues with these functions ? Please advise.
Also can you please comment on the algorithm above ? Is there any other way(
better ? ) to do the same ?
--
shekhar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20080702/7235318d/attachment.html>
More information about the vtk-developers
mailing list