#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]
empty constructor
Definition at line 193 of file points.h.
◆ FCOORD() [2/3]
FCOORD::FCOORD |
( |
float |
xvalue, |
|
|
float |
yvalue |
|
) |
| |
|
inline |
constructor
- Parameters
-
xvalue | x value |
yvalue | y value |
Definition at line 198 of file points.h.
◆ FCOORD() [3/3]
FCOORD::FCOORD |
( |
ICOORD |
icoord | ) |
|
|
inline |
◆ angle()
float FCOORD::angle |
( |
| ) |
const |
|
inline |
find angle
Definition at line 249 of file points.h.
250 return (
float) atan2 (ycoord, xcoord);
◆ angle_from_direction()
double FCOORD::angle_from_direction |
( |
uinT8 |
direction | ) |
|
|
static |
Definition at line 129 of file points.cpp.
int direction(EDGEPT *point)
◆ binary_angle_plus_pi()
uinT8 FCOORD::binary_angle_plus_pi |
( |
double |
angle | ) |
|
|
static |
Definition at line 124 of file points.cpp.
int IntCastRounded(double x)
◆ from_direction()
void FCOORD::from_direction |
( |
uinT8 |
direction | ) |
|
Definition at line 115 of file points.cpp.
117 xcoord = cos(radians);
118 ycoord = sin(radians);
int direction(EDGEPT *point)
static double angle_from_direction(uinT8 direction)
◆ length()
float FCOORD::length |
( |
| ) |
const |
|
inline |
find length
Definition at line 230 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 136 of file points.cpp.
138 FCOORD point_vector(*
this - line_point);
143 double lambda = point_vector % dir_vector / dir_vector.
sqlength();
144 return line_point + (dir_vector * lambda);
float sqlength() const
find sq length
◆ normalise()
bool FCOORD::normalise |
( |
| ) |
|
◆ operator!=()
test inequality
Definition at line 280 of file points.h.
281 return xcoord != other.xcoord || ycoord != other.ycoord;
◆ operator==()
test equality
Definition at line 276 of file points.h.
277 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 244 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 235 of file points.h.
238 gap.xcoord = xcoord - pt.xcoord;
239 gap.ycoord = ycoord - pt.ycoord;
float sqlength() const
find sq length
◆ rotate()
void FCOORD::rotate |
( |
const FCOORD |
vec | ) |
|
|
inline |
rotate
- Parameters
-
Definition at line 471 of file ipoints.h.
475 tmp = xcoord * vec.
x () - ycoord * vec.
y ();
476 ycoord = ycoord * vec.
x () + xcoord * vec.
y ();
◆ set_x()
void FCOORD::set_x |
( |
float |
xin | ) |
|
|
inline |
rewrite function
Definition at line 216 of file points.h.
◆ set_y()
void FCOORD::set_y |
( |
float |
yin | ) |
|
|
inline |
rewrite function
Definition at line 220 of file points.h.
◆ sqlength()
float FCOORD::sqlength |
( |
| ) |
const |
|
inline |
find sq length
Definition at line 225 of file points.h.
226 return xcoord * xcoord + ycoord * ycoord;
◆ to_direction()
uinT8 FCOORD::to_direction |
( |
| ) |
const |
Definition at line 111 of file points.cpp.
static uinT8 binary_angle_plus_pi(double angle)
float angle() const
find angle
◆ unrotate()
void FCOORD::unrotate |
( |
const FCOORD & |
vec | ) |
|
|
inline |
Definition at line 480 of file ipoints.h.
FCOORD()
empty constructor
void rotate(const FCOORD vec)
◆ x()
float FCOORD::x |
( |
| ) |
const |
|
inline |
◆ y()
float FCOORD::y |
( |
| ) |
const |
|
inline |
◆ operator!
rotate 90 deg anti
Definition at line 258 of file ipoints.h.
263 result.xcoord = -src.ycoord;
264 result.ycoord = src.xcoord;
◆ operator%
scalar product
Definition at line 362 of file ipoints.h.
365 return op1.xcoord * op2.xcoord + op1.ycoord * op2.ycoord;
◆ operator* [1/3]
cross product
Definition at line 375 of file ipoints.h.
378 return op1.xcoord * op2.ycoord - op1.ycoord * op2.xcoord;
◆ operator* [2/3]
multiply
Definition at line 388 of file ipoints.h.
393 result.xcoord = op1.xcoord * scale;
394 result.ycoord = op1.ycoord * scale;
◆ operator* [3/3]
multiply
Definition at line 399 of file ipoints.h.
405 result.xcoord = op1.xcoord * scale;
406 result.ycoord = op1.ycoord * scale;
◆ operator*=
◆ operator+
add
Definition at line 294 of file ipoints.h.
299 sum.xcoord = op1.xcoord + op2.xcoord;
300 sum.ycoord = op1.ycoord + op2.ycoord;
◆ operator+=
add
Definition at line 312 of file ipoints.h.
315 op1.xcoord += op2.xcoord;
316 op1.ycoord += op2.ycoord;
◆ operator- [1/2]
unary minus
Definition at line 276 of file ipoints.h.
281 result.xcoord = -src.xcoord;
282 result.ycoord = -src.ycoord;
◆ operator- [2/2]
subtract
Definition at line 328 of file ipoints.h.
333 sum.xcoord = op1.xcoord - op2.xcoord;
334 sum.ycoord = op1.ycoord - op2.ycoord;
◆ operator-=
subtract
Definition at line 346 of file ipoints.h.
349 op1.xcoord -= op2.xcoord;
350 op1.ycoord -= op2.ycoord;
◆ operator/
divide
Definition at line 434 of file ipoints.h.
440 result.xcoord = op1.xcoord / scale;
441 result.ycoord = op1.ycoord / scale;
◆ operator/=
The documentation for this class was generated from the following files: