Run-time type information and vtkWhatever::New()

Bill Hoffman bill.hoffman at
Thu Jan 20 18:16:04 EST 2000

<x-flowed>This looks like a bug in the compiler.  By default vtk is not compiled with 
are you sure you recompiled ALL of vtk with RTTI?
Perhaps calling the new in your application causes the RTTI to work,
but if the new is in the vtk DLL it does not work.

There is nothing magic about the::New, it eventually calls new, so the only
difference, is that one calls new from the vtk dll, and the other calls new
from your code.

-Bill Hoffman

At 04:42 PM 1/17/00 -0500, Brian Alexander Todd wrote:

>If I run this block of code under WinNT 4.0 (SP 5) and VC++ 6.0 (SP 3),
>         vtkDataSet * vtkds;
>         vtkStructuredPoints * vtksp1 = vtkStructuredPoints::New();
>         vtkStructuredPoints * vtksp2;
>         vtkds = vtksp1;
>         vtksp2 = dynamic_cast<vtkStructuredPoints *>( vtkds );
>         std::cout << vtksp1 << std::endl;
>         std::cout << vtksp2 << std::endl;
>The program returns,
>         00300570
>         00000000

This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.


More information about the vtkusers mailing list