[vtk-developers] vtkProperty :- Get/SetColor

Andrew Maclean andrew.amaclean at gmail.com
Tue May 14 18:21:54 EDT 2013


Thanks for that. I am looking at a couple of other classes too. I hope to
have something in a day or two.

Regards
   Andrew
On 14/05/2013 1:13 AM, "David Thompson" <david.thompson at kitware.com> wrote:

> > Does anyone know why these methods are not virtual?
>
> Nope.
>
> > If there is no reason, can anyone see a problem with making these
> methods virtual?
>
> I'll be happy to review a patch to make SetColor virtual. Most Get methods
> are not virtual because they return state held directly by the instance and
> should not be overridden. They are also typically called in tight loops
> while Set methods are not.
>
> > The reason I am looking at this is that I am considering making the
> methods in vtkNamedColors virtual so that that this class can be
> subclassed. It would also be easy to so the same change to Get/SetColor in
> vtkProperty.
> > I am thinking it would be nice to do things in a subclass of vtkProperty
> such as SetColor("Red") etc.
>
>
> That sounds neat.
>
>         David
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130515/95f38108/attachment.html>


More information about the vtk-developers mailing list