#include <points.h>
|
FCOORD | operator! (const FCOORD &) |
| rotate 90 deg anti More...
|
|
FCOORD | operator- (const FCOORD &) |
| unary minus More...
|
|
FCOORD | operator+ (const FCOORD &, const FCOORD &) |
| add More...
|
|
FCOORD & | operator+= (FCOORD &, const FCOORD &) |
| add More...
|
|
FCOORD | operator- (const FCOORD &, const FCOORD &) |
| subtract More...
|
|
FCOORD & | operator-= (FCOORD &, const FCOORD &) |
| subtract More...
|
|
float | operator% (const FCOORD &, const FCOORD &) |
| scalar product More...
|
|
float | operator* (const FCOORD &, const FCOORD &) |
| cross product More...
|
|
FCOORD | operator* (const FCOORD &, float) |
| multiply More...
|
|
FCOORD | operator* (float, const FCOORD &) |
| multiply More...
|
|
FCOORD & | operator*= (FCOORD &, float) |
| multiply More...
|
|
FCOORD | operator/ (const FCOORD &, float) |
| divide More...
|
|
FCOORD & | operator/= (FCOORD &, float) |
| divide More...
|
|
Definition at line 189 of file points.h.
◆ FCOORD() [1/3]
◆ FCOORD() [2/3]
FCOORD::FCOORD |
( |
float |
xvalue, |
|
|
float |
yvalue |
|
) |
| |
|
inline |
constructor
- Parameters
-
xvalue | x value |
yvalue | y value |
Definition at line 197 of file points.h.
◆ FCOORD() [3/3]
FCOORD::FCOORD |
( |
ICOORD |
icoord | ) |
|
|
inline |
◆ angle()
float FCOORD::angle |
( |
| ) |
const |
|
inline |
find angle
Definition at line 248 of file points.h.
249 return (
float) atan2 (ycoord, xcoord);
◆ angle_from_direction()
double FCOORD::angle_from_direction |
( |
uint8_t |
direction | ) |
|
|
static |
Definition at line 128 of file points.cpp.
int direction(EDGEPT *point)
◆ binary_angle_plus_pi()
uint8_t FCOORD::binary_angle_plus_pi |
( |
double |
angle | ) |
|
|
static |
Definition at line 123 of file points.cpp.
int IntCastRounded(double x)
◆ from_direction()
void FCOORD::from_direction |
( |
uint8_t |
direction | ) |
|
Definition at line 114 of file points.cpp.
116 xcoord = cos(radians);
117 ycoord = sin(radians);
int direction(EDGEPT *point)
static double angle_from_direction(uint8_t direction)
◆ length()
float FCOORD::length |
( |
| ) |
const |
|
inline |
find length
Definition at line 229 of file points.h.
float sqlength() const
find sq length
◆ nearest_pt_on_line()
FCOORD FCOORD::nearest_pt_on_line |
( |
const FCOORD & |
line_point, |
|
|
const FCOORD & |
dir_vector |
|
) |
| const |
Definition at line 135 of file points.cpp.
137 FCOORD point_vector(*
this - line_point);
142 double lambda = point_vector % dir_vector / dir_vector.
sqlength();
143 return line_point + (dir_vector * lambda);
float sqlength() const
find sq length
◆ normalise()
bool FCOORD::normalise |
( |
| ) |
|
◆ operator!=()
test inequality
Definition at line 279 of file points.h.
280 return xcoord != other.xcoord || ycoord != other.ycoord;
◆ operator==()
bool FCOORD::operator== |
( |
const FCOORD & |
other | ) |
|
|
inline |
test equality
Definition at line 275 of file points.h.
276 return xcoord == other.xcoord && ycoord == other.ycoord;
◆ pt_to_pt_dist()
float FCOORD::pt_to_pt_dist |
( |
const FCOORD & |
pt | ) |
const |
|
inline |
Distance between pts.
Definition at line 243 of file points.h.
float pt_to_pt_sqdist(const FCOORD &pt) const
sq dist between pts
◆ pt_to_pt_sqdist()
float FCOORD::pt_to_pt_sqdist |
( |
const FCOORD & |
pt | ) |
const |
|
inline |
sq dist between pts
Definition at line 234 of file points.h.
237 gap.xcoord = xcoord - pt.xcoord;
238 gap.ycoord = ycoord - pt.ycoord;
float sqlength() const
find sq length
◆ rotate()
void FCOORD::rotate |
( |
const FCOORD |
vec | ) |
|
|
inline |
rotate
- Parameters
-
Definition at line 764 of file points.h.
768 tmp = xcoord * vec.
x () - ycoord * vec.
y ();
769 ycoord = ycoord * vec.
x () + xcoord * vec.
y ();
◆ set_x()
void FCOORD::set_x |
( |
float |
xin | ) |
|
|
inline |
rewrite function
Definition at line 215 of file points.h.
◆ set_y()
void FCOORD::set_y |
( |
float |
yin | ) |
|
|
inline |
rewrite function
Definition at line 219 of file points.h.
◆ sqlength()
float FCOORD::sqlength |
( |
| ) |
const |
|
inline |
find sq length
Definition at line 224 of file points.h.
225 return xcoord * xcoord + ycoord * ycoord;
◆ to_direction()
uint8_t FCOORD::to_direction |
( |
| ) |
const |
Definition at line 110 of file points.cpp.
float angle() const
find angle
static uint8_t binary_angle_plus_pi(double angle)
◆ unrotate()
void FCOORD::unrotate |
( |
const FCOORD & |
vec | ) |
|
|
inline |
Definition at line 773 of file points.h.
void rotate(const FCOORD vec)
FCOORD()=default
empty constructor
◆ x()
float FCOORD::x |
( |
| ) |
const |
|
inline |
◆ y()
float FCOORD::y |
( |
| ) |
const |
|
inline |
◆ operator!
rotate 90 deg anti
Definition at line 554 of file points.h.
559 result.xcoord = -src.ycoord;
560 result.ycoord = src.xcoord;
◆ operator%
scalar product
Definition at line 658 of file points.h.
661 return op1.xcoord * op2.xcoord + op1.ycoord * op2.ycoord;
◆ operator* [1/3]
cross product
Definition at line 671 of file points.h.
674 return op1.xcoord * op2.ycoord - op1.ycoord * op2.xcoord;
◆ operator* [2/3]
multiply
Definition at line 684 of file points.h.
689 result.xcoord = op1.xcoord * scale;
690 result.ycoord = op1.ycoord * scale;
◆ operator* [3/3]
multiply
Definition at line 695 of file points.h.
701 result.xcoord = op1.xcoord * scale;
702 result.ycoord = op1.ycoord * scale;
◆ operator*=
◆ operator+
add
Definition at line 590 of file points.h.
595 sum.xcoord = op1.xcoord + op2.xcoord;
596 sum.ycoord = op1.ycoord + op2.ycoord;
◆ operator+=
add
Definition at line 608 of file points.h.
611 op1.xcoord += op2.xcoord;
612 op1.ycoord += op2.ycoord;
◆ operator- [1/2]
unary minus
Definition at line 572 of file points.h.
577 result.xcoord = -src.xcoord;
578 result.ycoord = -src.ycoord;
◆ operator- [2/2]
subtract
Definition at line 624 of file points.h.
629 sum.xcoord = op1.xcoord - op2.xcoord;
630 sum.ycoord = op1.ycoord - op2.ycoord;
◆ operator-=
subtract
Definition at line 642 of file points.h.
645 op1.xcoord -= op2.xcoord;
646 op1.ycoord -= op2.ycoord;
◆ operator/
divide
Definition at line 730 of file points.h.
735 result.xcoord = op1.xcoord / scale;
736 result.ycoord = op1.ycoord / scale;
◆ operator/=
The documentation for this class was generated from the following files:
- /usr/src/tesseract-ocr.master/src/ccstruct/points.h
- /usr/src/tesseract-ocr.master/src/ccstruct/points.cpp