148 int* major,
int* minor)
const;
226 return xcoord * xcoord + ycoord * ycoord;
231 return (
float) sqrt (sqlength ());
238 gap.xcoord = xcoord - pt.xcoord;
239 gap.ycoord = ycoord - pt.ycoord;
245 return (
float) sqrt (pt_to_pt_sqdist (pt));
250 return (
float) atan2 (ycoord, xcoord);
254 uinT8 to_direction()
const;
261 static uinT8 binary_angle_plus_pi(
double angle);
269 FCOORD nearest_pt_on_line(
const FCOORD& line_point,
270 const FCOORD& dir_vector)
const;
276 BOOL8 operator== (
const FCOORD & other) {
277 return xcoord == other.xcoord && ycoord == other.ycoord;
280 BOOL8 operator!= (
const FCOORD & other) {
281 return xcoord != other.xcoord || ycoord != other.ycoord;
284 friend FCOORD
operator! (
const FCOORD &);
286 friend FCOORD
operator- (
const FCOORD &);
288 friend FCOORD
operator+ (
const FCOORD &,
const FCOORD &);
290 friend FCOORD &
operator+= (FCOORD &,
const FCOORD &);
292 friend FCOORD
operator- (
const FCOORD &,
const FCOORD &);
294 friend FCOORD &
operator-= (FCOORD &,
const FCOORD &);
296 friend float operator% (
const FCOORD &,
const FCOORD &);
298 friend float operator *(
const FCOORD &,
const FCOORD &);
300 friend FCOORD
operator *(
const FCOORD &,
float);
302 friend FCOORD
operator *(
float,
const FCOORD &);
307 friend FCOORD
operator/ (
const FCOORD &,
float);
310 void rotate(
const FCOORD vec);
313 void unrotate(
const FCOORD &vec);
void set_x(inT16 xin)
rewrite function
float pt_to_pt_sqdist(const ICOORD &pt) const
sq dist between pts
friend ICOORD & operator-=(ICOORD &, const ICOORD &)
subtract
friend inT32 operator%(const ICOORD &, const ICOORD &)
scalar product
static ICOORDELT * deep_copy(const ICOORDELT *src)
friend inT32 operator*(const ICOORD &, const ICOORD &)
cross product
float angle() const
find angle
int direction(EDGEPT *point)
friend ICOORD operator+(const ICOORD &, const ICOORD &)
add
float pt_to_pt_dist(const ICOORD &pt) const
Distance between pts.
BOOL8 operator==(const ICOORD &other) const
test equality
ICOORD operator!(const ICOORD &src)
bool Serialize(FILE *fp) const
friend ICOORD operator-(const ICOORD &)
unary minus
float pt_to_pt_sqdist(const FCOORD &pt) const
sq dist between pts
float length() const
find length
bool DeSerialize(bool swap, FILE *fp)
float angle() const
find angle
void rotate(const FCOORD &vec)
inT32 operator%(const ICOORD &op1, const ICOORD &op2)
FCOORD()
empty constructor
friend ICOORD & operator+=(ICOORD &, const ICOORD &)
add
float pt_to_pt_dist(const FCOORD &pt) const
Distance between pts.
ICOORDELT(ICOORD icoord)
constructor from ICOORD
inT16 y() const
access_function
ICOORD operator-(const ICOORD &src)
void set_x(float xin)
rewrite function
ICOORD()
empty constructor
void set_y(float yin)
rewrite function
float length() const
find length
float sqlength() const
find sq length
#define ELISTIZEH(CLASSNAME)
FCOORD(float xvalue, float yvalue)
BOOL8 operator!=(const ICOORD &other) const
test inequality
friend ICOORD operator/(const ICOORD &, inT16)
divide
ICOORD operator+(const ICOORD &op1, const ICOORD &op2)
ICOORD & operator-=(ICOORD &op1, const ICOORD &op2)
void set_y(inT16 yin)
rewrite function
inT16 x() const
access function
friend ICOORD & operator*=(ICOORD &, inT16)
multiply
inT32 operator*(const ICOORD &op1, const ICOORD &op2)
friend ICOORD operator!(const ICOORD &)
rotate 90 deg anti
ICOORD(inT16 xin, inT16 yin)
ICOORDELT()
empty constructor
float sqlength() const
find sq length
ICOORD & operator/=(ICOORD &op1, inT16 scale)
void set_with_shrink(int x, int y)
Set from the given x,y, shrinking the vector to fit if needed.
ICOORD & operator+=(ICOORD &op1, const ICOORD &op2)
friend ICOORD & operator/=(ICOORD &, inT16)
divide
ICOORDELT(inT16 xin, inT16 yin)
void setup_render(ICOORD *major_step, ICOORD *minor_step, int *major, int *minor) const
ICOORD operator/(const ICOORD &op1, inT16 scale)
ICOORD & operator*=(ICOORD &op1, inT16 scale)