File: vtkComponent.java

package info (click to toggle)
vtk7 7.1.1%2Bdfsg2-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 127,396 kB
  • sloc: cpp: 1,539,584; ansic: 124,382; python: 78,038; tcl: 47,013; xml: 8,142; yacc: 5,040; java: 4,439; perl: 3,132; lex: 1,926; sh: 1,500; makefile: 126; objc: 83
file content (106 lines) | stat: -rw-r--r-- 2,683 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package vtk.rendering;

import java.util.concurrent.locks.ReentrantLock;

import vtk.vtkCamera;
import vtk.vtkGenericRenderWindowInteractor;
import vtk.vtkInteractorStyle;
import vtk.vtkRenderWindow;
import vtk.vtkRenderer;

/**
 * Generic API for any new VTK based graphical components.
 *
 * @param <T>
 *            The concrete type of the graphical component that will contains
 *            the vtkRenderWindow.
 *
 * @author    Sebastien Jourdain - sebastien.jourdain@kitware.com, Kitware Inc 2012
 * @copyright This work was supported by CEA/CESTA
 *            Commissariat a l'Energie Atomique et aux Energies Alternatives,
 *            15 avenue des Sablieres, CS 60001, 33116 Le Barp, France.
 */

public interface vtkComponent<T> {

  /**
   * @return the lock that is used to prevent concurrency inside this
   *         rendering component. This lock can also be used outside to make
   *         sure any VTK processing happen in a save manner.
   */
  ReentrantLock getVTKLock();

  /**
   * Adjust the camera position so any object in the scene will be fully seen.
   */
  void resetCamera();

  /**
   * Update the clipping range of the camera
   */
  void resetCameraClippingRange();

  /**
   * @return the active camera of the renderer
   */
  vtkCamera getActiveCamera();

  /**
   * @return a reference to the Renderer used internally
   */
  vtkRenderer getRenderer();

  /**
   * Useful for screen capture or exporter.
   *
   * @return a reference to the RenderWindow used internally
   */
  vtkRenderWindow getRenderWindow();

  /**
   * vtkWindowInteractor is useful if you want to attach 3DWidget into your
   * view.
   *
   * @return a reference to the vtkWindowInteractor used internally
   */
  vtkGenericRenderWindowInteractor getRenderWindowInteractor();

  /**
   * Shortcut method to bind an vtkInteractorStyle to our interactor.
   *
   * @param style
   */
  void setInteractorStyle(vtkInteractorStyle style);

  /**
   * Update width and height of the given component
   *
   * @param w
   * @param h
   */
  void setSize(int w, int h);

  /**
   * @return the concrete implementation of the graphical container such as
   *         java.awt.Canvas / java.swing.JComponent /
   *         org.eclipse.swt.opengl.GLCanvas
   */
  T getComponent();

  /**
   * Remove any reference from Java to vtkObject to allow the VTK Garbage
   * collector to free any remaining memory. This is specially needed for
   * internal hidden reference to vtkObject.
   */
  void Delete();

  /**
   * Request a render.
   */
  void Render();

  /**
   * @return the vtkInteractor Java event converter.
   */
  vtkInteractorForwarder getInteractorForwarder();
}