[vtk-developers] Convenience methods for vtkCamera

David Gobbi david.gobbi at gmail.com
Thu Jul 21 18:10:57 EDT 2011


Hi Aashish,

My objection is these methods are pure syntactic sugar.  They increase
the weight of the VTK interface without adding any new capabilities.
Also, if these methods are added here, they might entice people to add
similar methods to vtkProp3D and elsewhere.

I know that VTK is already rife with such methods, but at least in most
cases they are implemented by macros to ensure that they are consistently
applied throughout VTK.

My own preference is interfaces that are austere and orthogonal.  I'm not
even
a fan of the Rotate() and SetPosition() methods of vtkActor, when vtkActor
could have instead just had a SetTransform method and people could have
used the Transform methods to modify the actor matrix.

 - David


On Thu, Jul 21, 2011 at 3:52 PM, Aashish Chaudhary <
aashish.chaudhary at kitware.com> wrote:

> Hi David,
>
> On Thu, Jul 21, 2011 at 5:28 PM, David Gobbi <david.gobbi at gmail.com>
> wrote:
> > I noticed these two new methods in vtkCamera today, and if possible, I'd
> > like for them to be removed:
> >
> >  void SetModelTransformMatrix( double x00,  double x01,  double
> x02, double
> > x03,
> >    double x10,  double x11,  double x12,  double x13,
> >    double x20,  double x21,  double x22,  double x23,
> >    double x30,  double x31,  double x32,  double x33);
> >
> >  void SetEyeTransformMatrix( double x00,  double x01,  double x02,
>  double
> > x03,
> >    double x10,  double x11,  double x12,  double x13,
> >    double x20,  double x21,  double x22,  double x23,
> >    double x30,  double x31,  double x32,  double x33);
> >
> > Is it really so hard to create a vtkMatrix4x4 and then pass it as an
> > argument?
>
> No it is not. We added this as part of paraview - vtk stereo
> integration. I will talk to Utkarsh (along with Nikhil) tomorrow to
> figure out if we can remove them. Initially we didn't put them as I
> didn't want to have something like this.
>
> I would though like to hear reasoning behind your objections. Said
> that I am not favoring these two functions but would like to know what
> you are thinking.
>
> > There is even a vtkMatrix4x4::DeepCopy method to make it easy to create
> > a matrix from an array of doubles.
>
> Sure.
>
> >
> > - David
> >
>
>
>
> --
> | Aashish Chaudhary
> | R&D Engineer
> | Kitware Inc.
> | www.kitware.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110721/656aa261/attachment.html>


More information about the vtk-developers mailing list