[vtkusers] fix position of vtkAxesActor

Nicolas Sarrasin nsarrasin at phenix-systems.com
Mon Oct 4 08:17:57 EDT 2010


  Hi Jim,

When I try to set my interactor according to your steps i get the 
following warnings and my AxesActors aren't displayed :

Generic Warning: In (vktdir)\Widgets\vtkOrientationMarkerWidget.cxx, 
line 533
Set interactor and Enabled before changing       interaction.

ERROR: In (vktdir)\GUISupport\Qt\QVTKWidget.cxx, line 968
QVTKInteractor (028ABC68): QVTKInteractor cannot control the event loop.

Any idea ?


Le 17/09/2010 17:22, Jim Peterson a écrit :
> I Am not sure if this is a factor based on the information provided, 
> but it appears the vtkOrientationMarkerWidget expects the 
> renderWindowInteractor to be connected to the RenderWindow before 
> widget is connected to the RenderWindowInteractor.  At least that 
> appears to be the controlling factor from my Java implementations.
>
> in other words, Widget.SetInteractor() prior to 
> RenderWindow.SetInteractor() or 
> RenderWindowInteractor.SetRenderWindow() fails. Widget.SetInteractor() 
> after either of the other functions works.
>
> HTH,
> Jim
>
> Benoist Laurent wrote:
>> Hi all,
>>
>> The example works very well.
>> However, when I try to put the code relative to the axes in a 
>> different fonction the application crashes.
>>
>> void displayAxes(vtkRenderWindowInteractor *renderWindowInteractor)
>> {     vtkSmartPointer<vtkAxesActor> axes =         
>> vtkSmartPointer<vtkAxesActor>::New();
>>
>>     vtkSmartPointer<vtkOrientationMarkerWidget> widget =         
>> vtkSmartPointer<vtkOrientationMarkerWidget>::New();
>>     widget->SetOutlineColor( 0.9300, 0.5700, 0.1300 );
>>     widget->SetOrientationMarker( axes );
>>     widget->SetInteractor( renderWindowInteractor );
>>     widget->SetViewport( 0.0, 0.0, 0.4, 0.4 );
>>     widget->SetEnabled( 1 );
>>     widget->InteractiveOn();
>> }
>>
>> So I guess there's something I did not understand with the 
>> vtkSmartPointer and/or the vtkWidget.
>>
>> An idea ?
>> Thanks,
>>
>> Benoist
>>
>>
>> Le 17 sept. 10 à 15:55, Nicolas Sarrasin a écrit :
>>
>>> Thanks very much!
>>> It's exactly what I wanted.
>>>
>>> Le 16/09/2010 18:55, David Doria a écrit :
>>>> On Thu, Sep 16, 2010 at 12:31 PM, Nicolas Sarrasin 
>>>> <nsarrasin at phenix-systems.com 
>>>> <mailto:nsarrasin at phenix-systems.com>> wrote:
>>>>
>>>>     Hi all,
>>>>
>>>>     How can i display 3Daxes in the bottom-right corner of my window ?
>>>>     I want to fix the position in the screen, not in the space.
>>>>
>>>>     I can render those axes with vtkAxesActor but I don't know to to
>>>>     fix its position.
>>>>
>>>>     Thanks by advance,
>>>>
>>>>     N. Sarrasin
>>>>
>>>>
>>>> Try this: 
>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DisplayCoordinateAxes
>>>>
>>>> David 
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com <http://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
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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
>
>

-- 
------------------------------------------------------------------------
Logo Phenix Systems 	Nicolas Sarrasin - Ingénieur Developpement 3D CFAO
Phenix systems
Parc Européen d'Entreprises
rue Richard Wagner - 63200 Riom FRANCE
tel : +33 (0)4 73 33 45 85 | fax : +33 (0)4 73 33 45 86
Pensez environnement !
N'imprimez ce mail que si c'est vraiment nécessaire


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101004/36e430c2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_contact.gif
Type: image/gif
Size: 2985 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101004/36e430c2/attachment.gif>


More information about the vtkusers mailing list