tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
FCOORD Class Reference

#include <points.h>

Public Member Functions

 FCOORD ()=default
 empty constructor More...
 
 FCOORD (float xvalue, float yvalue)
 
 FCOORD (ICOORD icoord)
 
float x () const
 
float y () const
 
void set_x (float xin)
 rewrite function More...
 
void set_y (float yin)
 rewrite function More...
 
float sqlength () const
 find sq length More...
 
float length () const
 find length More...
 
float pt_to_pt_sqdist (const FCOORD &pt) const
 sq dist between pts More...
 
float pt_to_pt_dist (const FCOORD &pt) const
 Distance between pts. More...
 
float angle () const
 find angle More...
 
uint8_t to_direction () const
 
void from_direction (uint8_t direction)
 
FCOORD nearest_pt_on_line (const FCOORD &line_point, const FCOORD &dir_vector) const
 
bool normalise ()
 Convert to unit vec. More...
 
bool operator== (const FCOORD &other)
 test equality More...
 
bool operator!= (const FCOORD &other)
 test inequality More...
 
void rotate (const FCOORD vec)
 
void unrotate (const FCOORD &vec)
 

Static Public Member Functions

static uint8_t binary_angle_plus_pi (double angle)
 
static double angle_from_direction (uint8_t direction)
 

Private Attributes

float xcoord
 
float ycoord
 

Friends

FCOORD operator! (const FCOORD &)
 rotate 90 deg anti More...
 
FCOORD operator- (const FCOORD &)
 unary minus More...
 
FCOORD operator+ (const FCOORD &, const FCOORD &)
 add More...
 
FCOORDoperator+= (FCOORD &, const FCOORD &)
 add More...
 
FCOORD operator- (const FCOORD &, const FCOORD &)
 subtract More...
 
FCOORDoperator-= (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...
 
FCOORDoperator*= (FCOORD &, float)
 multiply More...
 
FCOORD operator/ (const FCOORD &, float)
 divide More...
 
FCOORDoperator/= (FCOORD &, float)
 divide More...
 

Constructor & Destructor Documentation

◆ FCOORD() [1/3]

FCOORD::FCOORD ( )
default

empty constructor

◆ FCOORD() [2/3]

FCOORD::FCOORD ( float  xvalue,
float  yvalue 
)
inline

constructor

Parameters
xvaluex value
yvaluey value

◆ FCOORD() [3/3]

FCOORD::FCOORD ( ICOORD  icoord)
inline

Member Function Documentation

◆ angle()

float FCOORD::angle ( ) const
inline

find angle

◆ angle_from_direction()

double FCOORD::angle_from_direction ( uint8_t  direction)
static

◆ binary_angle_plus_pi()

uint8_t FCOORD::binary_angle_plus_pi ( double  angle)
static

◆ from_direction()

void FCOORD::from_direction ( uint8_t  direction)

◆ length()

float FCOORD::length ( ) const
inline

find length

◆ nearest_pt_on_line()

FCOORD FCOORD::nearest_pt_on_line ( const FCOORD line_point,
const FCOORD dir_vector 
) const

◆ normalise()

bool FCOORD::normalise ( )

Convert to unit vec.

◆ operator!=()

bool FCOORD::operator!= ( const FCOORD other)
inline

test inequality

◆ operator==()

bool FCOORD::operator== ( const FCOORD other)
inline

test equality

◆ pt_to_pt_dist()

float FCOORD::pt_to_pt_dist ( const FCOORD pt) const
inline

Distance between pts.

◆ pt_to_pt_sqdist()

float FCOORD::pt_to_pt_sqdist ( const FCOORD pt) const
inline

sq dist between pts

◆ rotate()

void FCOORD::rotate ( const FCOORD  vec)
inline

rotate

Parameters
vecby vector

◆ set_x()

void FCOORD::set_x ( float  xin)
inline

rewrite function

◆ set_y()

void FCOORD::set_y ( float  yin)
inline

rewrite function

◆ sqlength()

float FCOORD::sqlength ( ) const
inline

find sq length

◆ to_direction()

uint8_t FCOORD::to_direction ( ) const

◆ unrotate()

void FCOORD::unrotate ( const FCOORD vec)
inline

◆ x()

float FCOORD::x ( ) const
inline

◆ y()

float FCOORD::y ( ) const
inline

Friends And Related Function Documentation

◆ operator!

FCOORD operator! ( const FCOORD src)
friend

rotate 90 deg anti

◆ operator%

float operator% ( const FCOORD op1,
const FCOORD op2 
)
friend

scalar product

◆ operator* [1/3]

float operator* ( const FCOORD op1,
const FCOORD op2 
)
friend

cross product

◆ operator* [2/3]

FCOORD operator* ( const FCOORD op1,
float  scale 
)
friend

multiply

◆ operator* [3/3]

FCOORD operator* ( float  scale,
const FCOORD op1 
)
friend

multiply

◆ operator*=

FCOORD& operator*= ( FCOORD op1,
float  scale 
)
friend

multiply

◆ operator+

FCOORD operator+ ( const FCOORD op1,
const FCOORD op2 
)
friend

add

◆ operator+=

FCOORD& operator+= ( FCOORD op1,
const FCOORD op2 
)
friend

add

◆ operator- [1/2]

FCOORD operator- ( const FCOORD src)
friend

unary minus

◆ operator- [2/2]

FCOORD operator- ( const FCOORD op1,
const FCOORD op2 
)
friend

subtract

◆ operator-=

FCOORD& operator-= ( FCOORD op1,
const FCOORD op2 
)
friend

subtract

◆ operator/

FCOORD operator/ ( const FCOORD op1,
float  scale 
)
friend

divide

◆ operator/=

FCOORD& operator/= ( FCOORD op1,
float  scale 
)
friend

divide

Member Data Documentation

◆ xcoord

float FCOORD::xcoord
private

◆ ycoord

float FCOORD::ycoord
private

The documentation for this class was generated from the following files: