[vtkusers] COnversion to 4.2
James C. Robinson
j.robinson at kepler-systems.com
Thu Mar 11 07:19:06 EST 2004
Dear All,
I would appreciate if someone could help me ASAP with this simple query. I
am converting my code from 4.0 to 4.2 I had hoped thought it would be a
relatively simple process, but the following compile error is a bit
disconcerting:
Error 1:
:\Jim\Programming\mfc\Kes\PanMeshv3.1\Source\cross-section.cpp(48) : 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
// The actual plane surface
pCrossSection->SetInput(pMeshReader->GetOutput()) ;
pCrossSection->SetCutFunction(pPlane) ;
Where pCrossSection is a vtkCutter* and pMeshReader is a
vtkUnstructuredGridReader*. This code worked under v4.0.
Error 2:
C:\Jim\Programming\mfc\Kes\PanMeshv3.1\Source\cross-section.cpp(59) : error
C2027: use of undefined type 'vtkPolyDataMapper'
C:\Jim\Programming\VTK 4.2\VTK\Rendering\vtkDataSetMapper.h(32) :
see declaration of 'vtkPolyDataMapper'
When I look into the v4.2 vtkDataSetMapper.h I see:
#ifndef __vtkDataSetMapper_h
#define __vtkDataSetMapper_h
#include "vtkMapper.h"
class vtkPolyDataMapper;
class vtkDataSetSurfaceFilter;
Compare this with the header file in v4.0:
#ifndef __vtkDataSetMapper_h
#define __vtkDataSetMapper_h
#include "vtkDataSetSurfaceFilter.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderer.h"
#include "vtkImageData.h"
Why the change? Has this type of change been made right through v4.2?
Finally, before I make a total mess of good code that works under v4.0, what
other changes have been made that will affect either the compilation or the
running of my code?
Many thanks,
Jim
______________________
James C. Robinson, PhD,
Chartered Engineer,
42 Rivergrove,
Glanmire, Co. Cork,
Eire
Tel: +353-21-4822028
Tel: +353-87-2393010
Fax: +353-21-4822721
E-mail: jrobinson at eircom.net
______________________
More information about the vtkusers
mailing list