[vtkusers] vtkCatmullClarkFilter HELP PLEASE!!
David Cole
david.cole at kitware.com
Fri Oct 31 10:26:37 EDT 2008
Amazingly (to me, anyway), a google on vtkCatmullClarkFilter yields only 15
hits all derived from this doxygen output:
http://www.cg.tuwien.ac.at/courses/MathMethodenCG/SS2003/4-Kuehschelm-Wagner-Zambal/html/classvtkCatmullClarkFilter.html
I would look at all the pages referenced from there and try to contact one
of the original authors of the code. There is no
vtkCatmullClarkFilter class in VTK itself.
Good luck!
David
On Fri, Oct 31, 2008 at 6:03 AM, minococciolo at libero.it <
minococciolo at libero.it> wrote:
> Hello everybody,
> I'm trying to use vtkCatmullClarkFilter to create a
> quadrangular mesh.
> Unfortunately, the documentation about it on the web is
> quite null. Is there someone who can help me?
> I'm using C++ with Visual C++
> Express 2005, but every example or source code in tcl, python etc. is good.
>
> Thank you very much.
>
> /*----------Here is a simple code. It doesn't work!
> ------------*/
>
> #include....
>
> int main(int argc, char** argv)
> {
> // First we'll
> create some points.
> //
> vtkPoints *points = vtkPoints::New();
> points-
> >InsertPoint(0, 0.0, 0.0, 0.0);
> points->InsertPoint(1, 0.0, 1.0, 0.0);
> points-
> >InsertPoint(2, 1.0, 1.0, 0.0);
> points->InsertPoint(3, 1.0, 0.0, 0.0);
>
>
> vtkCellArray *strips = vtkCellArray::New();
> strips->InsertNextCell(4);
> strips-
> >InsertCellPoint(0);
> strips->InsertCellPoint(1);
> strips->InsertCellPoint(2);
>
> strips->InsertCellPoint(3);
>
> vtkPolyData *profile = vtkPolyData::New();
>
> profile->SetPoints(points);
> profile->SetPolys(strips);
>
> vtkCatmullClarkFilter
> *cc = vtkCatmullClarkFilter::New();
> cc->SetNumberOfSubdivisions(4);
> cc-
> >SetInput(profile);
> cc->Execute();
> cc->Update();
>
> vtkPolyDataMapper *map =
> vtkPolyDataMapper::New();
> map->SetInput(cc->GetOutput());
>
> vtkActor *strip =
> vtkActor::New();
> strip->SetMapper(map);
> strip->GetProperty()->SetColor
> (0.3800, 0.7000, 0.1600);
>
> // Create the usual rendering stuff.
> vtkRenderer
> *ren1 = vtkRenderer::New();
> vtkRenderWindow *renWin = vtkRenderWindow::New();
>
> renWin->AddRenderer(ren1);
> vtkRenderWindowInteractor *iren =
> vtkRenderWindowInteractor::New();
> iren->SetRenderWindow(renWin);
>
> // Add the
> actors to the renderer, set the background and size
> //
> ren1->AddActor(strip);
>
>
> ren1->SetBackground(0.1, 0.2, 0.4);
> renWin->SetSize(250, 250);
> renWin-
> >Render();
>
> // render the image
> iren->Initialize();
> iren->Start();
>
> return
> 0 ;
> }
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081031/58f1b52d/attachment.htm>
More information about the vtkusers
mailing list