[vtkusers] Inside/Outside test in vtkOBBTree

HIRAKI Hideaki hhiraki at lab.nig.ac.jp
Wed Sep 26 02:24:11 EDT 2001


On Tue, 25 Sep 2001 13:48:24 +0200 (CEST),
  In the message "[vtkusers] Inside/Outside test in vtkOBBTree" <Pine.LNX.4.33.0109251335250.2275-100000 at gatet.iti.upv.es>,
  Carlos Martinez Burgos <cmarbur at iti.upv.es> wrote:
<snip>
>I have tried to build the OBB Tree but I can't get good results. It
<snip>

I tried vtkOBBTree and couldn't get good results, too. In my case,
one problem was calling FindClosestPointWithinRadius() caused 
segmentation fault. vtkOBBTree seems not to be used in place of a 
vtkCellLocator.
Another problem could be fixed by the following patch. (As bare 
"char" is unsigned in the IRIX box, "-1" changed to "255".)

--- vtkOBBTree.cxx~     Thu Jul 26 12:50:58 2001
+++ vtkOBBTree.cxx      Wed Sep 26 14:11:38 2001
@@ -710,7 +710,7 @@
   int listMaxSize = 10;
   float *distanceList = new float[listMaxSize];
   vtkIdType *cellList = new vtkIdType[listMaxSize];
-  char *senseList = new char[listMaxSize];
+  signed char *senseList = new signed char[listMaxSize];
 
   float point[3];
   float distance;
@@ -778,7 +778,7 @@
              listMaxSize *= 2;
              float *tmpDistanceList = new float[listMaxSize];
              vtkIdType *tmpCellList = new vtkIdType[listMaxSize];
-             char *tmpSenseList = new char[listMaxSize];
+             signed char *tmpSenseList = new signed char[listMaxSize];
              for (int k = 0; k < listSize; k++)
                {
                tmpDistanceList[k] = distanceList[k];


<snip>
>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?
<snip>

vtkFeatureEdges can find edges in the polydata. I hope this helps.

H. Hiraki



More information about the vtkusers mailing list