From: Jonathan S. <jjs...@us...> - 2005-04-29 05:31:35
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16951 Modified Files: vtk_axis.m Log Message: working on axis functionality Index: vtk_axis.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_axis.m,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vtk_axis.m 26 Apr 2005 05:07:20 -0000 1.5 +++ vtk_axis.m 29 Apr 2005 05:31:26 -0000 1.6 @@ -36,6 +36,9 @@ f.axes_on = 0; elseif ( strcmp(arg, "equal") || strcmp(arg, "normal") ) ## defaults in vtk ## (working with just one Prop for now) + ## remove any clipping... how to do that?????? + # probably will need to add a new structure to the figure object which contains uncut data + ## reset scaling f.renderer.GetProps.GetLastProp.SetScale(1,1,1) f.axes.UseRangesOff elseif ( strcmp(arg, "square") ) @@ -51,6 +54,23 @@ endif else disp("manual setting of axis bounds not implemented yet") + ## attempt at clipping (only one Actor for now) + # needs to be redone so that original data can be recovered +# plane = vtkPlane(); +# plane.SetOrigin(0, 0, 0); +# plane.SetNormal(1, 0, 0); +# clippoly = vtkClipPolyData; +# clippoly.SetClipFunction(plane); +# clippoly.GenerateClipScalarsOn(); +# clippoly.GenerateClippedOutputOn(); +# ##clippoly.SetValue(0.5); ?? +# clippoly.SetInput(f.renderer.GetActors.GetLastActor.GetMapper.GetInput); +# ##f.renderer.GetActors.GetLastActor.GetMapper.SetInput(clippoly.GetOutput); ## this doesn't work because you can't recover original! +# clipmapper = vtkPolyDataMapper; +# clipmapper.SetInput(clippoly.GetOutput); +# clipactor = vtkActor; +# clipactor.SetMapper(clipmapper); +# f.renderer.AddActor(clipactor); endif endfor @@ -63,5 +83,8 @@ ##f.axes.UseRangesOn ##f.axes.SetRanges(xl,xh,yl,yh,zl,zh) -## to set arbitrary scaling???? +## to set arbitrary scaling ##f.renderer.GetProps.GetLastProp.SetScale(xscale,yscale,zscale) + +## to get at the polydata input of the last actor; hopefully I can then clip it +#f.renderer.GetActors.GetLastActor.GetMapper.GetInput |