<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Verdana">ops...<br>
thx a lot<br>
</font></font><br>
David Gobbi wrote:
<blockquote
cite="mid:48a17b781002260748y31fc2112v682486e6b0f90c0b@mail.gmail.com"
type="cite">
<pre wrap="">Hi Andrea,
It's just the wrong DeepCopy. You want to do this:
transfMatrix->DeepCopy(matrixElements);
The other DeepCopy (the one that you were using) copies transfMatrix
to matrixElements, i.e. it copies in the opposite direction.
David
vtkMatrix4x4::DeepCopy(matrixElements, trasfMatrix);
On Fri, Feb 26, 2010 at 7:51 AM, Andrea Bottino
<a class="moz-txt-link-rfc2396E" href="mailto:andrea.bottino@polito.it"><andrea.bottino@polito.it></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello everybody,
I have a problem with transformations. Taken a vtkPolyData (source), if I
specify a transformation using Translate it works:
vtkTransform* transform = vtkTransform::New();
transform->Translate(-B[0], -B[1], -B[2]);
vtkTransformPolyDataFilter* tf = vtkTransformPolyDataFilter::New();
tf->SetInput(source);
tf->SetTransform(transform);
tf->Update();
drawPolyData(tf->GetOutput());
(here model is correctly tanslated). If I try to specify the matrix, nothing
works:
double matrixElements[16] = {
1, 0, 0, -B[0],
0, 1, 0, -B[1],
0, 0, 1, -B[2],
0, 0, 0, 1 };
vtkMatrix4x4* trasfMatrix = vtkMatrix4x4::New();
vtkMatrix4x4::DeepCopy(matrixElements, trasfMatrix);
matrix stays as identity...
if I set manually the values with SetElements, it works...
Am I doing something wrong?
bye,
a.
--
Andrea Bottino
Politecnico di Torino, DAUIN
Corso Duca degli Abruzzi, 24
10129 Torino ITALY
Tel +39 011 5647175 / Fax +39 011 5647099.
<a class="moz-txt-link-freetext" href="http://www.polito.it/cgvg">http://www.polito.it/cgvg</a>
_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at
<a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the VTK FAQ at:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a>
</pre>
</blockquote>
<pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the VTK FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a></pre>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
Nessun virus nel messaggio in arrivo.
Controllato da AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a>
Versione: 9.0.733 / Database dei virus: 271.1.1/2709 - Data di rilascio: 02/25/10 08:34:00
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Andrea Bottino
Politecnico di Torino, DAUIN
Corso Duca degli Abruzzi, 24
10129 Torino ITALY
Tel +39 011 5647175 / Fax +39 011 5647099
<a class="moz-txt-link-freetext" href="http://www.polito.it/cgvg">http://www.polito.it/cgvg</a></pre>
</body>
</html>