changeset 59:f8bd0fd20cc8

Utabify vtkplot.cpp
author Jordi Gutiérrez Hermoso <jordigh@gmail.com>
date Sun, 16 May 2010 09:48:22 -0500
parents 11395e64852f
children 0288895c1071
files src/vtkplot.cpp
diffstat 1 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/vtkplot.cpp
+++ b/src/vtkplot.cpp
@@ -118,7 +118,7 @@
 void vtkplot::SetupPipeline(const interpolator<RBF>& u)
 {
 
-	vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
+  vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
   vtkSmartPointer<vtkDoubleArray> scalars = vtkSmartPointer<vtkDoubleArray>::New();
 
   size_t idx = 1;
@@ -139,16 +139,16 @@
     idx++;
   }
  
-	//add the grid points to a polydata object
-	vtkSmartPointer<vtkPolyData> polydata = vtkSmartPointer<vtkPolyData>::New();
-	polydata->SetPoints(points);
+  //add the grid points to a polydata object
+  vtkSmartPointer<vtkPolyData> polydata = vtkSmartPointer<vtkPolyData>::New();
+  polydata->SetPoints(points);
   polydata->GetPointData() -> SetScalars(scalars);
 
-	//triangulate the grid points
-	vtkSmartPointer<vtkDelaunay2D> delaunay 
+  //triangulate the grid points
+  vtkSmartPointer<vtkDelaunay2D> delaunay 
     = vtkSmartPointer<vtkDelaunay2D>::New();
-	delaunay->SetInput(polydata);
-	delaunay->Update();
+  delaunay->SetInput(polydata);
+  delaunay->Update();
 
   InitOffscreen();
 
@@ -171,8 +171,8 @@
   lut -> Build();
 
   
-	// map the contours to graphical primitives
-	vtkSmartPointer<vtkPolyDataMapper> contMapper 
+  // map the contours to graphical primitives
+  vtkSmartPointer<vtkPolyDataMapper> contMapper 
     = vtkSmartPointer<vtkPolyDataMapper>::New();
   contMapper->SetInput(normals -> GetOutput() );
   contMapper->SetScalarRange(zmin,zmax);
@@ -181,25 +181,25 @@
 
  
   // create an actor for the contours
-	vtkSmartPointer<vtkActor> contActor 
+  vtkSmartPointer<vtkActor> contActor 
     = vtkSmartPointer<vtkActor>::New();
-	contActor->SetMapper(contMapper);
+  contActor->SetMapper(contMapper);
  
   // a renderer and render window
-	ren1 =  vtkSmartPointer<vtkRenderer>::New();
-	renWin = vtkSmartPointer<vtkRenderWindow>::New();
+  ren1 =  vtkSmartPointer<vtkRenderer>::New();
+  renWin = vtkSmartPointer<vtkRenderWindow>::New();
   if(offscreen)
   {
     renWin->SetOffScreenRendering(1);
   }
-	renWin->AddRenderer(ren1);
+  renWin->AddRenderer(ren1);
 
-	// add the actors to the scene
-	ren1->SetBackground(0.0,0.0,0.0);
+  // add the actors to the scene
+  ren1->SetBackground(0.0,0.0,0.0);
   ren1->GetActiveCamera()->SetViewUp(0,0,1);
   ren1->GetActiveCamera()->SetPosition(xview, yview, zview);
   ren1->GetActiveCamera()->SetParallelProjection(1);
-	ren1->AddActor(contActor);
+  ren1->AddActor(contActor);
   ren1->ResetCamera();
  
 }
@@ -303,7 +303,7 @@
     p[2] = vals(i+1);
     newPts -> SetPoint(i,p);
     newScalars -> InsertTuple(i, &p[2]);
-	}
+  }
 
   programmableFilter->
     GetPolyDataOutput()->CopyStructure(programmableFilter->GetPolyDataInput());