#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 187 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 195 of file points.h.
◆ FCOORD() [3/3]
FCOORD::FCOORD |
( |
ICOORD |
icoord | ) |
|
|
inline |
◆ angle()
float FCOORD::angle |
( |
| ) |
const |
|
inline |
find angle
Definition at line 246 of file points.h.
248 return std::atan2(ycoord, xcoord);
◆ angle_from_direction()
double FCOORD::angle_from_direction |
( |
uint8_t |
direction | ) |
|
|
static |
Definition at line 125 of file points.cpp.
127 return direction * M_PI / 128.0 - M_PI;
◆ binary_angle_plus_pi()
uint8_t FCOORD::binary_angle_plus_pi |
( |
double |
angle | ) |
|
|
static |
◆ from_direction()
void FCOORD::from_direction |
( |
uint8_t |
direction | ) |
|
Definition at line 111 of file points.cpp.
114 xcoord = cos(radians);
115 ycoord = sin(radians);
◆ length()
float FCOORD::length |
( |
| ) |
const |
|
inline |
◆ nearest_pt_on_line()
FCOORD FCOORD::nearest_pt_on_line |
( |
const FCOORD & |
line_point, |
|
|
const FCOORD & |
dir_vector |
|
) |
| const |
Definition at line 132 of file points.cpp.
135 FCOORD point_vector(*
this - line_point);
140 double lambda = point_vector % dir_vector / dir_vector.
sqlength();
141 return line_point + (dir_vector * lambda);
◆ normalise()
bool FCOORD::normalise |
( |
| ) |
|
◆ operator!=()
test inequality
Definition at line 277 of file points.h.
279 return xcoord != other.xcoord || ycoord != other.ycoord;
◆ operator==()
bool FCOORD::operator== |
( |
const FCOORD & |
other | ) |
|
|
inline |
test equality
Definition at line 273 of file points.h.
275 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 241 of file points.h.
◆ pt_to_pt_sqdist()
float FCOORD::pt_to_pt_sqdist |
( |
const FCOORD & |
pt | ) |
const |
|
inline |
sq dist between pts
Definition at line 232 of file points.h.
236 gap.xcoord = xcoord - pt.xcoord;
237 gap.ycoord = ycoord - pt.ycoord;
◆ rotate()
void FCOORD::rotate |
( |
const FCOORD |
vec | ) |
|
|
inline |
rotate
- Parameters
-
Definition at line 736 of file points.h.
◆ set_x()
void FCOORD::set_x |
( |
float |
xin | ) |
|
|
inline |
rewrite function
Definition at line 213 of file points.h.
◆ set_y()
void FCOORD::set_y |
( |
float |
yin | ) |
|
|
inline |
rewrite function
Definition at line 217 of file points.h.
◆ sqlength()
float FCOORD::sqlength |
( |
| ) |
const |
|
inline |
find sq length
Definition at line 222 of file points.h.
224 return xcoord * xcoord + ycoord * ycoord;
◆ 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 |
◆ operator!
rotate 90 deg anti
Definition at line 538 of file points.h.
◆ operator%
scalar product
Definition at line 636 of file points.h.
◆ operator* [1/3]
◆ operator* [2/3]
◆ operator* [3/3]
multiply
Definition at line 671 of file points.h.
673 return op1.xcoord * op2.ycoord - op1.ycoord * op2.xcoord;
◆ operator*=
◆ operator+
add
Definition at line 572 of file points.h.
576 result.xcoord = -src.xcoord;
577 result.ycoord = -src.ycoord;
◆ operator+=
add
Definition at line 589 of file points.h.
594 sum.xcoord = op1.xcoord + op2.xcoord;
595 sum.ycoord = op1.ycoord + op2.ycoord;
◆ operator- [1/2]
unary minus
Definition at line 555 of file points.h.
558 result.xcoord = -src.ycoord;
559 result.ycoord = src.xcoord;
◆ operator- [2/2]
subtract
Definition at line 604 of file points.h.
610 op1.xcoord += op2.xcoord;
611 op1.ycoord += op2.ycoord;
◆ operator-=
◆ operator/
◆ operator/=
The documentation for this class was generated from the following files: