20 friend std::ostream& operator<< (std::ostream&,
USPoint);
29 USPoint (
unsigned short a,
unsigned short b) { x = a; y = b; }
44 USPoint operator() (
unsigned short a,
unsigned short b);
51 bool operator < (
const USPoint &b)
const {
52 if(x*32768 + y < b.x*32768 + b.y)
return true;
74 void set (
int a,
int b) { x = a; y = b; }
75 int get_X() {
return x; }
76 int get_Y() {
return y; }
82 friend std::ostream& operator<< (std::ostream&,
USF3Point);
92 USF3Point () { line = 0; pixel = 0; x = 0;}
93 USF3Point (
unsigned short s_,
unsigned short c_,
float x_) { line = s_; pixel = c_; x = x_;}
95 USF3Point operator() (
unsigned short line_,
unsigned short pixel_,
float x_);
98 line = source_point.line;
99 pixel = source_point.pixel;
103 line = source_point.line;
104 pixel = source_point.pixel;
109 bool operator < (
const USF3Point &b)
const {
110 if(line*32768 + pixel < b.line*32768 + b.pixel)
return true;
114 void set(
int s_,
int c_,
float x_) { line = s_; pixel = c_; x = x_;}
120 friend std::ostream& operator<< (std::ostream&,
USF4Point);
131 USF4Point () { s = 0; c = 0; x = 0; y = 0;}
132 USF4Point (
unsigned short s_,
unsigned short c_,
float x_,
float y_) { s = s_; c = c_; x = x_; y = y_; }
134 USF4Point operator() (
unsigned short s_,
unsigned short c_,
float x_,
float y_);
150 bool operator < (
const USF4Point &b)
const {
151 if(s*32768 + c < b.s*32768 + b.c)
return true;
155 void set(
int s_,
int c_,
float x_,
float y_) { s = s_; c = c_; x = x_; y = y_; }
161 friend std::ostream& operator<< (std::ostream&,
USPointKey);
162 friend std::istream& operator>> (std::istream&,
USPointKey &);
173 USPointKey (
unsigned short a,
unsigned short b,
int key_) { x = a; y = b; key = key_;}
179 key = source_point.key;
184 key = source_point.key;
189 USPointKey operator() (
unsigned short a,
unsigned short b,
int key_);
203 USPointKeyComp(
const bool& revparam=
false) { reverse = revparam; }
207 return (first.key > second.key);
209 else return ( first.key < second.key );
216 friend std::ostream& operator<< (std::ostream&,
Point);
217 friend std::istream& operator>> (std::istream&,
Point &);
226 Point () { x = 0; y = 0; }
227 Point (
int a,
int b) { x = a; y = b; }
230 void set (
int a,
int b) { x = a; y = b; }
231 void get (
int& a,
int& b) { a = x; b = y; }
233 int get_X() {
return x; }
234 int get_Y() {
return y; }
236 void set_X(
int a) { x = a; }
237 void set_Y(
int b) { y = b; }
239 double magnitude () {
return sqrt(x*x + y*y); }
243 bool operator < (
const Point &b)
const {
244 return (x + y*1073741824 < b.x + b.y*1073741824);
247 Point operator() (
int a,
int b);
250 Point operator* (
int a);
254 int operator* (
const Point &a);
255 int operator== (
const Point &a);
257 friend Point operator* (
const int &d,
const Point &a);
263 friend std::ostream& operator<< (std::ostream &stream,
PointKey a) {
264 stream <<
"(" << a.point.x <<
", " << a.point.y <<
", " << a.key <<
")" ;
275 PointKey (
int x_,
int y_,
int key_) { point =
Point(x_, y_); key = key_;}
276 PointKey (
Point point_,
int key_) { point = point_; key = key_;}
280 point = source_point.point;
281 key = source_point.key;
284 point = source_point.point;
285 key = source_point.key;
290 int operator == (
const PointKey &a) {
291 return (point == a.point) && (key = a.key);
294 bool operator < (
const PointKey &a)
const {
329 friend std::ostream& operator<< (std::ostream&,
F2point);
330 friend std::istream& operator>> (std::istream&,
F2point &);
340 F2point (
float a,
float b) { x = a; y = b; }
341 F2point (
float *a) { x = a[0]; y = a[1]; }
357 friend std::ostream& operator<< (std::ostream&,
F3point);
358 friend std::istream& operator>> (std::istream&,
F3point &);
368 F3point () { x = 0; y = 0; z = 0; }
369 F3point (
float a,
float b,
float c) { x = a; y = b; z = c; }
370 F3point (
float *a) { x = a[0]; y = a[1]; z = a[2];}
389 friend std::ostream& operator<< (std::ostream&,
D2point);
390 friend std::istream& operator>> (std::istream&,
D2point &);
400 D2point (
double a,
double b) { x = a; y = b; }
401 D2point (
double *a) { x = a[0]; y = a[1]; }
404 void set (
double a,
double b) { x = a; y = b; }
405 void get (
double& a,
double& b) { a = x; b = y; }
407 double get_X() {
return x; }
408 double get_Y() {
return y; }
410 void set_X(
double a) { x = a; }
411 void set_Y(
double a) { y = a; }
413 double magnitude () {
return sqrt(x*x + y*y); }
417 D2point operator() (
double a,
double b);
421 D2point operator* (
const double &d);
422 D2point operator/ (
const double &d);
426 double operator* (
const D2point &a);
427 int operator== (
const D2point &a)
const;
450 friend std::ostream& operator<< (std::ostream&,
D3point);
451 friend std::istream& operator>> (std::istream&,
D3point &);
462 D3point (
double a,
double b,
double c) { x=a; y=b; z=c; }
463 D3point (
double *a) { x=a[0]; y=a[1]; z=a[2]; }
466 void get (
double& a,
double& b,
double& c) { a=x; b=y; c=z; }
467 double get_Z() {
return z; }
468 void set_Z(
double c) { z = c; }
469 void get (
double& a,
double& b) { a = x; b = y; }
471 double get_x() {
return x; }
472 double get_y() {
return y; }
475 double magnitude ()
const {
return sqrt(x*x + y*y + z*z); }
476 double magnitude2 ()
const {
return x*x + y*y + z*z; }
477 void set(
double xpos,
double ypos,
double zpos) { x=xpos; y=ypos; z=zpos; }
478 void set(
double xpos,
double ypos) { x=xpos; y=ypos; }
483 D3point operator() (
double a,
double b,
double c);
487 D3point operator* (
const double &s);
488 D3point operator/ (
const double &s);
491 D3point operator*= (
const double &s);
492 D3point operator/= (
const double &s);
495 double operator* (
const D3point &a);
496 double operator< (
const D3point &a);
498 int operator== (
const D3point &a);
499 int operator!= (
const D3point &a);
521 friend std::ostream& operator<< (std::ostream&,
Geopoint);
522 friend std::istream& operator>> (std::istream&,
Geopoint&);
531 Geopoint () { lat = 0; lon = 0; alt = 0; }
533 Geopoint (
double Lat,
double Lon,
double Alt = 0.0 ) { lat = Lat; lon = Lon; alt = Alt; }
537 Geopoint operator() (
double Lat,
double Lon,
double Alt );
541 void get (
double& Lat,
double& Lon) { Lat = lat; Lon = lon; }
542 void get (
double& Lat,
double& Lon,
double& Alt) { Lat = lat; Lon = lon; Alt = alt; }
543 void get (
double& Alt) {Alt = alt; }
545 double Lat () {
return lat;}
546 double Lon () {
return lon;}
547 double Alt () {
return alt;}
549 void set(
double Lat,
double Lon,
double Alt){
550 lat = Lat; lon = Lon; alt = Alt;
552 void set_alt(
double Alt){alt = Alt;}
557 lat = source_point.lat;
558 lon = source_point.lon;
559 alt = source_point.alt;