3 import java.util.concurrent.locks.ReentrantLock;
6 import vtk.vtkGenericRenderWindowInteractor;
7 import vtk.vtkInteractorStyle;
8 import vtk.vtkRenderWindow;
9 import vtk.vtkRenderer;
12 * Generic API for any new VTK based graphical components.
15 * The concrete type of the graphical component that will contains
16 * the vtkRenderWindow.
18 * @author Sebastien Jourdain - sebastien.jourdain@kitware.com, Kitware Inc 2012
19 * @copyright This work was supported by CEA/CESTA
20 * Commissariat a l'Energie Atomique et aux Energies Alternatives,
21 * 15 avenue des Sablieres, CS 60001, 33116 Le Barp, France.
24 public interface vtkComponent<T> {
27 * @return the lock that is used to prevent concurrency inside this
28 * rendering component. This lock can also be used outside to make
29 * sure any VTK processing happen in a save manner.
31 ReentrantLock getVTKLock();
34 * Adjust the camera position so any object in the scene will be fully seen.
39 * Update the clipping range of the camera
41 void resetCameraClippingRange();
44 * @return the active camera of the renderer
46 vtkCamera getActiveCamera();
49 * @return a reference to the Renderer used internally
51 vtkRenderer getRenderer();
54 * Useful for screen capture or exporter.
56 * @return a reference to the RenderWindow used internally
58 vtkRenderWindow getRenderWindow();
61 * vtkWindowInteractor is useful if you want to attach 3DWidget into your
64 * @return a reference to the vtkWindowInteractor used internally
66 vtkGenericRenderWindowInteractor getRenderWindowInteractor();
69 * Shortcut method to bind an vtkInteractorStyle to our interactor.
73 void setInteractorStyle(vtkInteractorStyle style);
76 * Update width and height of the given component
81 void setSize(int w, int h);
84 * @return the concrete implementation of the graphical container such as
85 * java.awt.Canvas / java.swing.JComponent /
86 * org.eclipse.swt.opengl.GLCanvas
91 * Remove any reference from Java to vtkObject to allow the VTK Garbage
92 * collector to free any remaining memory. This is specially needed for
93 * internal hidden reference to vtkObject.
103 * @return the vtkInteractor Java event converter.
105 vtkInteractorForwarder getInteractorForwarder();