[vtkusers] simple newbie question

Alex Malyushytskyy alexmalvtk at gmail.com
Wed Jul 24 20:37:03 EDT 2013


Code below does [c]= [a]+[b],
if c,a,b pointers to vtkMatrix4x4

for (int i=0;i<4;i++)
   for (int j=0;j<4;j++)
       c->SetElement( i,  j, a->GetElement( i,  j) +b->GetElement( i,  j) );



On Wed, Jul 24, 2013 at 5:25 PM, Alex Malyushytskyy <alexmalvtk at gmail.com>wrote:

> vtkMatrix4x4 is not general matrix class.
> Even though nobody restricts you from using it as such,
> it is designed to store and work on  homogeneous coordinates [x y z w].
>
> So it does not provide access to all possible operations with matrices,
> just some used in #D rendering.
>
>
> On Wed, Jul 24, 2013 at 4:17 PM, Mike Gagnon <mike at gagnon.com> wrote:
>
>> Uh yeah. I know you know I meant, is there a library call that does it.
>> :-) Just trying to get acquainted with the classes.
>>
>>
>> Alex Malyushytskyy <alexmalvtk at gmail.com> wrote:
>>>
>>>
>>> http://en.wikipedia.org/wiki/Matrix_%28mathematics%29#Addition.2C_scalar_multiplication_and_transposition
>>>
>>>
>>> On Wed, Jul 24, 2013 at 1:11 PM, Mike Gagnon <mike at gagnon.com> wrote:
>>>
>>>> Hi vtkusers,
>>>>
>>>> This is a very very simple question, because I just can't seem to find
>>>> the answer with google.  How do you add 2 matrices (vtkMatrix4x4) together?
>>>>  The + operator is not overloaded....
>>>>
>>>> Thank you,
>>>> Mike
>>>> ______________________________**_________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at http://www.kitware.com/**
>>>> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>>>>
>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>> http://www.vtk.org/Wiki/VTK_**FAQ <http://www.vtk.org/Wiki/VTK_FAQ>
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>>>>
>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130724/f5518e88/attachment.htm>


More information about the vtkusers mailing list