<div>what you need is a multiplication (PostMultiply) of m_defaultTrf to the current actor transform not a replacement.<br></div>
<div><br> </div>
<div class="gmail_quote">2010/5/24 Anant Vemuri <span dir="ltr"><<a href="mailto:ajar108@gmail.com">ajar108@gmail.com</a>></span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi,<br><br>I am trying to use myVtkActor->SetOrigin(origin) to set the origin so that any rotations I apply is done about this point. This is what I do to build the pipeline<br>
<br><br>void buildPipeline( )<br>{<br> m_actor->SetMapper( m_mapper );<br> m_actor->SetOrigin( 100, 100, 100 );<br> m_defaultTrf->Scale(m_scale, m_scale, m_scale);<br> m_defaultTrf->PostMultiply();<br>
m_defaultTrf->Concatenate( this->getTransform() );<br> /// I add some more things to the m_defaultTrf<br> .<br> .<br> .<br> m_actor->SetUserTransform( m_defaultTrf );<br> }<br> std::cout << "\n\n\nOrigin = [" << m_actor->GetOrigin()[0] << ", " << m_actor->GetOrigin()[1] << ", " << m_actor->GetOrigin()[2] << "]\n\n\n";<br>
}<br><br>But when I apply the transform in the scene, it is not being about some other point entirely. I noticed that this is the same point when I remove the SetOrigin() line. But in the last line it gives me the origin as the one that I set a few line earlier. I am not able to figure out what is the mistake. Can anyone help me?<br>
<br>Thank you.<br><font color="#888888">Anant.<br></font><br>_______________________________________________<br>Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" 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" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><br>