From: Dragan T. <dr...@us...> - 2004-12-05 05:22:11
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15269 Modified Files: vtk_trisurf.m Log Message: Added Interpolation property to vtk_trisurf. This property sets the shading (used by vtk_pcolor) to flat if needed. Index: vtk_trisurf.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_trisurf.m,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vtk_trisurf.m 25 Oct 2004 05:37:10 -0000 1.6 +++ vtk_trisurf.m 5 Dec 2004 05:22:01 -0000 1.7 @@ -27,7 +27,7 @@ ## ## Optional @var{prop},@var{val} arguments can be used to change ## properties of the plot. Currently, valid properties are -## ";Opacity;Color;". +## ";Opacity;Color;Interpolation;". ## ## @end deftypefn ## @seealso{vtk_trimesh, vtk_surf} @@ -35,7 +35,7 @@ ## Author: Dragan Tubic function f = vtk_trisurf( varargin ) - valid_props = ";Opacity;Color;"; + valid_props = ";Opacity;Color;Interpolation;"; [no_numerical_params, first_prop_index, line_spec_index] = vtk_parse_params(valid_props, all_va_args); if ( first_prop_index > 0 ) @@ -183,8 +183,15 @@ surfaceActor = vtkActor(); surfaceActor.SetMapper(surfaceMapper); - ## prop = surfaceActor.GetProperty(); + prop = surfaceActor.GetProperty(); + ##prop.SetInterpolationToGouraud(); %default + if isfield(properties,"Interpolation") + if ( properties.Interpolation == "Flat" ) + prop.SetInterpolationToFlat(); + end + end + ##prop.SetInterpolationToFlat(); ## prop.SetDiffuse(0); ##prop.SetAmbient(1); |