[vtkusers] SetUserMatrix ineffective on vtkAnnotatedCubeActor

Xiaofeng Z xf10036 at hotmail.com
Thu Aug 18 19:32:59 EDT 2011


So are the Rotate_() methods!  They don't seemed to have any effect in the apparance of the rendered cube.  Is this by design or I'm missing something.



Xiaofeng

----------------------------------------
> From: xf10036 at hotmail.com
> To: vtkusers at vtk.org
> Date: Thu, 18 Aug 2011 16:25:58 -0400
> Subject: [vtkusers] SetUserMatrix ineffective on vtkAnnotatedCubeActor
>
>
> Hi vtkusers,
>
>
> I'm trying to use SetUserMatrix() to change the orientation of a vtkAnnotatedCubeActor, but the function seemed to be ineffective. Why?
>
> My renderering pipeline as the following:
>
>
> vtkAnnotatedCubeActor* actor = vtkAnnotatedCubeActor::New();
> vtkMatrix4x4* matrix = vtkMatrix4x4::New();
> static double elem[16] = {
> 0, 0,-1, 0,
> -1, 0, 0, 0,
> 0, 1, 0, 0,
> 0, 0, 0, 1 };
> matrix->DeepCopy(elem);
> actor->SetUserMatrix(matrix);
> matrix->Delete();
> vtkRenderer *ren = vtkRenderer::New();
> ren->SetViewport(0.0, 0.0, 1.0, 1.0);
> ren->SetBackground(0.1, 0.2, 0.3);
> ren->AddActor(prop);
> prop->Delete();
>
> vtkRenderWindow* win = vtkRenderWindow::New();
> win->LineSmoothingOn();
> win->PolygonSmoothingOn();
> win->SetSize(300,300);
> win->AddRenderer(ren);
> ren->Delete();
>
> interactor = vtkRenderWindowInteractor::New();
> interactor->SetRenderWindow(win);
> win->Delete();
>
> win->Render();
>
> Thanks for any insight!
>
>
> Xiaofeng
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers 		 	   		  


More information about the vtkusers mailing list