<div class="gmail_quote">On Wed, Jul 18, 2012 at 10:07 AM, Gonzalo Amadio <span dir="ltr"><<a href="mailto:gonzaloamadio@gmail.com" target="_blank">gonzaloamadio@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I forgot to put the code, I only add this to the previous one<div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
vtkSmartPointer<vtkTransform> transform = vtkSmartPointer<vtkTransform>::New();<br>transform->RotateY(90);<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">vtkSmartPointer<vtkTransformPolyDataFilter> transF = vtkSmartPointer<vtkTransformPolyDataFilter>::New();<br>
transF->SetInput(cylinderSource->GetOutput());<br>transF->SetTransform(transform);<br>transF->Update();<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">vtkSmartPointer<vtkPolyData> cylinder = transF->GetOutput();</blockquote>
</div></blockquote><div><br></div>These are transformation it the mathematical sense - i.e. "around the origin". You'd have to center your data (by subtracting it's center, a translation to the origin), apply the rotation, and then return your data to its original position by adding its center (a final translation).<br clear="all">
<br>David</div>