VTK: Find Bounding Shell In Local Coordinate System

The article shows a way to find the bounding shell of the 3D model in its local coordinate system. Let’s create a cone and an axes actor which displays three axes in the world coordinate system. #include <iostream> #include <vtkSmartPointer.h> #include <vtkSphereSource.h> #include <vtkActor.h> #include <vtkConeSource.h> #include <vtkRenderer.h> #include <vtkRenderWindow.h> Read more…

Use vtkButtonWidget To Create 2D Button

We can use vtkButtonWidget to create 2D buttons in the render window. The vtkWidgetRepresentation object controls the button’s position and show button pictures. Write our class ButtonCallBack that inherits vtkCommand and use it to listen for vtkCommand::StateChangedEvent, then we can add our button click function in it. Finally, the widget Read more…

XML To JSON
: Input your strings, the tool can convert XML to JSON for you.

X