<div dir="ltr">Hi Dejan,<div><br></div><div>You'll have to compute the center of the text source (available by getting the bounds of the m_TextSource) and shifting the actor so that the center is at the world center, rotate, then shift back.</div><div><br></div><div>Hope that helps,</div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 16, 2015 at 6:11 AM, Dejan Zivkovic <span dir="ltr"><<a href="mailto:dejan.zivkovic90@gmail.com" target="_blank">dejan.zivkovic90@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I would like to have VectorText that is rotation around its central</div><div>vertical axis.</div><div><br></div><div>I wrote some code like this:</div><div><br></div><div><div><i>vtkSmartPointer<vtkVectorText> m_TextSource = vtkSmartPointer<vtkVectorText>::New();</i></div><div><i>m_TextSource->SetText("3DIA");</i></div><div><i>m_TextSource->Update();</i></div><div><i><br></i></div><div><i>vtkSmartPointer<vtkPolyDataMapper> m_Mapper = vtkSmartPointer<vtkPolyDataMapper>::New();</i></div><div><i>m_Mapper->SetInputConnection(m_TextSource->GetOutputPort());</i></div><div><i><br></i></div><div><i>vtkSmartPointer<vtkActor> </i><i>m_Actor = vtkSmartPointer<vtkActor>::New();</i></div><div><i>m_Actor->GetProperty()->SetColor(1.0, 1.0, 1.0);</i></div><div><i>m_Actor->SetMapper(m_Mapper);</i></div></div><div><i>m_Actor->RotateY(2.0);</i><br></div><div><br></div><div>and this way the text rotates around the world center.</div><div>How to move the center of rotation to the center of the text?<br></div><div><br></div><div>Thanks,</div><div>Dejan Zivkovic</div><div><br></div><div><br></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div>