[vtkusers] vtkDelaunay3D does'nt work in C++?

Amy Henderson amy.henderson at kitware.com
Thu Feb 5 09:03:00 EST 2004


At 06:37 AM 2/5/2004 +0000, Sentil Balaji wrote:
>Hey,
>
>    I tried the Delaunay3D exampli in Tcl , it worked
>fine.But, when I programmed it in C++ I get
>errors[listed below].Also, I did not find the header
>file "vtkUnstructuredGridVolumeMapper.h".It is not in
>the CD-ROM that comes with the VTK Users' Guide.

vtkUnstructuredGridVolumeMapper is in the VTK 4.4 release (listed on the 
VTK web site as the interim release).  It is available from the "Get the 
Software" section of the VTK web site: http://www.vtk.org/get-software.php.

- Amy

>-----
>CODE
>----
>         vtkRenderWindow *w=vtkRenderWindow::New();
>         vtkRenderWindowInteractor
>*in=vtkRenderWindowInteractor::New();
>         vtkRenderer *r=vtkRenderer::New();
>         vtkActor *a=vtkActor::New();
>         vtkDelaunay3D *d=vtkDelaunay3D::New();
>         vtkPoints *p=vtkPoints::New();
>         vtkPolyData *pd=vtkPolyData::New();
>         vtkPolyDataMapper *pdm=vtkPolyDataMapper::New();
>         vtkExtractEdges *e=vtkExtractEdges::New();
>         vtkDataSetMapper *dsm=vtkDataSetMapper::New();
>         vtkShrinkFilter *sfil=vtkShrinkFilter::New();
>         vtkMath *math=vtkMath::New();
>         vtkUnstructuredGridToPolyDataFilter *pdfil;
>         for(i=1;i<=M;i++)
>                 p->InsertPoint(i,I[i]);
>         pd->SetPoints(p);
>         d->SetInput(pd);
>         d->SetTolerance(0.001);
>         sfil->SetInput(d->GetOutput());
>         dsm->SetInput(sfil->GetOutput());
>         a->SetMapper(dsm);
>         in->SetRenderWindow(w);
>         w->AddRenderer(r);
>         r->AddActor(a);
>         w->Render();
>         in->Start();
>         w->Delete();
>         in->Delete();
>         r->Delete();
>         a->Delete();
>         pdm->Delete();
>         pd->Delete();
>         p->Delete();
>-------
>ERROR
>-------
>:\vtkbase\ren1.cpp(52) : error C2664: 'SetInput' :
>cannot convert parameter 1 from 'class
>vtkUnstructuredGrid *' to 'class vtkDataSet *'
>         Types pointed to are unrelated; conversion
>requires reinterpret_cast, C-style cast or
>function-style cast
>d:\vtkbase\ren1.cpp(53) : error C2664: 'SetInput' :
>cannot convert parameter 1 from 'class
>vtkUnstructuredGrid *' to 'class vtkDataSet *'
>         Types pointed to are unrelated; conversion
>requires reinterpret_cast, C-style cast or
>function-style cast
>Error executing cl.exe.
>
>REN1.exe - 2 error(s), 0 warning(s)
>---------------------------------------------------
>
>Awaiting reply for both the questions..Thanks
>
>Cheers
>
>BeeJay
>
>
>
>________________________________________________________________________
>Yahoo! India Mobile: Download the latest polyphonic ringtones.
>Go to http://in.mobile.yahoo.com
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers






More information about the vtkusers mailing list