[Paraview] vtkBoxWidget2 RotationEnabledOff doesn't work

Jorge Peña jorge.pena.pastor at gmail.com
Tue Aug 30 05:05:50 EDT 2011


Hello Eric,

I figured out after reading the source code. I couldn't find any use of these 
variables, but still I wasn't sure if there was some paraview/cmake magic xD.

I'm using 3.8.1 and yesterday morning I finally decided to subclass 
vtkBoxRepresentation to vtkNonrotatingBoxRepresentation and provide a new 
widget with the ADD_3DWIDGET macro (although I needed to duplicate and modify 
some xml definitions to get it working). Anyway, thanks for answering my 
question. I will take into account if I decide to update Paraview in a future.

Cheers.

On Lunes, 29 de Agosto de 2011 19:10:47 Eric E. Monson escribió:
> Hello Jorge,
> 
> It's been quite a while since I dealt with widgets in ParaView, but I just
> thought I'd let you know that it wasn't until very recently (sometime late
> in July 2011) that features like disabling Rotation was actually
> implemented in the BoxWidget2 in VTK. The API has indicated it was
> possible for quite some time, but it was never really coded up for some
> reason.
> 
> So, the first step might be to figure out whether the version of ParaView
> you're building against has a recent-enough version of VTK to even have
> this functionality.
> 
> Good luck,
> -Eric
> 
> · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
> Eric E Monson
> Duke Visualization Technology Group
> 
> On Aug 25, 2011, at 12:19 PM, Jorge Gerardo Peña Pastor wrote:
> > Hi,
> > 
> > I'm getting stuck with the following piece of code:
> > 
> > vtkSMProxy *boxProxy =
> > builder->createProxy("implicit_functions","Box",pqApplicationCore::instan
> > ce()->getActiveServer(),"widgets");
> > 
> > QList<pq3DWidget *> widgets =  pq3DWidget::createWidgets(refProxy,
> > boxProxy);
> > 
> > vtkBoxWidget2 *boxwidget =
> > dynamic_cast<vtkBoxWidget2*>(widgets[0]->getWidgetProxy()->GetWidget());
> > assert(boxwidget);
> > 
> > boxwidgets->RotationEnabledOff();
> > 
> > bool rotEnabled = boxwidget->GetRotationEnabled();
> > if (rotEnabled == false)
> > 
> >    std::cout << "ROT DISABLED" << std::endl;
> > 
> > // Not sure if needed, but just in case...
> > widgets[0]->getWidgetProxy()->UpdateVTKObjects();
> > 
> > 
> > Well, even if I get the print message, when I run my paraview based
> > application, it let me rotate the box widget representation.
> > I  also tried disabling events using "boxwidget->ProcessEventsOff();"
> > and it also worked, so I think I'm using the right reference...
> > 
> > Am I missing something?
> > _______________________________________________
> > 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 ParaView Wiki at:
> > http://paraview.org/Wiki/ParaView
> > 
> > Follow this link to subscribe/unsubscribe:
> > http://www.paraview.org/mailman/listinfo/paraview


More information about the ParaView mailing list