|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ProjectionXlateWrapper
public class ProjectionXlateWrapper
Adapter to take one interface of type IProjection and make a IProjection which maps its inputs to a translation of the results of the wrapped IProjection on the same inputs
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; Fails if nIdxOff >= 2, or if wrapped projection is null. |
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void resize(int nNewWidth, int nNewHeight)
resize
in interface IProjection
public void scaleProjection(int nNewX, int nNewY)
scaleProjection
in interface IProjection
public void xlateProjection(int nXOff, int nYOff)
xlateProjection
in interface IProjection
public int getScreenComp(int i, double[] arrLfState, int nIdxOff)
getScreenComp
in interface IProjection
i
- which component of screen coordinates to get (0=x, 1=y)arrLfState
- global state vector in sim coordinatesnIdxOff
- offset index in arrLfState of the coord we're looking
for
public int[] scaleVector(double[] arrLfVec, int nIdxOff)
scaleVector
in interface IProjection
arrLfVec
- array containing vector to scale (transform)nIdxOff
- offset of begining of vector to scale in
arrLfVec
public int scaleRadius(double lfRad) throws java.lang.Exception
scaleRadius
in interface IProjection
java.lang.Exception
public int width()
width
in interface IProjection
public int height()
height
in interface IProjection
public int top()
top
in interface IProjection
public int left()
left
in interface IProjection
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |