Class IndexCalculator
Helper class which helps to map 2D index to 1D array and vice versa
Inherited Members
Namespace:
Assembly: .dll
Syntax
public class IndexCalculator
Constructors
IndexCalculator(int uSize, int vSize)
Creates new instance of IndexCalculator class
Declaration
public IndexCalculator(int uSize, int vSize)
Parameters
| Type | Name | Description |
|---|---|---|
| int | uSize | The U/X size to use for mapping |
| int | vSize | The V/Y size to use for mapping |
Fields
size
Declaration
public final int size
Field Value
| Type | Description |
|---|---|
| int |
uSize
Declaration
public final int uSize
Field Value
| Type | Description |
|---|---|
| int |
vSize
Declaration
public final int vSize
Field Value
| Type | Description |
|---|---|
| int |
Methods
getIndex(int uIndex, int vIndex)
Maps 2D index to 1D index
Declaration
public final int getIndex(int uIndex, int vIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | uIndex | The U/X index to map |
| int | vIndex | The V/Y index to map |
Returns
| Type | Description |
|---|---|
| int | The mapped 1D index |
getUIndex(int index)
Maps 1D index to U/X index in 2D
Declaration
public final int getUIndex(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to map |
Returns
| Type | Description |
|---|---|
| int | The U/X index |
getVIndex(int index)
Maps 1D index to V/Y index in 2D
Declaration
public final int getVIndex(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to map |
Returns
| Type | Description |
|---|---|
| int | The V/Y index |