[vtkusers] Actor rotation

Kevin Wang kwang.ca at gmail.com
Tue Aug 30 17:09:56 EDT 2005


Hi,

Just my 2 cents, you can use vtkActor's SetUserTransform or SetUserMatrix 
methods. If you already have the transformation matricis for all steps, you 
can multiply them together and then just use SetUserMatrix(). Otherwise 
create one vtkTransform for each step and perform the necessory transform 
using RotateZ or RotateY methods. next concatenate the 3 transforms to get 
the final transform to be set for the vtkActor. the order for concatenating 
the transform is important. in your case, it should be Tz" * Ty' * Tz. 

HTH,

Kevin

On 8/30/05, Rao Jianguo <rao.jianguo at hgu.mrc.ac.uk> wrote:
> 
> Dear All,
> 
> I want to rotate a vector first around z axis ( this is prety easy by
> calling the RotateZ function )
> and then rotate the actor along the new axes y ( let's call it y'). And
> finally rotate
> around the new axes Z ( let's call it z'' ).
> 
> I am pretty sure this is a simple question and should be implimented by
> somebody
> but I can't find any example. Anybody there can enlight me? A specific
> example will
> be great help.
> 
> Your help is highly appreciated.
> 
> 
> Jianguo
> 
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050830/79ff14ee/attachment.htm>


More information about the vtkusers mailing list