public class IndexCalculator
extends java.lang.Object
Constructor and Description |
---|
IndexCalculator(int uSize,
int vSize)
Creates new instance of
IndexCalculator class |
Modifier and Type | Method and Description |
---|---|
int |
getIndex(int uIndex,
int vIndex)
Maps 2D index to 1D index
|
int |
getUIndex(int index)
Maps 1D index to U/X index in 2D
|
int |
getVIndex(int index)
Maps 1D index to V/Y index in 2D
|
public IndexCalculator(int uSize, int vSize)
IndexCalculator
classuSize
- The U/X size to use for mappingvSize
- The V/Y size to use for mappingpublic final int getVIndex(int index)
index
- The index to mappublic final int getUIndex(int index)
index
- The index to mappublic final int getIndex(int uIndex, int vIndex)
uIndex
- The U/X index to mapvIndex
- The V/Y index to map