Package hec.map
Class WorldPt
java.lang.Object
hec.map.WorldPt
- All Implemented Interfaces:
hec.io.AsciiSerializable,Serializable,Cloneable
Represents points in world coordinate space.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object of the same class as this object.doubledoubledistToLineSeg(WorldPt pt0, WorldPt pt1) doubledistToLineSegSigned(WorldPt pt0, WorldPt pt1) doubledistToPoint(WorldPt pt) booleanbooleangetFieldObject(Field fld) inthashCode()voidinit(double pe, double pn) voidvoidinitialize this WorldPt with the String str.booleanisValid()Point is valid if its coordinates are validdoublelength()voidparseString(String str) doubleptNearLineSeg(WorldLineSeg l, WorldPt ptn) doubleptNearLineSeg(WorldPt pt0, WorldPt pt1, WorldPt ptn) doubleptNearLineSegSigned(WorldLineSeg l, WorldPt ptn) doubleptNearLineSegSigned(WorldPt pt0, WorldPt pt1, WorldPt ptn) booleansetFieldObject(Field fld, Object fobj) voidtoString()return the value of this WorldPt in the form: e, n
-
Field Details
-
e
public double e -
n
public double n
-
-
Constructor Details
-
WorldPt
public WorldPt() -
WorldPt
public WorldPt(double pe, double pn) -
WorldPt
-
-
Method Details
-
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. -
init
public void init(double pe, double pn) -
init
-
init
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
-
distToPoint
-
distToLineSegSigned
-
distToLineSeg
-
distToLineSeg
-
ptNearLineSeg
-
ptNearLineSegSigned
-
ptNearLineSeg
-
ptNearLineSegSigned
-
isValid
public boolean isValid()Point is valid if its coordinates are valid- Returns:
- returns true if valid.
-
setInvalid
public void setInvalid() -
toString
return the value of this WorldPt in the form: e, n -
parseString
-
equals
-
equals
-
hashCode
public int hashCode() -
getFieldObject
- Specified by:
getFieldObjectin interfacehec.io.AsciiSerializable
-
setFieldObject
- Specified by:
setFieldObjectin interfacehec.io.AsciiSerializable
-