[vtk-developers] Patch to modernize Widgets/Testing/Cxx

Bill Lorensen bill.lorensen at gmail.com
Thu Sep 2 08:06:18 EDT 2010


Karthik,

If we add the addition Start method to vtkTestingInteractor, then we
should add the same method (perhaps a dummy method) to
vtkRenderWindowInteractor. The idea is that the test/example should
look the same whether run as a test or as an example.

Bill

On Tue, Aug 31, 2010 at 2:09 AM, Karthik Krishnan
<karthik.krishnan at kitware.com> wrote:
> On Tue, Aug 24, 2010 at 2:24 AM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> Karthik,
>>
>> I'm trying to complete a project I started last year to modernize the
>> vtk cxx tests. I have gone through all of the Widgets cxx tests and
>> changed them to use smart pointers and the vtkTestingInteractor.  This
>> reduces the number of lines in each test and makes them more readable.
>>
>> Can you apply the attached patch and give me some feedback? Marcus is
>> also working to modernize the Charts testing.
>>
>
> Thanks Bill.
>
> I'll submit this after my experimental build ends  up nice and green.
>
> In addition to your attached patch, I'll also try and trim it a bit more but
> I was hoping to get some feedback.
>
> (a) I'd also like to replace lines of the form
>
>   vtkSmartPointer<vtkInteractorEventRecorder> recorder =
>     vtkSmartPointer<vtkInteractorEventRecorder>::New();
>   recorder->SetInteractor(iren);
>   recorder->ReadFromInputStringOn();
>   recorder->SetInputString(BoxWidgetEventLog2);
>   recorder->Play();
>   recorder->Off();
>   iren->Start();
>   return EXIT_SUCCESS;
>
> with just
>
>   return vtkTesting::InteractorEventLoop( argc, argv, iren,
> BoxWidgetEventLog2 );
>
> Perhaps we should move that recorder stuff into vtkTestingInteractor
> instead; something like
>   iren->Start(BoxWidgetEventLog2)
>
> It would also be great to pass the event log as a command line; I'll try and
> submit a patch ?
>
> Thanks
> --
> karthik
>



More information about the vtk-developers mailing list