[vtkusers] About relationship between a point and a cube
David Doria
daviddoria at gmail.com
Thu Apr 19 11:25:21 EDT 2012
2012/4/19 Rong Xu <xurong1981 at gmail.com>
> Dear all:
>
> I am doing work on a judgement about relationship between a point and an
> arbitrary cube. I have known the 8 coordinates of the cube vertex and have
> draw it out, and also I have known the coordinate of one point. Then I want
> to judge whether this point is inside the cube or outside the cube.
>
> One of my idea is first I rotate the arbitrary cube to make its three
> edges coincide with three axises (x, y, and z), and make one of its
> vertices on the origin of the coordinate system. But I don't know whether
> there are methods in VTK that can be used to realize this purpose ? Or does
> anyone have any other ideas on judging the relationship between the point
> and the cube ?
>
> Thank you very much for your ideas !
>
>
I'm not sure I followed completely, but it sounds like you might be looking
for a "point inside object" test?
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PointInsideObject
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120419/0194c5bd/attachment.htm>
More information about the vtkusers
mailing list