[vtk-developers] Status of AddActor(), AddActor2D(), AddVolume() vs AddViewProp()

Bill Lorensen bill.lorensen at gmail.com
Wed Aug 28 19:25:06 EDT 2013


I think from a user point of view, not being concerned about inheritance,
the old names make sense.



On Wed, Aug 28, 2013 at 4:59 PM, Sean McBride <sean at rogue-research.com>wrote:

> On Wed, 28 Aug 2013 16:37:05 -0400, Bill Lorensen said:
>
> >I think AddActor(), AddActor2D(), and AddVolume() are more descriptive
> than
> >AddViewProp even though they are just wrappers.
>
> Be that as it may, I think it's pretty weird for someone starting with VTK
> 6.
>
> Class hierarchy reminder:
>
> vtkObject -> vtkProp -> vtkProp3D -> vtkActor
> vtkObject -> vtkProp -> vtkProp3D -> vtkVolume
> vtkObject -> vtkProp -> vtkActor2D
>
> The newer AddViewProp() takes a vtkProp*, which makes sense, as it works
> with all 3 types.
>
> The older methods AddActor(), AddActor2D(), and AddVolume() strangely all
> also take a vtkProp*, that's pretty weird given their name.  ex: you'd
> think AddVolume() would take a vtkVolume*, no?  Why should it accept any
> vtkProp subclass?
>
> It's also weird that AddActor() and AddVolume() come from vtkRenderer,
> while AddActor2D() comes from the superclass vtkViewPort.
>
> How to explain all this to someone new to VTK 6?
>
> It seems like cruft to me.  IMNSHO, using only AddViewProp() seems
> preferable, which is why I'd like to do the cleanup and eventually wrap the
> old three in VTK_LEGACY.
>
> Cheers,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130828/7e33e454/attachment.html>


More information about the vtk-developers mailing list