[vtkusers] vtkTransformInterpolator
Arwen M.
arwen_moore at yahoo.ca
Wed Jun 20 10:36:28 EDT 2007
Hey,
I'm trying to use the vtkTransformInterpolator in python, but when I try to add transforms without rotation the interpolator returns transforms with messed up rotations
ex.
C:\Program Files\Windows Resource Kits\Tools>python
Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from vtk import*
>>> t=vtkTransformInterpolator()
>>> transform=vtkTransform()
>>> transform.Translate(10,0,0)
>>> t.AddTransform(0, vtkTransform())
>>> t.AddTransform(10, transform)
>>> tOut = vtkTransform()
>>> t.InterpolateTransform(5, tOut)
>>> print tOut
vtkTransform (00A4FB18)
Debug: Off
Modified Time: 526
Reference Count: 2
Registered Events: (none)
Inverse: (00000000)
Matrix: (012611A0)
Debug: Off
Modified Time: 527
Reference Count: 1
Registered Events: (none)
Elements:
-1.#IND -1.#IND -1.#IND 0.5
-1.#IND -1.#IND -1.#IND 0
-1.#IND -1.#IND -1.#IND 0
-1.#IND -1.#IND -1.#IND 1
Input: (00000000)
InverseFlag: 0
NumberOfConcatenatedTransforms: 1
0: vtkSimpleTransform at 0126FC18
DoublePoint: ( 0, 0, 0, 0)
Point: ( 0, 0, 0, 0)
In this example the translation is also off.
As well, when I try to set a small rotation at the start to avoid this problem, there are still some combinations of rotations and translations that return matrices similar to the one in the example I posted.
Any ideas as to what's going on with the interpolator?
Thanks!
-Arwen
Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070620/8e13cc65/attachment.htm>
More information about the vtkusers
mailing list