[vtkusers] vtkBoxWidget get the coordinates of the corners
German1999
b.almatrouk at outlook.com
Fri Jun 21 11:20:41 EDT 2019
Hello, I have a software with multiple 3D boxes, every time i click on one of
the boxes a bounding box gets activated as follow:
void selected( vtkRenderWindowInteractor *interactor){
// enable box widget
boxWidget = vtkSmartPointer<vtkBoxWidgetRestricted>::New();
boxWidgetCallback1 = vtkSmartPointer<vtkBoxWidgetCallback1>::New();
boxWidgetCallback1->setCube(this);
boxWidget->SetInteractor(interactor);
double bounds[6]={-1,1,-1,1,-1,1};
boxWidget->PlaceWidget(bounds);
vtkSmartPointer<vtkTransform> t=vtkSmartPointer<vtkTransform>::New();
t->DeepCopy(actor->GetUserTransform());
boxWidget->SetTransform(t);
boxWidget->SetHandleSize(0.1);
boxWidget->AddObserver( vtkCommand::InteractionEvent, boxWidgetCallback1
);
boxWidget->On();
}
Now I also would like that when I select the box, the corners of the
bounding box get printed. I know you can get the bounds from the bounding
box but is there a possible way to actually get the corners coordinates?
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list