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

Robert Maynard robert.maynard at kitware.com
Thu Aug 29 11:44:34 EDT 2013


RemoveProp is the one that windows.h defines.



On Thu, Aug 29, 2013 at 11:42 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> I have a vague memory that either AddProp or RemoveProp was defined as
> a macro in some windows header file, making the name unusable.  I
> don't know if that is still the case with Visual Studio 2003 and later
> compilers.
>
>  David
>
> On Thu, Aug 29, 2013 at 9:16 AM, Aashish Chaudhary
> <aashish.chaudhary at kitware.com> wrote:
>> +1 for AddViewProp all others in legacy. Would have been nice to have it
>> called AddProp (why add View?) .  We have vtkProp and not vtkViewProp as the
>> class name. May be we can add that as the new method? thoughts?
>>
>> - Aashish
>>
>>
>>
>> On Thu, Aug 29, 2013 at 11:08 AM, David E DeMarle <dave.demarle at kitware.com>
>> wrote:
>>>
>>> I'm in Sean's camp. One class to rule them all is easier to get your head
>>> around.
>>>
>>>
>>> David E DeMarle
>>> Kitware, Inc.
>>> R&D Engineer
>>> 21 Corporate Drive
>>> Clifton Park, NY 12065-8662
>>> Phone: 518-881-4909
>>>
>>>
>>> On Wed, Aug 28, 2013 at 7:25 PM, Bill Lorensen <bill.lorensen at gmail.com>
>>> wrote:
>>>>
>>>> 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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>



More information about the vtk-developers mailing list