Package hec.map
Class WorldPt
java.lang.Object
hec.map.WorldPt
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,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) This method allows access to java.lang.reflect.Field objects within the implementing class.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) This allows access to fields withing the implementing object to set there data.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
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin interfaceFieldAccessor- Parameters:
fld- The java field object representing the member field to be setfobj- The data to set in that field- Returns:
- returns true if successful
-