#include <blobs.h>
Definition at line 48 of file blobs.h.
◆ TPOINT() [1/3]
tesseract::TPOINT::TPOINT |
( |
| ) |
|
|
default |
◆ TPOINT() [2/3]
◆ TPOINT() [3/3]
tesseract::TPOINT::TPOINT |
( |
const ICOORD & |
ic | ) |
|
|
inline |
Definition at line 51 of file blobs.h.
51 :
x(ic.x()),
y(ic.y()) {}
◆ cross()
int tesseract::TPOINT::cross |
( |
const TPOINT & |
other | ) |
const |
|
inline |
Definition at line 75 of file blobs.h.
76 return x * other.y -
y * other.x;
◆ diff()
void tesseract::TPOINT::diff |
( |
const TPOINT & |
p1, |
|
|
const TPOINT & |
p2 |
|
) |
| |
|
inline |
◆ dot()
int tesseract::TPOINT::dot |
( |
const TPOINT & |
other | ) |
const |
|
inline |
Definition at line 80 of file blobs.h.
81 return x * other.x +
y * other.y;
◆ IsCrossed()
Definition at line 65 of file blobs.cpp.
66 TPOINT b0a1, b0a0, a1b1, b0b1, a1a0;
79 int b0a1xb0b1 = b0a1.cross(b0b1);
80 int b0b1xb0a0 = b0b1.cross(b0a0);
81 int a1b1xa1a0 = a1b1.cross(a1a0);
84 int a1a0xa1b0 = -a1a0.cross(b0a1);
86 return ((b0a1xb0b1 > 0 && b0b1xb0a0 > 0) || (b0a1xb0b1 < 0 && b0b1xb0a0 < 0)) &&
87 ((a1b1xa1a0 > 0 && a1a0xa1b0 > 0) || (a1b1xa1a0 < 0 && a1a0xa1b0 < 0));
◆ length()
int tesseract::TPOINT::length |
( |
| ) |
const |
|
inline |
◆ operator+=()
void tesseract::TPOINT::operator+= |
( |
const TPOINT & |
other | ) |
|
|
inline |
◆ operator/=()
void tesseract::TPOINT::operator/= |
( |
int |
divisor | ) |
|
|
inline |
◆ operator==()
bool tesseract::TPOINT::operator== |
( |
const TPOINT & |
other | ) |
const |
|
inline |
Definition at line 61 of file blobs.h.
62 return x == other.x &&
y == other.y;
The documentation for this struct was generated from the following files: