[vtkusers] Help with vtkActor->SetOrigin()
wangjunchen at gmail.com
Mon May 24 08:58:01 EDT 2010
what you need is a multiplication (PostMultiply) of m_defaultTrf to the
current actor transform not a replacement.
2010/5/24 Anant Vemuri <ajar108 at gmail.com>
> 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
> void buildPipeline( )
> m_actor->SetMapper( m_mapper );
> m_actor->SetOrigin( 100, 100, 100 );
> m_defaultTrf->Scale(m_scale, m_scale, m_scale);
> m_defaultTrf->Concatenate( this->getTransform() );
> /// I add some more things to the m_defaultTrf
> m_actor->SetUserTransform( m_defaultTrf );
> std::cout << "\n\n\nOrigin = [" << m_actor->GetOrigin() << ", " <<
> m_actor->GetOrigin() << ", " << m_actor->GetOrigin() << "]\n\n\n";
> 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?
> Thank you.
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the VTK FAQ at:
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers