Interface IProjection

All Known Implementing Classes:
ProjectionSimpleStretch, ProjectionXlateWrapper

public interface IProjection

Interface for things mapping sim coordinates to screen coordinates

Since:
1.0

Method Summary
 int getScreenComp(int i, double[] arrLfState, int nIdxOff)
          Finds the ith component in screen coordinates of a vector indicated by the portion of the array arrLfState starting at nIdxOff;
 int height()
           
 int left()
           
 void resize(int nNewWidth, int nNewHeight)
           
 void scaleProjection(int nNewX, int nNewY)
           
 int scaleRadius(double lfRad)
          Simple scale function for 2d circles etc.
 int[] scaleVector(double[] arrLfVec, int nIdxOff)
          Scales (possibly including rotation and flip) a vector, without applying global translation
 int top()
           
 int width()
           
 void xlateProjection(int nXOff, int nYOff)
           
 

Method Detail

getScreenComp

int getScreenComp(int i,
                  double[] arrLfState,
                  int nIdxOff)
Finds the ith component in screen coordinates of a vector indicated by the portion of the array arrLfState starting at nIdxOff;

Parameters:
i - which component of screen coordinates to get (0=x, 1=y)
arrLfState - global state vector in sim coordinates
nIdxOff - offset index in arrLfState of the coord we're looking for
Returns:
ith component in screen coordinates

scaleVector

int[] scaleVector(double[] arrLfVec,
                  int nIdxOff)
Scales (possibly including rotation and flip) a vector, without applying global translation

Parameters:
arrLfVec - array containing vector to scale (transform)
nIdxOff - offset of begining of vector to scale in arrLfVec
Returns:
integer array containing scaled vector discretized to pixel differences.

scaleRadius

int scaleRadius(double lfRad)
                throws java.lang.Exception
Simple scale function for 2d circles etc.

Throws:
java.lang.Exception

width

int width()

height

int height()

top

int top()

left

int left()

scaleProjection

void scaleProjection(int nNewX,
                     int nNewY)

xlateProjection

void xlateProjection(int nXOff,
                     int nYOff)

resize

void resize(int nNewWidth,
            int nNewHeight)