integer coordinate
More...
#include <points.h>
|
class | FCOORD |
|
ICOORD | operator! (const ICOORD &) |
| rotate 90 deg anti More...
|
|
ICOORD | operator- (const ICOORD &) |
| unary minus More...
|
|
ICOORD | operator+ (const ICOORD &, const ICOORD &) |
| add More...
|
|
ICOORD & | operator+= (ICOORD &, const ICOORD &) |
| add More...
|
|
ICOORD | operator- (const ICOORD &, const ICOORD &) |
| subtract More...
|
|
ICOORD & | operator-= (ICOORD &, const ICOORD &) |
| subtract More...
|
|
int32_t | operator% (const ICOORD &, const ICOORD &) |
| scalar product More...
|
|
int32_t | operator* (const ICOORD &, const ICOORD &) |
| cross product More...
|
|
ICOORD | operator* (const ICOORD &, int16_t) |
| multiply More...
|
|
ICOORD | operator* (int16_t, const ICOORD &) |
| multiply More...
|
|
ICOORD & | operator*= (ICOORD &, int16_t) |
| multiply More...
|
|
ICOORD | operator/ (const ICOORD &, int16_t) |
| divide More...
|
|
ICOORD & | operator/= (ICOORD &, int16_t) |
| divide More...
|
|
integer coordinate
Definition at line 30 of file points.h.
◆ ICOORD() [1/2]
empty constructor
Definition at line 36 of file points.h.
◆ ICOORD() [2/2]
ICOORD::ICOORD |
( |
int16_t |
xin, |
|
|
int16_t |
yin |
|
) |
| |
|
inline |
constructor
- Parameters
-
Definition at line 42 of file points.h.
◆ ~ICOORD()
◆ angle()
float ICOORD::angle |
( |
| ) |
const |
|
inline |
find angle
Definition at line 96 of file points.h.
◆ DeSerialize()
bool ICOORD::DeSerialize |
( |
bool |
swap, |
|
|
FILE * |
fp |
|
) |
| |
◆ length()
float ICOORD::length |
( |
| ) |
const |
|
inline |
find length
Definition at line 77 of file points.h.
◆ operator!=()
test inequality
Definition at line 105 of file points.h.
◆ operator==()
bool ICOORD::operator== |
( |
const ICOORD & |
other | ) |
const |
|
inline |
◆ pt_to_pt_dist()
float ICOORD::pt_to_pt_dist |
( |
const ICOORD & |
pt | ) |
const |
|
inline |
Distance between pts.
Definition at line 91 of file points.h.
◆ pt_to_pt_sqdist()
float ICOORD::pt_to_pt_sqdist |
( |
const ICOORD & |
pt | ) |
const |
|
inline |
sq dist between pts
Definition at line 82 of file points.h.
◆ rotate()
void ICOORD::rotate |
( |
const FCOORD & |
vec | ) |
|
|
inline |
rotate
- Parameters
-
Definition at line 522 of file points.h.
◆ Serialize()
bool ICOORD::Serialize |
( |
FILE * |
fp | ) |
const |
◆ set_with_shrink()
void ICOORD::set_with_shrink |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Set from the given x,y, shrinking the vector to fit if needed.
Definition at line 40 of file points.cpp.
44 int max_extent = std::max(abs(
x), abs(
y));
45 if (max_extent > INT16_MAX)
46 factor = max_extent / INT16_MAX + 1;
◆ set_x()
void ICOORD::set_x |
( |
int16_t |
xin | ) |
|
|
inline |
rewrite function
Definition at line 60 of file points.h.
◆ set_y()
void ICOORD::set_y |
( |
int16_t |
yin | ) |
|
|
inline |
rewrite function
Definition at line 64 of file points.h.
◆ setup_render()
void ICOORD::setup_render |
( |
ICOORD * |
major_step, |
|
|
ICOORD * |
minor_step, |
|
|
int * |
major, |
|
|
int * |
minor |
|
) |
| const |
Setup for iterating over the pixels in a vector by the well-known Bresenham rendering algorithm. Starting with major/2 in the accumulator, on each step move by major_step, and then add minor to the accumulator. When accumulator >= major subtract major and also move by minor_step.
Definition at line 82 of file points.cpp.
◆ sqlength()
float ICOORD::sqlength |
( |
| ) |
const |
|
inline |
find sq length
Definition at line 72 of file points.h.
◆ x()
int16_t ICOORD::x |
( |
| ) |
const |
|
inline |
access function
Definition at line 51 of file points.h.
◆ y()
int16_t ICOORD::y |
( |
| ) |
const |
|
inline |
access_function
Definition at line 55 of file points.h.
◆ FCOORD
◆ operator!
rotate 90 deg anti
Definition at line 325 of file points.h.
◆ operator%
int32_t operator% |
( |
const ICOORD & |
op1, |
|
|
const ICOORD & |
op2 |
|
) |
| |
|
friend |
scalar product
Definition at line 423 of file points.h.
◆ operator* [1/3]
int32_t operator* |
( |
const ICOORD & |
op1, |
|
|
const ICOORD & |
op2 |
|
) |
| |
|
friend |
◆ operator* [2/3]
◆ operator* [3/3]
◆ operator*=
◆ operator+
◆ operator+=
◆ operator- [1/2]
◆ operator- [2/2]
◆ operator-=
◆ operator/
◆ operator/=
◆ xcoord
◆ ycoord
The documentation for this class was generated from the following files: