[vtkusers] Creating an OpenMesh to polydata converter

Toon Huysmans denhuys at hotmail.com
Tue Nov 15 08:01:58 EST 2005


Hi All,
 
I am trying to create a THVTKOpenMeshSource class that gets an OpenMesh
mesh as 
its input and acts as a polydatasource. So I derive the class from
vtkPolyDataSource 
and implement the Execute() method.  But the problem is that the class
should be a 
template of < class mesh >, and this causes problems for the macros:
 
vtkCxxRevisionMacro(THVTKOpenMeshSource, "$Revision: 0.1 $");
vtkStandardNewMacro(THVTKOpenMeshSource);
 
It just does not compile :
 
Compiling...
THVTKOpenMeshSource.cpp
\Documents and Settings\Toon Huysmans\My Documents\Visual Studio
Projects\THSSM\core\THCommon\THVTKOpenMeshSource.cpp(15) : error C2653:
'THVTKOpenMeshSource' : is not a class or namespace name
\Documents and Settings\Toon Huysmans\My Documents\Visual Studio
Projects\THSSM\core\THCommon\THVTKOpenMeshSource.cpp(15) : error C2673:
'CollectRevisions' : global functions do not have 'this' pointers
\Documents and Settings\Toon Huysmans\My Documents\Visual Studio
Projects\THSSM\core\THCommon\THVTKOpenMeshSource.cpp(15) : error C2653:
'Superclass' : is not a class or namespace name
\Documents and Settings\Toon Huysmans\My Documents\Visual Studio
Projects\THSSM\core\THCommon\THVTKOpenMeshSource.cpp(15) : error C2227:
left of '->CollectRevisions' must point to class/struct/union
\Documents and Settings\Toon Huysmans\My Documents\Visual Studio
Projects\THSSM\core\THCommon\THVTKOpenMeshSource.cpp(16) : error C2143:
syntax error : missing ';' before '*'
\Documents and Settings\Toon Huysmans\My Documents\Visual Studio
Projects\THSSM\core\THCommon\THVTKOpenMeshSource.cpp(16) : error C2501:
'THVTKOpenMeshSource' : missing storage-class or type specifiers
\Documents and Settings\Toon Huysmans\My Documents\Visual Studio
Projects\THSSM\core\THCommon\THVTKOpenMeshSource.cpp(16) : error C2825:
'THVTKOpenMeshSource::New': cannot form a qualified name
\Documents and Settings\Toon Huysmans\My Documents\Visual Studio
Projects\THSSM\core\THCommon\THVTKOpenMeshSource.cpp(16) : error C2039:
'New' : is not a member of 'operator``global namespace'''
\Documents and Settings\Toon Huysmans\My Documents\Visual Studio
Projects\THSSM\core\THCommon\THVTKOpenMeshSource.cpp(16) : error C2146:
syntax error : missing ';' before identifier 'New'
\Documents and Settings\Toon Huysmans\My Documents\Visual Studio
Projects\THSSM\core\THCommon\THVTKOpenMeshSource.cpp(16) : error C2501:
'THVTKOpenMeshSource' : missing storage-class or type specifiers
\Documents and Settings\Toon Huysmans\My Documents\Visual Studio
Projects\THSSM\core\THCommon\THVTKOpenMeshSource.cpp(16) : error C2040:
'THVTKOpenMeshSource' : 'int *' differs in levels of indirection from
'int'
 
 
Does anyone know how to handle the vtk macros with templated classes?
 
Thanks,
 
Toon.
 

Postal Address:
 
  Vision Lab, Department of Physics
  University of Antwerp (CMI)
  Groenenborgerlaan 171 (U306)
  B-2020 Antwerp, Belgium

Tel: +32 (0) 3 265 32 24

Fax: +32 (0) 3 265 33 18

Email:  <mailto:toon.huysmans at ua.ac.be> toon.huysmans at ua.ac.be

Web: http://webhost.ua.ac.be/visielab/staff/tohu/
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20051115/7fd99b36/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: THVTKOpenMeshSource.cpp
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20051115/7fd99b36/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: THVTKOpenMeshSource.h
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20051115/7fd99b36/attachment.txt>


More information about the vtkusers mailing list