Package hec.map

Class WorldPt

java.lang.Object
hec.map.WorldPt
All Implemented Interfaces:
hec.io.AsciiSerializable, Serializable, Cloneable
Direct Known Subclasses:
WorldNode, WorldPt3d

public class WorldPt extends Object implements Serializable, hec.io.AsciiSerializable, Cloneable
Represents points in world coordinate space.
See Also:
  • Field Details

    • e

      public double e
    • n

      public double n
  • Constructor Details

    • WorldPt

      public WorldPt()
    • WorldPt

      public WorldPt(double pe, double pn)
    • WorldPt

      public WorldPt(WorldPt p)
  • Method Details

    • clone

      public Object clone()
      Creates a new object of the same class as this object.
      It then initializes each of the new object's fields by assigning it the same value as the corresponding field in this object. No
      constructor is called.
      Overrides:
      clone in class Object
    • init

      public void init(double pe, double pn)
    • init

      public void init(WorldPt p)
    • init

      public void init(String str)
      initialize this WorldPt with the String str. str is in the form e, n
      Parameters:
      str -
    • length

      public double length()
    • normalize

      public void normalize()
    • getNormal

      public WorldPt getNormal()
    • distToPoint

      public double distToPoint(WorldPt pt)
    • distToLineSegSigned

      public double distToLineSegSigned(WorldPt pt0, WorldPt pt1)
    • distToLineSeg

      public double distToLineSeg(WorldPt pt0, WorldPt pt1)
    • distToLineSeg

      public double distToLineSeg(WorldLineSeg l)
    • ptNearLineSeg

      public double ptNearLineSeg(WorldPt pt0, WorldPt pt1, WorldPt ptn)
    • ptNearLineSegSigned

      public double ptNearLineSegSigned(WorldPt pt0, WorldPt pt1, WorldPt ptn)
    • ptNearLineSeg

      public double ptNearLineSeg(WorldLineSeg l, WorldPt ptn)
    • ptNearLineSegSigned

      public double ptNearLineSegSigned(WorldLineSeg l, WorldPt ptn)
    • isValid

      public boolean isValid()
      Point is valid if its coordinates are valid
      Returns:
      returns true if valid.
    • setInvalid

      public void setInvalid()
    • toString

      public String toString()
      return the value of this WorldPt in the form: e, n
      Overrides:
      toString in class Object
      Returns:
      See Also:
    • parseString

      public String parseString(String str)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(WorldPt wpt)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getFieldObject

      public Object getFieldObject(Field fld)
      Specified by:
      getFieldObject in interface hec.io.AsciiSerializable
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Specified by:
      setFieldObject in interface hec.io.AsciiSerializable