fr.lip6.sma.simulacion.app.map
Class CellCoordinateConversion

java.lang.Object
  extended by fr.lip6.sma.simulacion.app.map.CellCoordinateConversion

public class CellCoordinateConversion
extends Object

TODO:

Version:
$Revision: 3 $
Author:
Eric Platon
See Also:
"Nothing special"

Field Summary
private  double mXscaleCell2Absolute
          X coordinate scale factor from cells to absolute coordinate
private  double mYscaleCell2Absolute
          Y coordinate scale factor from cells to absolute coordinate
 
Constructor Summary
CellCoordinateConversion(Configuration inConfig)
          Constructor.
 
Method Summary
 Point absolute2Cell(Point inPoint)
          Method to convert absolute point coordinates to a cell coordinate.
 Point cell2Absolute(Point inPoint)
          Method to convert cell point coordinates to absolute coordinate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mXscaleCell2Absolute

private double mXscaleCell2Absolute
X coordinate scale factor from cells to absolute coordinate


mYscaleCell2Absolute

private double mYscaleCell2Absolute
Y coordinate scale factor from cells to absolute coordinate

Constructor Detail

CellCoordinateConversion

public CellCoordinateConversion(Configuration inConfig)
Constructor. Requires the configuration file to extract the conversion parameters.

Parameters:
inConfig - The configuration file of the running Simulacion application.
Method Detail

absolute2Cell

public Point absolute2Cell(Point inPoint)
Method to convert absolute point coordinates to a cell coordinate.

Parameters:
inPoint - Point in absolute coordinate
Returns:
a Point that represent the same position as inPoint, but in the cell coordinate system

cell2Absolute

public Point cell2Absolute(Point inPoint)
Method to convert cell point coordinates to absolute coordinate.

Parameters:
inPoint - Point in cell coordinate
Returns:
a Point that represent the same position as inPoint, but in the absolute coordinate system