# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1274021302 18000 # Node ID f8bd0fd20cc82cc946611c43e17407face4e7e54 # Parent 11395e64852f89dc8c0715e590c4912d3ee5b252 Utabify vtkplot.cpp diff --git a/src/vtkplot.cpp b/src/vtkplot.cpp --- a/src/vtkplot.cpp +++ b/src/vtkplot.cpp @@ -118,7 +118,7 @@ void vtkplot::SetupPipeline(const interpolator& u) { - vtkSmartPointer points = vtkSmartPointer::New(); + vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer scalars = vtkSmartPointer::New(); size_t idx = 1; @@ -139,16 +139,16 @@ idx++; } - //add the grid points to a polydata object - vtkSmartPointer polydata = vtkSmartPointer::New(); - polydata->SetPoints(points); + //add the grid points to a polydata object + vtkSmartPointer polydata = vtkSmartPointer::New(); + polydata->SetPoints(points); polydata->GetPointData() -> SetScalars(scalars); - //triangulate the grid points - vtkSmartPointer delaunay + //triangulate the grid points + vtkSmartPointer delaunay = vtkSmartPointer::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 contMapper + // map the contours to graphical primitives + vtkSmartPointer contMapper = vtkSmartPointer::New(); contMapper->SetInput(normals -> GetOutput() ); contMapper->SetScalarRange(zmin,zmax); @@ -181,25 +181,25 @@ // create an actor for the contours - vtkSmartPointer contActor + vtkSmartPointer contActor = vtkSmartPointer::New(); - contActor->SetMapper(contMapper); + contActor->SetMapper(contMapper); // a renderer and render window - ren1 = vtkSmartPointer::New(); - renWin = vtkSmartPointer::New(); + ren1 = vtkSmartPointer::New(); + renWin = vtkSmartPointer::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());