com.getsensibill.capturestandalone.models / Quadrilateral
Quadrilateral
open class Quadrilateral
General model used to store the information that defines a quadrilateral. Specifically, the coordinates of four corners. This class remains open, with the ability to override onPointsUpdated so subclasses are able to to perform additional calculations or provide additional functionality whenever the corners of the quadrilateral are updated.
Note that everywhere in this class, the order of points, in any list, method call, etc. will be: top left, top right, bottom right, bottom left
Constructors
Name | Summary |
---|---|
<init> | Quadrilateral(vararg corners: PointF ) Extra constructor to easily create Quadrilaterals from an array of points. This constructor specifically takes an array of size 4, where the corners are ordered as: 0: top left 1: top right 2: bottom right 3: bottom left Quadrilateral(topLeft: PointF = PointF(-1.0f, -1.0f), topRight: PointF = PointF(-1.0f, -1.0f), bottomRight: PointF = PointF(-1.0f, -1.0f), bottomLeft: PointF = PointF(-1.0f, -1.0f)) General model used to store the information that defines a quadrilateral. Specifically, the coordinates of four corners. This class remains open, with the ability to override onPointsUpdated so subclasses are able to to perform additional calculations or provide additional functionality whenever the corners of the quadrilateral are updated. |
Functions
Name | Summary |
---|---|
equals | open fun equals(other: Any ?): Boolean |
onPointsUpdated | open fun onPointsUpdated(): Unit |