|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsidnet.core.misc.Location2D
public class Location2D
Constructor Summary | |
---|---|
Location2D(double xpos,
double ypos)
Creates a new instance of Location |
|
Location2D(Location2D fromLocation,
LocationContext fromLocationContext,
LocationContext toLocationContext)
|
Method Summary | |
---|---|
static double |
angleDeg(Location2D p1,
Location2D p2,
Location2D p3)
Returns the angle [in degrees -180 : + 180] made in between [p1-p2] & [p2-p3] segments |
static double |
angleRad(Location2D p1,
Location2D p2,
Location2D p3)
Returns the angle [in radians] made in between [p1-p2] & [p2-p3] segments |
static Location2D |
convertTo(Location2D loc,
LocationContext sourceLocationContext,
LocationContext targetLocationContext)
Converts the indicated location according to the target locationContext |
Location2D |
convertTo(LocationContext sourceLocationContext,
LocationContext targetLocationContext)
Converts the current location according to the target locationContext |
double |
distanceTo(Location2D toLocation)
Calculates the distance between the current Location2D and the specified Location2D |
double |
getX()
getter method. |
double |
getY()
getter method. |
double |
norm()
Returns euclidean distance from origin |
void |
setX(double x)
setter method. |
void |
setY(double y)
setter method. |
static double |
slope(Location2D p1,
Location2D p2)
Returns the slope of the line segment [p1-p2] |
NCS_Location2D |
toNCS(LocationContext locationContext)
Converts the current represented locations to NCS (Normalized Coordinate System) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Location2D(double xpos, double ypos)
public Location2D(Location2D fromLocation, LocationContext fromLocationContext, LocationContext toLocationContext)
Method Detail |
---|
public void setX(double x)
public void setY(double y)
public double getX()
public double getY()
public NCS_Location2D toNCS(LocationContext locationContext)
LocationContext
- the locationContext based on which the NCS can be obtainedpublic static Location2D convertTo(Location2D loc, LocationContext sourceLocationContext, LocationContext targetLocationContext)
public Location2D convertTo(LocationContext sourceLocationContext, LocationContext targetLocationContext)
public double distanceTo(Location2D toLocation)
public static double angleRad(Location2D p1, Location2D p2, Location2D p3)
public static double angleDeg(Location2D p1, Location2D p2, Location2D p3)
public static double slope(Location2D p1, Location2D p2)
public double norm()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |