vtkBoxWidget get the coordinates of the corners

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

vtkBoxWidget get the coordinates of the corners

German1999
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
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers