sidnet.core.misc
Class NCS_Location2D

java.lang.Object
  extended by sidnet.core.misc.NCS_Location2D

public class NCS_Location2D
extends java.lang.Object


Constructor Summary
NCS_Location2D(double x, double y)
          Creates a new instance of NCS_Location2D
 
Method Summary
 double distanceTo(NCS_Location2D toLocation)
          Calculates the distance between the current Location2D and the specified Location2D
 Location2D fromNCS(LocationContext locationContext)
          Converts the current NCS-represented locations to a real location given the LocationContext (contains the dimensions in which the location will be converted to)
 double getX()
          getter method.
 double getY()
          getter method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NCS_Location2D

public NCS_Location2D(double x,
                      double y)
Creates a new instance of NCS_Location2D

Method Detail

getX

public double getX()
getter method. gets the X-coordinate in NCS representation


getY

public double getY()
getter method. gets the Y-coordinate in NCS representation


fromNCS

public Location2D fromNCS(LocationContext locationContext)
Converts the current NCS-represented locations to a real location given the LocationContext (contains the dimensions in which the location will be converted to)

Parameters:
LocationContext - the locationContext based on which the real location coordintates can be obtained

distanceTo

public double distanceTo(NCS_Location2D toLocation)
Calculates the distance between the current Location2D and the specified Location2D