[vtkusers] Inside/Outside test in vtkOBBTree
David Pont
david_pont at hotmail.com
Tue Sep 25 16:28:21 EDT 2001
Carlos,
I wrote an "experimental" vtk class some time ago that treats polydata as
an implicit function. This would allow you to test a point for
inside/outside. The implementation means that the test will work if the
polydata is closed or not, which could be a problem for you. I can send you
the C++ code if you like, but I note you are working in Java.
regards
Dave Pont
>From: Carlos Martinez Burgos <cmarbur at iti.upv.es>
>To: VTK User Mailing List <vtkusers at public.kitware.com>
>Subject: [vtkusers] Inside/Outside test in vtkOBBTree
>Date: Tue, 25 Sep 2001 13:48:24 +0200 (CEST)
>
>Hi.
>
>Some days ago I asked to you if is there a method to test if a point is
>inside a closed polydata. Somebody answered that is there a new method in
>the vtkOBBTree class to test it.
>
>I have tried to build the OBB Tree but I can't get good results. It
>sometimes works and sometimes not. I first build the OBB Tree and after I
>generate its representation. I don't get always a representation.
>
>I have tried to change the OBBTree parameters like max level and tolerance
>but no changes. I use this code (in Java):
>
>obbTree=new vtkOBBTree();
>obbTree.SetDataSet(polydata);
>obbTree.SetMaxLevel(5);
>obbTree.SetTolerance(0.0001);
>obbTree.BuildLocator();
>
>obb=new vtkPolyData();
>obbTree.GenerateRepresentation(2,obb);
>
>obbMapper=new vtkPolyDataMapper();
>obbMapper.SetInput(obb);
>
>obbActor=new vtkActor();
>obbActor.SetMapper(obbMapper);
>obbActor.GetProperty().SetRepresentationToWireframe();
>obbActor.GetProperty().SetColor(1,0,0);
>obbActor.PickableOff();
>
>I don't know if my mistake is in the code or in the data used. I use
>polydatas of few triangles, most times simply tetrahedrons. Could this be
>a problem?
>
>
>Furthermore I want to check if the polydata used is a closed polydata
>because I'm not sure. Is there a method or a class in VTK to do this?
>
>
>Do you think another method to test if a point is inside a closed
>polydata?
>
>
>Thanks and sorry for my language mistakes.
>
>--
>----------------------------------------------------------------------
>Carlos Martínez Burgos | Instituto Tecnológico de Informática
>Ingeniero Informático | Universidad Politécnica de Valencia
>Tlf: +34 963877237 | Camí de Vera, S/N
>cmarbur at iti.upv.es | 46071 Valencia - Spain
>www.iti.upv.es/~cmarbur | www.iti.upv.es
>----------------------------------------------------------------------
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at:
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
More information about the vtkusers
mailing list