[vtkusers] the sphere not be dsiplayed with the vvtkboxwidget
Eric E. Monson
emonson at cs.duke.edu
Mon Jun 28 09:25:13 EDT 2010
Hey Ali,
You need to uncomment the line:
renderer->AddActor(actor);
and then add a line after the vtkBoxRepresentation is created:
boxRepresentation->PlaceWidget(sphereSource->GetOutput()->GetBounds());
Take a look at the BoxWidget2 test code (linked from the vtkBoxWidget2 doxygen page: http://www.vtk.org/doc/nightly/html/classvtkBoxRepresentation.html) to see how to link the box to a transform of the sphere:
http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Widgets/Testing/Cxx/BoxWidget2.cxx?root=VTK&content-type=text/plain
-Eric
------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group
On Jun 27, 2010, at 5:17 PM, Sebastien Jourdain wrote:
> Maybe the sphere is there, but it can be to small to see it ?
> Did you Place/setBounds of the widget so both the sphere and the
> widget share the same scale ?
>
> Seb
>
> On Fri, Jun 25, 2010 at 6:15 PM, Ali Habib <ali.mahmoud.habib at gmail.com> wrote:
>> Hi
>> I tried to apply the example on the following link
>> http://www.cmake.org/Wiki/VTK/Examples/Widgets/BoxWidget2
>> But the result is just the vtkboxwidgwet, how to modify it to display both
>> the sphere and the vtkboxwidget
>> BEst regards
>> _______________________________________________
>> 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
>>
>>
> _______________________________________________
> 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