JHeightMap
Class JCSVSpecialLoadMap

java.lang.Object
  extended by JHeightMap.JCSVSpecialLoadMap

public class JCSVSpecialLoadMap
extends java.lang.Object

Class JCSVSpecialLoadMap extends class AbstractLoadMap (zero level). Class used to retrieve data (height map) from the file in special format CSV(contains comments and parameters).

Author:
Martin Kinkor

Field Summary
static java.lang.String DX
           
static java.lang.String DY
           
 
Constructor Summary
JCSVSpecialLoadMap()
          Constructor initializes the array values (z-coordinates).
JCSVSpecialLoadMap(java.lang.String fileName)
          Constructor loads the array values (z-coordinates) from image.
JCSVSpecialLoadMap(java.lang.String fileName, char separateChar)
          Constructor loads the array values (z-coordinates) from image.
 
Method Summary
 void createData(java.lang.String fileName)
          The method retrieves the values (z-coordinates) from the height map.
 float[] getDataArea()
          The method returns an array of values (z-coordinates) from the height map.
 int getHeight()
          The method returns height loaded maps.
 float getStepX()
          The method returns step in the x-axis.
 float getStepY()
          The method returns step in the y-axis.
 int getWidth()
          The method returns width loaded maps.
 boolean isCorrectFormat(java.lang.String fileName)
          The method controls a file format,which values of height maps are loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DX

public static final java.lang.String DX
See Also:
Constant Field Values

DY

public static final java.lang.String DY
See Also:
Constant Field Values
Constructor Detail

JCSVSpecialLoadMap

public JCSVSpecialLoadMap()
Constructor initializes the array values (z-coordinates).


JCSVSpecialLoadMap

public JCSVSpecialLoadMap(java.lang.String fileName)
Constructor loads the array values (z-coordinates) from image.

Parameters:
fileName - Name of a file where the values of height maps are saved.

JCSVSpecialLoadMap

public JCSVSpecialLoadMap(java.lang.String fileName,
                          char separateChar)
Constructor loads the array values (z-coordinates) from image.

Parameters:
fileName - Name of a file where the values of height maps are saved.
separateChar - Char separated values (z-coordinates) of height map.
Method Detail

createData

public void createData(java.lang.String fileName)
The method retrieves the values (z-coordinates) from the height map.

Parameters:
fileName - Name of a file where the values of height maps are saved.

isCorrectFormat

public boolean isCorrectFormat(java.lang.String fileName)
The method controls a file format,which values of height maps are loaded.

Parameters:
fileName - Name of a file where the values of height maps are saved.
Returns:
The method returns "true" if the file format is correct (file format: CSV), else the method returns "false"

getDataArea

public float[] getDataArea()
The method returns an array of values (z-coordinates) from the height map.

Returns:
Array of values (z-coordinates).

getHeight

public int getHeight()
The method returns height loaded maps.

Returns:
Height loaded map.

getWidth

public int getWidth()
The method returns width loaded maps.

Returns:
Width loaded map.

getStepX

public float getStepX()
The method returns step in the x-axis.

Returns:
Step in the x-axis

getStepY

public float getStepY()
The method returns step in the y-axis.

Returns:
Step in the y-axis