[vtkusers] subclassing with VTK 6.1

Affolter Martin martin.affolter at ntb.ch
Tue Aug 5 11:39:38 EDT 2014


I've rebuilt the binaries with the option VTK_ALL_NEW_OBJECT_FACTORY activated and now my object-factory seems to work. Since this has to be activated, I wonder if there is a new/better way to create your own subclasses in VTK 6. Is there?

Von: vtkusers [mailto:vtkusers-bounces at vtk.org] Im Auftrag von Affolter Martin
Gesendet: Dienstag, 5. August 2014 16:08
An: VTK Users (vtkusers at vtk.org)
Betreff: [vtkusers] subclassing with VTK 6.1

Hello vtkusers,

I'm trying to get our projects up and running on vtk 6.1 (from 5.10.1).  After successfully initializing the modules used to render with OpenGL (with the VTK_MODULE_INIT Macro) I am now having some issues with our own vtk subclasses and factories. I used to register an object factory to create my own actor type (CCOpenGLActor) instead of the vtkOpenGLActor, which used to work with 5.10.1. Now, an instance of vtkOpenGLActor is created instead.

So far, I've tried to use the vtkObjectFactoryNewMacro instead of the vtkStandardNewMacro for my subclasses, which should create the object through my registered factory if I understood correctly. However, it doesn't change anything. Do I need to rebuild the vtk-binaries with the option VTK_ALL_NEW_OBJECT_FACTORY for it to work?

Best regards,
Martin Affolter
MSc FHO in Engineering
Wissenschaftlicher Mitarbeiter
___________________________________________
NTB Interstaatliche Hochschule für Technik Buchs
Institut für Ingenieurinformatik
Schönauweg 4
CH-9013 St. Gallen

Tel:  +41 81 755 32 49
Web: http://www.ntb.ch

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140805/07e4d48d/attachment.html>


More information about the vtkusers mailing list