[vtk-developers] Convenience methods for vtkCamera

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Jul 22 09:44:03 EDT 2011


David,

I hear your objection, however not exposing such methods makes it
really complicated for applications like ParaView that use
client-server streams to update the objects. I do admit a method with
16 arguments doesn't make sense. Instead something that takes a
double[16] would possibly be acceptable and does not cause any issues
for client-server streams.

Utkarsh


On Thu, Jul 21, 2011 at 6:10 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> 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
>
>
> _______________________________________________
> 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