[vtkusers] Blanking
Paul Tait - OPES
Paul at opes.com.au
Mon Feb 26 01:39:47 EST 2007
Whats the magic to get blanking working??
Also
When I press the 'w' wireframe key how come I dont see the internal lines in
the grid. I just see the faces?
// a renderer and render window
vtkRenderer *ren1 = vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->SetSize(800, 800);
renWin->AddRenderer(ren1);
vtkUniformGrid *ug = vtkUniformGrid::New();
ug->SetDimensions(4, 4, 4);
ug->SetScalarTypeToUnsignedChar();
vtkDataSetMapper *dsm = vtkDataSetMapper::New();
dsm->SetInput(ug);
vtkActor *uga = vtkActor::New();
uga->SetMapper(dsm);
ren1->AddActor(uga);
// an interactor
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
renWin->Render();
vtkCell *cd = ug->GetCell(0);
ug->BlankCell(0);
vtkIdList *pts = cd->GetPointIds();
for (int i = 0; i < pts->GetNumberOfIds(); ++i)
ug->BlankPoint(pts->GetId(i));
ug->Update();
// begin mouse interaction
renWin->Render();
iren->Start();
ren1->Delete();
renWin->Delete();
iren->Delete();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070226/afbd922a/attachment.htm>
More information about the vtkusers
mailing list