Package hec.geometry
Class LocalPt
java.lang.Object
hec.geometry.LocalPt
Represents points in local coordinate space.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidinit(int px, int py) voidbooleanisValid()Point is valid if its coordinates are validdoublelength()doubleptNearLineSeg(LocalPt pt0, LocalPt pt1, LocalPt ptn) Takes two points pt0,pt1 and returns that would occur on a line segment between pt1,pt0 that is closest to this point.ptn is the closest point and the return value is the distance.
-
Field Details
-
x
public int x -
y
public int y
-
-
Constructor Details
-
LocalPt
public LocalPt() -
LocalPt
public LocalPt(int px, int py) -
LocalPt
-
-
Method Details
-
init
public void init(int px, int py) -
init
-
length
public double length() -
getNormal
-
ptNearLineSeg
Takes two points pt0,pt1 and returns that would occur on a line segment between pt1,pt0 that is closest to this point.ptn is the closest point and the return value is the distance.- Parameters:
pt0-pt1-ptn-- Returns:
-
isValid
public boolean isValid()Point is valid if its coordinates are valid- Returns:
-
equals
-