Package hec.map

Class WorldPt

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

public class WorldPt extends Object implements Serializable, 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)
      Description copied from interface: FieldAccessor
      This method allows access to java.lang.reflect.Field objects within the implementing class.
      Specified by:
      getFieldObject in interface FieldAccessor
      Parameters:
      fld - The field to get.
      Returns:
      The data object that is stored in the given field
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Description copied from interface: FieldAccessor
      This allows access to fields withing the implementing object to set there data.
      Specified by:
      setFieldObject in interface FieldAccessor
      Parameters:
      fld - The java field object representing the member field to be set
      fobj - The data to set in that field
      Returns:
      returns true if successful