[vtkusers] Re: vtkOBBTree vs. vtkCellLocator
Goodwin Lawlor
goodwin.lawlor at ucd.ie
Thu Nov 20 12:19:07 EST 2003
No, nothing in vtkOBBTree can do that... you'd have to write the function yourself. Perhaps vtkDataSet::FindCell does what you want (its a superclass of vtkUnstructuredGrid).
HTH
Goodwin
University College Dublin
----- Original Message -----
From: M. Campopiano
To: goodwin.lawlor at ucd.ie ; vtkusers at vtk.org
Sent: Monday, November 17, 2003 10:22 PM
Subject: Re: vtkOBBTree vs. vtkCellLocator
Thanks for the response, Goodwin..
So is there any function at all in OBBTree that I can use to locate which cell contains any pariticular point in an unstructured grid..?
(and anywyas - I think CellLocator is apparantly more effecient right?)
Thanks
Mike
>From: "Goodwin Lawlor"
>Reply-To: "Goodwin Lawlor"
>To: "VTK-User" ,
>Subject: vtkOBBTree vs. vtkCellLocator
>Date: Mon, 17 Nov 2003 20:56:35 -0000
>MIME-Version: 1.0
>X-Originating-IP: [195.218.110.229]
>X-Originating-Email: [g00dw1n at hotmail.com]
>Received: from 195.218.110.229 by law11-oe22.law11.hotmail.com with DAV;Mon, 17 Nov 2003 20:58:32 +0000
>Message-ID: <20031117205833.3fb9367827923 at hotmail.com>
>References: <20031115112546.30756.57824.Mailman at public.kitware.com>
>Organization: University College Dublin
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Mailer: Microsoft Outlook Express 6.00.2720.3000
>X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2727.1300
>
>Hi Mike,
>
>You could use vtkGeometryFilter to convert your ugrid to polydata and set
>this as the dataset in vtkOBBTree. This isn't the end of your problems-
>FindClosestPoint will crash anyway from vtkOBBTree.
>
>The problem occurs because vtkCellLocator defines "vtkIdList **Tree" whereas
>vtkOBBTree defines "vtkOBBNode *Tree". FindClosestPoint() expects "vtkIdList
>**Tree" and crashes in GetBucketNeighbours() when it doesn't get it from a
>vtkOBBTree object.
>
>Basically, FindClosestPoint is for use only with vtkCellLocator... if you
>want to uses it with vtkOBBTree you'd have to add a FindClosestPoint method
>to that class (which uses the vtkOBBNode data structure).
>
>HTH
>
>Goodwin
>University College Dublin
>
> > From: "M. Campopiano"
> > To: vtkusers at vtk.org
> > Date: Fri, 14 Nov 2003 18:20:09 +0000
> > Subject: [vtkusers] vtkOBBTree vs. vtkCellLocator
> >
> > Hello again,
> >
> > So I was able to use vtkCellLocator using the following:
> >
> > celllocator->SetDataSet(ugrid);
> > celllocator->BuildLocator();
> > celllocator->FindClosestPoint(x, closestpoint, cellid, subid, dist);
> >
> > And now I invoke the EXACT same methods with vtkOBBTree but it crashes at
> > BuildLocator()..?????
> >
> > obbtree->SetDataSet(ugrid);
> > obbtree->BuildLocator(); //CRASHES HERE!!!!!!!!!!!!!?????
> > obbtree->FindClosestPoint(xobb, closestpointobb, cellidobb, subidobb,
> > distobb);
> >
> > Can anyone tell me why it works for the CellLocator and not for the
> > OBBTree?? Its the exact same thing.. Note that my unstructured grid
>contains
> > quadratic tetra's
> >
> > Thanks
> > Mike
>
------------------------------------------------------------------------------
Send a QuickGreet with MSN Messenger.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20031120/a1086caf/attachment.htm>
More information about the vtkusers
mailing list