[vtkusers] VTK ActiViz to reset object to original view

Nick X. Tsui nickxtsui at gmail.com
Tue Dec 3 15:41:28 EST 2013


Seems not working still.

On Tue, Dec 3, 2013 at 3:35 PM, alethea <alethea at anatomage.com> wrote:
> Have you tried setting axes.Modified()?
> I've found you have to call this after setting the user matrix to tell the
> pipeline to recompute.
>
>
> nickxtsui wrote
>> I am trying to reset the 3D object to its original view (something
>> orthogonal, sagital, say) after its interaction.
>>
>> Here is my code how I try to reset, unsuccessful though:
>>
>> private vtkAxesActor axes;
>> private vtkOrientationMarkerWidget widget;
>>
>> public void ResetView()
>>         {
>>           //  axes.InitPathTraversal();
>>             if (axes != null)
>>             {
>>                 if (axes.GetUserMatrix() != null)
>>                     axes.GetUserMatrix().Identity();
>>                 axes.GetMatrix().Identity();
>>                 axes.SetOrigin(0,0,0);
>>                 axes.SetOrientation(0, 0, 0);
>>                 axes.SetScale(1, 1, 1);
>>                 axes.SetPosition(0, 0, 0);
>>             }
>>
>>             if (widget != null)
>>             {
>>                 widget.SetOrientationMarker(axes);
>>             }
>>
>>
>>             ForceWindowToRender();
>>         }
>>
>> How should I do this? Thanks a lot.
>> _______________________________________________
>> 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
>
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/VTK-ActiViz-to-reset-object-to-original-view-tp5724801p5724805.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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