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_);
97 USF3Point(
const USF3Point& source_point) {
98 line = source_point.line;
99 pixel = source_point.pixel;
102 USF3Point& operator=(
const USF3Point& source_point) {
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_);
136 USF4Point(
const USF4Point& source_point) {
142 USF4Point& operator=(
const USF4Point& source_point) {
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 &);
172 USPointKey () { x = 0; y = 0; key = 0; }
173 USPointKey (
unsigned short a,
unsigned short b,
int key_) { x = a; y = b; key = key_;}
176 USPointKey(
const USPointKey& source_point) {
179 key = source_point.key;
181 USPointKey& operator=(
const USPointKey& source_point) {
184 key = source_point.key;
189 USPointKey operator() (
unsigned short a,
unsigned short b,
int key_);
190 int operator== (
const USPointKey &a);
191 bool operator < (
const USPointKey &a)
const {
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);
248 Point operator+ (
const Point &a);
249 Point operator- (
const Point &a);
250 Point operator* (
int a);
251 Point &operator+= (
const Point &a);
252 Point &operator-= (
const Point &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 <<
")" ;
274 PointKey () { point =
Point(0,0); key = 0; }
275 PointKey (
int x_,
int y_,
int key_) { point =
Point(x_, y_); key = key_;}
276 PointKey (
Point point_,
int key_) { point = point_; key = key_;}
279 PointKey(
const PointKey& source_point) {
280 point = source_point.point;
281 key = source_point.key;
283 PointKey& operator=(
const PointKey& source_point) {
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 &);
339 F2point () { x = 0; y = 0; }
340 F2point (
float a,
float b) { x = a; y = b; }
341 F2point (
float *a) { x = a[0]; y = a[1]; }
344 F2point(
const F2point& source_point) {
348 F2point& operator=(
const F2point& source_point) {
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];}
373 F3point(
const F3point& source_point) {
378 F3point& operator=(
const F3point& source_point) {
389 friend std::ostream& operator<< (std::ostream&, D2point);
390 friend std::istream& operator>> (std::istream&, D2point &);
399 D2point () { x = 0; y = 0; }
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);
418 D2point operator+ (
const D2point &a);
420 D2point operator- (
const D2point &a)
const;
421 D2point operator* (
const double &d);
422 D2point operator/ (
const double &d);
423 D2point &operator+= (
const D2point &a);
424 D2point &operator-= (
const D2point &a);
425 D2point operator~ ();
426 double operator* (
const D2point &a);
427 int operator== (
const D2point &a)
const;
429 friend D2point operator*(
const double &d,
const D2point &a);
431 D2point(
const D2point& source_point) {
435 D2point& operator=(
const D2point& source_point) {
450 friend std::ostream& operator<< (std::ostream&, D3point);
451 friend std::istream& operator>> (std::istream&, D3point &);
461 D3point () { x=0; y=0; z=0; }
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);
485 D3point operator+ (
const D3point &a);
486 D3point operator- (
const D3point &a);
487 D3point operator* (
const double &s);
488 D3point operator/ (
const double &s);
489 D3point operator+= (
const D3point &a);
490 D3point operator-= (
const D3point &a);
491 D3point operator*= (
const double &s);
492 D3point operator/= (
const double &s);
493 D3point operator&& (
const D3point &a);
495 double operator* (
const D3point &a);
496 double operator< (
const D3point &a);
498 int operator== (
const D3point &a);
499 int operator!= (
const D3point &a);
501 friend D3point operator*(
const double &s,
const D3point &a);
503 D3point(
const D3point& source_point) {
508 D3point& operator=(
const D3point& source_point) {
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 );
539 Geopoint& operator= (
const Geopoint&);
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;}
556 Geopoint(
const Geopoint& source_point) {
557 lat = source_point.lat;
558 lon = source_point.lon;
559 alt = source_point.alt;