#include <blobs.h>
Definition at line 51 of file blobs.h.
◆ TPOINT() [1/3]
◆ TPOINT() [2/3]
TPOINT::TPOINT |
( |
int16_t |
vx, |
|
|
int16_t |
vy |
|
) |
| |
|
inline |
◆ TPOINT() [3/3]
TPOINT::TPOINT |
( |
const ICOORD & |
ic | ) |
|
|
inline |
Definition at line 54 of file blobs.h.
54:
x(ic.
x()),
y(ic.
y()) {}
int16_t y() const
access_function
int16_t x() const
access function
◆ cross()
int TPOINT::cross |
( |
const TPOINT & |
other | ) |
const |
|
inline |
Definition at line 79 of file blobs.h.
79 {
80 return x * other.
y -
y * other.
x;
81 }
◆ diff()
◆ dot()
int TPOINT::dot |
( |
const TPOINT & |
other | ) |
const |
|
inline |
Definition at line 84 of file blobs.h.
84 {
85 return x * other.
x +
y * other.
y;
86 }
◆ IsCrossed()
Definition at line 66 of file blobs.cpp.
67 {
68 TPOINT b0a1, b0a0, a1b1, b0b1, a1a0;
69
80
81 int b0a1xb0b1 = b0a1.
cross(b0b1);
82 int b0b1xb0a0 = b0b1.
cross(b0a0);
83 int a1b1xa1a0 = a1b1.
cross(a1a0);
84
85
86 int a1a0xa1b0 = -a1a0.
cross(b0a1);
87
88 return ((b0a1xb0b1 > 0 && b0b1xb0a0 > 0) ||
89 (b0a1xb0b1 < 0 && b0b1xb0a0 < 0)) &&
90 ((a1b1xa1a0 > 0 && a1a0xa1b0 > 0) || (a1b1xa1a0 < 0 && a1a0xa1b0 < 0));
91}
int cross(const TPOINT &other) const
◆ length()
int TPOINT::length |
( |
| ) |
const |
|
inline |
◆ operator+=()
void TPOINT::operator+= |
( |
const TPOINT & |
other | ) |
|
|
inline |
◆ operator/=()
void TPOINT::operator/= |
( |
int |
divisor | ) |
|
|
inline |
◆ operator==()
bool TPOINT::operator== |
( |
const TPOINT & |
other | ) |
const |
|
inline |
Definition at line 64 of file blobs.h.
64 {
65 return x == other.
x &&
y == other.
y;
66 }
The documentation for this struct was generated from the following files: