[vtkusers] vtkPolygon::PointInPolygon 's parameters

Goodwin Lawlor goodwin.lawlor at ucd.ie
Wed May 21 12:32:36 EDT 2008


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




More information about the vtkusers mailing list