[vtkusers] vtkPolygon::PointInPolygon 's parameters

rashedk rashed.vtk at googlemail.com
Tue May 27 07:06:54 EDT 2008


Hi, 

I am still having problems making the vtkPolygon::PointInPolygon work. Can
someone clarify the third parameter *pts for me? 

Are these the vertices of the polygon as x1, y1, z1, x2, y2, z2, and so on
... where (x1,y1,z1) is a vertex? 

Has anyone had issues with this function? It seems to return 0 for some
points which are inside the polygon. 

Thanks in advance 
Rashed



Goodwin Lawlor wrote:
> 
> Hi Rashed,
> 
> The bounds are indeed the "min-max of each x,y,z component". If you got 
> the polydata of the plane from your widget, you can try:
> 
> planeWidget->GetPolyData()->GetPoints()->GetBounds()
> 
> hth
> 
> Goodwin
> 
> 
> rashedk wrote:
>> Hi everyone, 
>> 
>> I cant find any reference in the documentation about the parameters of
>> the
>> static function vtkPolygon::PointInPolygon
>> 
>> Here is the signature: 
>> int 	PointInPolygon (float x[3], int numPts, float *pts, float bounds[6],
>> float n[3])
>> 
>> Especially with regards to the 4th parameter bounds[6]. If I have four
>> corner points of a polygon (i.e. plane) for example, how do I compute
>> bounds? Are these the min-max of each x,y,z component for the four corner
>> points? 
>> 
>> Thanks, 
>> Rashed
> 
> _______________________________________________
> 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
> 
> 

-- 
View this message in context: http://www.nabble.com/vtkPolygon%3A%3APointInPolygon-%27s-parameters-tp17364157p17487934.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list