[vtkusers] Writing a rotated vtkcubesource in a .vtp file

ishantembhekar ishan.tembhekar at caltech.edu
Wed Jul 22 13:58:28 EDT 2015


Hi Cory, 

Thank you so much for your immediate response! The
vtkTransformPolyDataFilter worked and it now gives me a rotated cube. I
replaced the mapper and the actor with the following lines: 

//create a rotation object
    vtkSmartPointer<vtkTransform> rotation =
    //the angle is measured in degrees for some reason
 //use this rotation object in a transformFilter
    vtkSmartPointer<vtkTransformPolyDataFilter> transformFilter =

However, it is rotating about the z-axis and the origin (as shown in the
image I attached). What can I do for it to rotate about the center of the
cube? I tried using SetCenter for both the vtkTransform and the
PolyDataFilter but they do not have that method. Any ideas? 

Thanks once again! 


View this message in context: http://vtk.1045678.n5.nabble.com/Writing-a-rotated-vtkcubesource-in-a-vtp-file-tp5733044p5733047.html
Sent from the VTK - Users mailing list archive at Nabble.com.

More information about the vtkusers mailing list