[vtkusers] How to Input the 4x4 matrix in vtkMatrix4x4????

Bill Lorensen bill.lorensen at gmail.com
Sat Apr 14 19:22:05 EDT 2012


SetElement should work. See for example:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/SimpleOperations/PerspectiveTransform
On Sat, Apr 14, 2012 at 4:45 PM, Sheena Gao <280908696 at qq.com> wrote:
> Hi guys,
>
> Sorry I'm not that good at programming and I got a silly question here. How
> can I import a 4x4 matrix in
> vtkMatrix4x4/vtktransform/vtkHomogeneousTransform? I want to use the
> SetUserTransform in vtkCamera. Let's say I got a 4x4 matrix which looks like
> this:
> [ 1  2  3  0]
> [ 4  5  6  0]
> [ 7  8  9  0]
> [ 0  0  0  1]
> How can I input that data? I tried SetElement in vtkMatrix4x4 and SetMatrix
> (const double elements[16]) in vtktransform, but either way works. I am
> using C++ and I guess there's something wrong with my own code. Could anyone
> be nice enough to give me an example please?
>
> Thank you,
> Sheena
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/How-to-Input-the-4x4-matrix-in-vtkMatrix4x4-tp5641158p5641158.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



-- 
Unpaid intern in BillsBasement at noware dot com



More information about the vtkusers mailing list