]> gerrit.simantics Code Review - simantics/3d.git/blob - vtk.rendering/src/vtk/rendering/vtkComponent.java
VTK.Rendering plug-in + win64 fragment
[simantics/3d.git] / vtk.rendering / src / vtk / rendering / vtkComponent.java
1 package vtk.rendering;
2
3 import java.util.concurrent.locks.ReentrantLock;
4
5 import vtk.vtkCamera;
6 import vtk.vtkGenericRenderWindowInteractor;
7 import vtk.vtkInteractorStyle;
8 import vtk.vtkRenderWindow;
9 import vtk.vtkRenderer;
10
11 /**
12  * Generic API for any new VTK based graphical components.
13  *
14  * @param <T>
15  *            The concrete type of the graphical component that will contains
16  *            the vtkRenderWindow.
17  *
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.
22  */
23
24 public interface vtkComponent<T> {
25
26   /**
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.
30    */
31   ReentrantLock getVTKLock();
32
33   /**
34    * Adjust the camera position so any object in the scene will be fully seen.
35    */
36   void resetCamera();
37
38   /**
39    * Update the clipping range of the camera
40    */
41   void resetCameraClippingRange();
42
43   /**
44    * @return the active camera of the renderer
45    */
46   vtkCamera getActiveCamera();
47
48   /**
49    * @return a reference to the Renderer used internally
50    */
51   vtkRenderer getRenderer();
52
53   /**
54    * Useful for screen capture or exporter.
55    *
56    * @return a reference to the RenderWindow used internally
57    */
58   vtkRenderWindow getRenderWindow();
59
60   /**
61    * vtkWindowInteractor is useful if you want to attach 3DWidget into your
62    * view.
63    *
64    * @return a reference to the vtkWindowInteractor used internally
65    */
66   vtkGenericRenderWindowInteractor getRenderWindowInteractor();
67
68   /**
69    * Shortcut method to bind an vtkInteractorStyle to our interactor.
70    *
71    * @param style
72    */
73   void setInteractorStyle(vtkInteractorStyle style);
74
75   /**
76    * Update width and height of the given component
77    *
78    * @param w
79    * @param h
80    */
81   void setSize(int w, int h);
82
83   /**
84    * @return the concrete implementation of the graphical container such as
85    *         java.awt.Canvas / java.swing.JComponent /
86    *         org.eclipse.swt.opengl.GLCanvas
87    */
88   T getComponent();
89
90   /**
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.
94    */
95   void Delete();
96
97   /**
98    * Request a render.
99    */
100   void Render();
101
102   /**
103    * @return the vtkInteractor Java event converter.
104    */
105   vtkInteractorForwarder getInteractorForwarder();
106 }