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.double
double
distToLineSeg
(WorldPt pt0, WorldPt pt1) double
distToLineSegSigned
(WorldPt pt0, WorldPt pt1) double
distToPoint
(WorldPt pt) boolean
boolean
getFieldObject
(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.int
hashCode()
void
init
(double pe, double pn) void
void
initialize this WorldPt with the String str.boolean
isValid()
Point is valid if its coordinates are validdouble
length()
void
parseString
(String str) double
ptNearLineSeg
(WorldLineSeg l, WorldPt ptn) double
ptNearLineSeg
(WorldPt pt0, WorldPt pt1, WorldPt ptn) double
ptNearLineSegSigned
(WorldLineSeg l, WorldPt ptn) double
ptNearLineSegSigned
(WorldPt pt0, WorldPt pt1, WorldPt ptn) boolean
setFieldObject
(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.void
toString()
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:FieldAccessor
This method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObject
in interfaceFieldAccessor
- Parameters:
fld
- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessor
This allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObject
in 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
-