[vtk-developers] two small fixes

Wylie, Brian bnwylie at sandia.gov
Fri Oct 31 12:23:26 EST 2003


All,

I'm going to check in two small fixes for Clinton Stimpson 

Quote from Clinton
"The vtkPolygon::IntersectWithLine would not return a positive value if 
the line was within tolerance.  Only if it was within the boundaries of 
the polygon.  The change makes it consistent with
vtkTriangle::IntersectWithLine and others.

It was impossible to catch a cntrl-tab key in my interactor style class 
on X11.  The key char was zero (obviously) and the key sym was NULL."

Here's the patch

diff -aur VTK-4.2.2/Common/vtkPolygon.cxx
VTK-4.2.2.patched/Common/vtkPolygon.cxx
--- VTK-4.2.2/Common/vtkPolygon.cxx	2002-12-26 11:24:21.000000000 -0700
+++ VTK-4.2.2.patched/Common/vtkPolygon.cxx	2003-09-25
19:34:47.000000000 -0600
@@ -1101,7 +1101,8 @@
   // Evaluate position
   //
   weights = new float[npts];
-  if ( this->EvaluatePosition(x, closestPoint, subId, pcoords, dist2,
weights))
+  if ( this->EvaluatePosition(x, closestPoint, subId, pcoords, dist2,
weights) 
+      >= 0)
     {
     if ( dist2 <= tol2 ) 
       {
diff -aur VTK-4.2.2/Rendering/vtkXRenderWindowInteractor.cxx
VTK-4.2.2.patched/Rendering/vtkXRenderWindowInteractor.cxx
--- VTK-4.2.2/Rendering/vtkXRenderWindowInteractor.cxx	2002-11-22
09:25:58.000000000 -0700
+++ VTK-4.2.2.patched/Rendering/vtkXRenderWindowInteractor.cxx	2003-09-25
19:34:52.000000000 -0600
@@ -605,7 +605,7 @@
                                    shift, 
                                    buffer[0], 
                                    1, 
-                                   buffer);
+                                   XKeysymToString(ks));
       me->InvokeEvent(vtkCommand::KeyPressEvent, NULL);
       me->InvokeEvent(vtkCommand::CharEvent, NULL);
       }

Let me know if there are any objections.

Best,

	Brian Wylie
	Sandia National Laboratories
	MS 0822 - Org 9227 - Building 880/A1-J
     (505) 844-2238   FAX (505) 845-0833





More information about the vtk-developers mailing list