Upcoming changes to vtk3.0

Jan Ehrhardt ehrhardt at medinf.mu-luebeck.de
Thu Jul 22 02:36:14 EDT 1999


Hi,

it´s a good idea to look into the 'const consistency'. It´s really
stupid to do everytime a strcpy if I do SetFileName....
By the way, please have a look into the 
vtkOpenGLPolyDataMapper, the casts
#ifdef _WIN32
  ((vtkWin32OpenGLRenderWindow *)(ren->GetRenderWindow()))->MakeCurrent();
#else
  ((vtkOpenGLRenderWindow *)(ren->GetRenderWindow()))->MakeCurrent();
#endif   

are really really ugly, if you want to derive your own RenderWindow-classes
(as I do). I have comment it out in every version since vtk2.1 and all works
fine. It seems not necessary to do the "MakeCurrent()" call here.

Jan


On Wed, 21 Jul 1999, you wrote:
>Hello,
>
>isn't this a great opportunity to look into the 'const consistency' of
>the code as well? Since so many files will already change, and version
>3.0 will be incompatible with version 2 anyway .....
>
>I think the most obvious changes to the constness of parameters and/or
>functions are:
>- Make the char* arguments to Set....() function const char* (like the
>vtkSetStringMacro)
>- Make the vtkGetMacro result in a const function: type Get##Name()
>const etc. 
>This will require some other functions to be const as well:
>- make the GetClassName() function const (vtkObject and ALL derived
>classes)
>- make the vtkDebugMacro const
>
>I think that especially the GetClassName(), vtkGetMacro() and
>vtkDebugMacro() (and similar debug macro's) should be 'const' functions,
>since they will not change the objects, right?
>
>There are probably more candidates to be reconsidered, but I think that
>incorperating these changes will improve the code a lot, since so many
>functions are affected (due to the macros).
>
>Thanks in advance, Marc
>
>ir. Marc Schrijver
>Faculty of Electrical Engineering (S&S NT)
>University of Twente
>The Netherlands
>
>
>
>-----------------------------------------------------------------------------
>This is the private VTK discussion list.  Please keep messages on-topic.
>Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
>To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
><majordomo at gsao.med.ge.com>.  For help, send message body containing
>"info vtkusers" to the same address.     Live long and prosper.
>-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list