#include <points.h>
List of all members.
Friends |
FCOORD | operator! (const FCOORD &) |
| rotate 90 deg anti
|
FCOORD | operator- (const FCOORD &) |
| unary minus
|
FCOORD | operator+ (const FCOORD &, const FCOORD &) |
| add
|
FCOORD & | operator+= (FCOORD &, const FCOORD &) |
| add
|
FCOORD | operator- (const FCOORD &, const FCOORD &) |
| subtract
|
FCOORD & | operator-= (FCOORD &, const FCOORD &) |
| subtract
|
float | operator% (const FCOORD &, const FCOORD &) |
| scalar product
|
float | operator* (const FCOORD &, const FCOORD &) |
| cross product
|
FCOORD | operator* (const FCOORD &, float) |
| multiply
|
FCOORD | operator* (float, const FCOORD &) |
| multiply
|
FCOORD & | operator*= (FCOORD &, float) |
| multiply
|
FCOORD | operator/ (const FCOORD &, float) |
| divide
|
FCOORD & | operator/= (FCOORD &, float) |
| divide
|
Detailed Description
Definition at line 189 of file points.h.
Constructor & Destructor Documentation
empty constructor
Definition at line 193 of file points.h.
FCOORD::FCOORD |
( |
float |
xvalue, |
|
|
float |
yvalue |
|
) |
| |
|
inline |
constructor
- Parameters:
-
xvalue | x value |
yvalue | y value |
Definition at line 198 of file points.h.
{
xcoord = xvalue;
ycoord = yvalue;
}
FCOORD::FCOORD |
( |
ICOORD |
icoord | ) |
|
|
inline |
Member Function Documentation
float FCOORD::angle |
( |
| ) |
const |
|
inline |
find angle
Definition at line 249 of file points.h.
{
return (float) atan2 (ycoord, xcoord);
}
float FCOORD::length |
( |
| ) |
const |
|
inline |
bool FCOORD::normalise |
( |
| ) |
|
test inequality
Definition at line 261 of file points.h.
{
return xcoord != other.xcoord || ycoord != other.ycoord;
}
test equality
Definition at line 257 of file points.h.
{
return xcoord == other.xcoord && ycoord == other.ycoord;
}
float FCOORD::pt_to_pt_dist |
( |
const FCOORD & |
pt | ) |
const |
|
inline |
Distance between pts.
Definition at line 244 of file points.h.
float FCOORD::pt_to_pt_sqdist |
( |
const FCOORD & |
pt | ) |
const |
|
inline |
sq dist between pts
Definition at line 235 of file points.h.
{
gap.xcoord = xcoord - pt.xcoord;
gap.ycoord = ycoord - pt.ycoord;
}
void FCOORD::rotate |
( |
const FCOORD |
vec | ) |
|
|
inline |
rotate
- Parameters:
-
Definition at line 471 of file ipoints.h.
{
float tmp;
tmp = xcoord * vec.
x () - ycoord * vec.
y ();
ycoord = ycoord * vec.
x () + xcoord * vec.
y ();
xcoord = tmp;
}
void FCOORD::set_x |
( |
float |
xin | ) |
|
|
inline |
rewrite function
Definition at line 216 of file points.h.
void FCOORD::set_y |
( |
float |
yin | ) |
|
|
inline |
rewrite function
Definition at line 220 of file points.h.
float FCOORD::sqlength |
( |
| ) |
const |
|
inline |
find sq length
Definition at line 225 of file points.h.
{
return xcoord * xcoord + ycoord * ycoord;
}
void FCOORD::unrotate |
( |
const FCOORD & |
vec | ) |
|
|
inline |
float FCOORD::x |
( |
| ) |
const |
|
inline |
float FCOORD::y |
( |
| ) |
const |
|
inline |
Friends And Related Function Documentation
rotate 90 deg anti
Definition at line 258 of file ipoints.h.
{
result.xcoord = -src.ycoord;
result.ycoord = src.xcoord;
return result;
}
scalar product
Definition at line 362 of file ipoints.h.
{
return op1.xcoord * op2.xcoord + op1.ycoord * op2.ycoord;
}
cross product
Definition at line 375 of file ipoints.h.
{
return op1.xcoord * op2.ycoord - op1.ycoord * op2.xcoord;
}
multiply
Definition at line 388 of file ipoints.h.
{
result.xcoord = op1.xcoord * scale;
result.ycoord = op1.ycoord * scale;
return result;
}
multiply
Definition at line 399 of file ipoints.h.
{
result.xcoord = op1.xcoord * scale;
result.ycoord = op1.ycoord * scale;
return result;
}
multiply
Definition at line 418 of file ipoints.h.
{
op1.xcoord *= scale;
op1.ycoord *= scale;
return op1;
}
add
Definition at line 294 of file ipoints.h.
{
sum.xcoord = op1.xcoord + op2.xcoord;
sum.ycoord = op1.ycoord + op2.ycoord;
return sum;
}
add
Definition at line 312 of file ipoints.h.
{
op1.xcoord += op2.xcoord;
op1.ycoord += op2.ycoord;
return op1;
}
unary minus
Definition at line 276 of file ipoints.h.
{
result.xcoord = -src.xcoord;
result.ycoord = -src.ycoord;
return result;
}
subtract
Definition at line 328 of file ipoints.h.
{
sum.xcoord = op1.xcoord - op2.xcoord;
sum.ycoord = op1.ycoord - op2.ycoord;
return sum;
}
subtract
Definition at line 346 of file ipoints.h.
{
op1.xcoord -= op2.xcoord;
op1.ycoord -= op2.ycoord;
return op1;
}
divide
Definition at line 434 of file ipoints.h.
{
if (scale != 0) {
result.xcoord = op1.xcoord / scale;
result.ycoord = op1.ycoord / scale;
}
return result;
}
divide
Definition at line 454 of file ipoints.h.
{
if (scale != 0) {
op1.xcoord /= scale;
op1.ycoord /= scale;
}
return op1;
}
The documentation for this class was generated from the following files:
- /mnt/data/src/tesseract-ocr/ccstruct/points.h
- /mnt/data/src/tesseract-ocr/ccstruct/ipoints.h