/** * Interface for things mapping sim coordinates to screen coordinates * @author Michael Schuresko * @version %I%, %G% * @since 1.0 */ public interface IProjection { /** * Finds the ith component in screen coordinates of a vector * indicated by the portion of the array arrLfState starting * at nIdxOff; * @param i which component of screen coordinates to get (0=x, 1=y) * @param arrLfState global state vector in sim coordinates * @param nIdxOff offset index in arrLfState of the coord we're looking * for * @return ith component in screen coordinates */ public int getScreenComp(int i, double [] arrLfState, int nIdxOff); /** * Scales (possibly including rotation and flip) * a vector, without applying global translation * @param arrLfVec array containing vector to scale (transform) * @param nIdxOff offset of begining of vector to scale in * arrLfVec * @return integer array containing scaled vector discretized * to pixel differences. */ public int [] scaleVector(double [] arrLfVec, int nIdxOff); /** * Simple scale function for 2d circles etc. */ public int scaleRadius(double lfRad) throws Exception; public int width(); public int height(); public int top(); public int left(); public void scaleProjection(int nNewX, int nNewY); public void xlateProjection(int nXOff, int nYOff); public void resize(int nNewWidth, int nNewHeight); }