View Javadoc

1   // Copyright 2004, FreeHEP.
2   package hep.wired.feature;
3   
4   import hep.wired.services.Feature;
5   import hep.wired.services.ViewPort;
6   
7   /***
8    * Can calculate translations from screen and model.
9    *
10   * @author Mark Donszelmann
11   * @version $Id: Translateable.java 561 2004-12-07 19:23:50Z duns $
12   */
13  
14  public interface Translateable extends Feature {
15      
16      /***
17       * Returns Model translation from screen translation.
18       * An array of length 3: xyz[] = model(uvw[]).
19       * For 2D systems the 3rd coordinate may be ignored. 
20       * The returned array may have a lifetime up to the next call to this method
21       * on this object.
22       */
23      public double[] getModelTranslation(double[] uvw, ViewPort viewPort);
24      
25      /***
26       * Returns Screen translation from model translation.
27       * An array of length 3: uvw[] = model(xyz[]).
28       * For 2D systems the 3rd coordinate may be ignored. 
29       * The returned array may have a lifetime up to the next call to this method
30       * on this object.
31       */
32      public double[] getScreenTranslation(double[] xyz, ViewPort viewPort);
33  }