Package com.google.zxing
Class ResultPoint
java.lang.Object
com.google.zxing.ResultPoint
- Direct Known Subclasses:
AlignmentPattern
,FinderPattern
Encapsulates a point of interest in an image containing a barcode. Typically, this would be the location of a finder pattern or the corner of the barcode, for example.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static float
crossProductZ
(ResultPoint pointA, ResultPoint pointB, ResultPoint pointC) Returns the z component of the cross product between vectors BC and BA.static float
distance
(ResultPoint pattern1, ResultPoint pattern2) final boolean
final float
getX()
final float
getY()
final int
hashCode()
static void
orderBestPatterns
(ResultPoint[] patterns) Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and BC is less than AC, and the angle between BC and BA is less than 180 degrees.final String
toString()
-
Field Details
-
x
private final float x -
y
private final float y
-
-
Constructor Details
-
ResultPoint
public ResultPoint(float x, float y)
-
-
Method Details
-
getX
public final float getX() -
getY
public final float getY() -
equals
-
hashCode
public final int hashCode() -
toString
-
orderBestPatterns
Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and BC is less than AC, and the angle between BC and BA is less than 180 degrees.- Parameters:
patterns
- array of threeResultPoint
to order
-
distance
- Parameters:
pattern1
- first patternpattern2
- second pattern- Returns:
- distance between two points
-
crossProductZ
Returns the z component of the cross product between vectors BC and BA.
-