[vtkusers] Inside/Outside test in vtkOBBTree
Carlos Martinez Burgos
cmarbur at iti.upv.es
Tue Sep 25 07:48:24 EDT 2001
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
----------------------------------------------------------------------
More information about the vtkusers
mailing list