Hello,
I am trying to figure out how to add a slice widget that has the
interactivity behavior just liek in the Paraview application.
When I add the following code, I get the visual representation of the
widget. However, performing mouse events on the bounding box or normal of
the widget doesn't make the widget change its position, orientation. Instead
the whole view's camera position is changing.
vtkSMProxy* sliceWidget =
m_paraviewObjectBuilder->createProxy("representations",
"ImplicitPlaneWidgetRepresentation",
m_paraviewActiveObjects->activeServer(),
"slice
widget");
doubleProp = vtkSMDoubleVectorProperty::SafeDownCast(
sliceWidget->GetProperty("PlaceWidget"));
double sourceBounds[6];
sourceRepresentation.getDataBounds(sourceBounds);
doubleProp->SetElements(sourceBounds);
pqSMAdaptor::setElementProperty(sliceWidget->GetProperty("Visibility"),
true);
sliceWidget->UpdateVTKObjects();
// Add the widget to the view.
pqSMAdaptor::addProxyProperty(
m_renderView->getProxy()->GetProperty("Representations"),
sliceWidget);
Any advise is much appreciated,
Jenya
_______________________________________________
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