OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimDrect.h
Go to the documentation of this file.
1 //*******************************************************************
2 // Copyright (C) 2000 ImageLinks Inc.
3 //
4 // License: MIT
5 //
6 // See LICENSE.txt file in the top level directory for more details.
7 //
8 // Author: David Burken
9 //
10 // Description:
11 //
12 // Contains class declaration for drect.
13 // Container class for four double points representing a rectangle.
14 //
15 //*******************************************************************
16 // $Id: ossimDrect.h 22197 2013-03-12 02:00:55Z dburken $
17 
18 #ifndef ossimDrect_HEADER
19 #define ossimDrect_HEADER
20 
21 #include <iosfwd>
22 #include <vector>
23 
24 #include <ossim/base/ossimDpt.h>
25 #include <ossim/base/ossimIpt.h>
26 #include <ossim/base/ossimFpt.h>
27 
28 //***
29 // NOTE: A word on corner points...
30 //
31 // There is the concept of "pixel is area" and "pixel is point".
32 // - Pixel is area means the (x,y) pixel coordinate refers to the upper left
33 // corner of the pixel, NOT the center of the pixel.
34 // - Pixel is point means the (x,y) pixel coordinate refers to the center
35 // of the pixel, NOT the upper left corner.
36 //
37 // For the uniformity purposes, all pixel points should be in the
38 // "pixel is point" form; therefore, the (x,y) point should represent the
39 // CENTER of the pixel.
40 //***
41 
42 //***
43 // Forward class declarations.
44 //***
45 class ossimIrect;
46 class ossimPolygon;
47 class ossimKeywordlist;
48 
49 //*******************************************************************
50 // CLASS: ossimDrect
51 //*******************************************************************
52 
54 {
55 public:
56  enum
57  {
58  UPPER_LEFT = 1,
59  LOWER_LEFT = 2,
60  LOWER_RIGHT = 4,
61  UPPER_RIGHT = 8
62  };
63 
65  :
66  theUlCorner(0.0, 0.0),
67  theUrCorner(0.0, 0.0),
68  theLrCorner(0.0, 0.0),
69  theLlCorner(0.0, 0.0),
70  theOrientMode(OSSIM_LEFT_HANDED)
71  {}
72 
73  ossimDrect(const ossimDpt& ul_corner,
74  const ossimDpt& lr_corner,
76  :
77  theUlCorner(ul_corner),
78  theUrCorner(lr_corner.x, ul_corner.y),
79  theLrCorner(lr_corner),
80  theLlCorner(ul_corner.x, lr_corner.y),
81  theOrientMode(mode)
82  {
83  }
84 
85  ossimDrect(const double& ul_corner_x,
86  const double& ul_corner_y,
87  const double& lr_corner_x,
88  const double& lr_corner_y,
90  :
91  theUlCorner(ul_corner_x, ul_corner_y),
92  theUrCorner(lr_corner_x, ul_corner_y),
93  theLrCorner(lr_corner_x, lr_corner_y),
94  theLlCorner(ul_corner_x, lr_corner_y),
95  theOrientMode(mode)
96  {}
97 
98  ossimDrect(const ossimDrect& rect)
99  :
100  theUlCorner(rect.ul()),
101  theUrCorner(rect.ur()),
102  theLrCorner(rect.lr()),
103  theLlCorner(rect.ll()),
104  theOrientMode(rect.orientMode())
105  {}
106 
107  ossimDrect(const ossimIrect& rect);
108 
112  ossimDrect(const std::vector<ossimDpt>& points,
114  ossimDrect(const ossimDpt& p1,
115  const ossimDpt& p2,
116  const ossimDpt& p3,
117  const ossimDpt& p4,
119  ossimDrect(const ossimPolygon& polygon,
121 
123  ~ossimDrect();
124 
126  ossimDrect(const ossimDpt& center,
127  const double& size_x,
128  const double& size_y,
130 
131  inline const ossimDrect& operator= (const ossimDrect& rect);
132  const ossimDrect& operator= (const ossimIrect& rect);
133  inline bool operator!= (const ossimDrect& rect) const;
134  inline bool operator== (const ossimDrect& rect) const;
135 
136  friend ossimDrect operator*(double scalar, const ossimDrect& rect)
137  {
138  ossimDpt ul(rect.theUlCorner.x*scalar,
139  rect.theUlCorner.y*scalar);
140 
141  if(rect.theOrientMode == OSSIM_LEFT_HANDED)
142  {
143  return ossimDrect(ul.x,
144  ul.y,
145  ul.x+rect.width()*scalar-1,
146  ul.y+rect.height()*scalar-1,
147  rect.theOrientMode);
148  }
149  return ossimDrect(ul.x,
150  ul.y,
151  ul.x+rect.width()*scalar-1,
152  ul.y-(rect.height()*scalar-1),
153  rect.theOrientMode);
154 
155  }
156 
157  const ossimDrect& operator *=(double scalar)
158  {
159  ossimDpt ul(theUlCorner.x*scalar,
160  theUlCorner.y*scalar);
161 
162  if(theOrientMode == OSSIM_LEFT_HANDED)
163  {
164  *this = ossimDrect(ul.x,
165  ul.y,
166  (ul.x+width()*scalar-1),
167  (ul.y+height()*scalar-1),
168  theOrientMode);
169  }
170  else
171  {
172  *this = ossimDrect(ul.x,
173  ul.y,
174  (ul.x+width()*scalar-1),
175  (ul.y-(height()*scalar-1)),
176  theOrientMode);
177 
178  }
179  return *this;
180  }
181 
182  ossimDrect operator *(double scalar)const
183  {
184  ossimDpt ul((theUlCorner.x*scalar),
185  (theUlCorner.y*scalar));
186 
187  if(theOrientMode == OSSIM_LEFT_HANDED)
188  {
189  return ossimDrect(ul.x,
190  ul.y,
191  (ul.x+width()*scalar-1),
192  (ul.y+height()*scalar-1),
193  theOrientMode);
194  }
195 
196  return ossimDrect(ul.x,
197  ul.y,
198  (ul.x+width()*scalar-1),
199  ul.y-(height()*scalar-1),
200  theOrientMode);
201  }
202  const ossimDrect& operator *=(const ossimDpt& scalar)
203  {
204  ossimDpt ul((theUlCorner.x*scalar.x),
205  (theUlCorner.y*scalar.y));
206 
207  if(theOrientMode == OSSIM_LEFT_HANDED)
208  {
209  *this = ossimDrect(ul.x,
210  ul.y,
211  (ul.x+width()*scalar.x - 1),
212  (ul.y+height()*scalar.y - 1),
213  theOrientMode);
214  }
215  else
216  {
217  *this = ossimDrect(ul.x,
218  ul.y,
219  (ul.x+width()*scalar.x - 1),
220  (ul.y-(height()*scalar.y - 1)),
221  theOrientMode);
222  }
223  return *this;
224  }
225 
226  ossimDrect operator *(const ossimDpt& scalar)const
227  {
228  ossimDpt ul((theUlCorner.x*scalar.x),
229  (theUlCorner.y*scalar.y));
230 
231  if(theOrientMode == OSSIM_LEFT_HANDED)
232  {
233  return ossimDrect(ul.x,
234  ul.y,
235  (ul.x+width()*scalar.x-1),
236  (ul.y+height()*scalar.y-1),
237  theOrientMode);
238  }
239  return ossimDrect(ul.x,
240  ul.y,
241  (ul.x+width()*scalar.x-1),
242  (ul.y-(height()*scalar.y-1)),
243  theOrientMode);
244  }
245  const ossimDrect& operator +=(const ossimDpt& shift)
246  {
247  ossimDpt ul((theUlCorner.x+shift.x),
248  (theUlCorner.y+shift.y));
249 
250  if(theOrientMode == OSSIM_LEFT_HANDED)
251  {
252  *this = ossimDrect(ul.x,
253  ul.y,
254  ul.x+width()-1,
255  ul.y+height()-1,
256  theOrientMode);
257  }
258  else
259  {
260  *this = ossimDrect(ul.x,
261  ul.y,
262  ul.x+width()-1,
263  ul.y-(height()-1),
264  theOrientMode);
265  }
266  return *this;
267  }
268 
269  const ossimDrect& operator -=(const ossimDpt& shift)
270  {
271  ossimDpt ul((theUlCorner.x-shift.x),
272  (theUlCorner.y-shift.y));
273 
274  if(theOrientMode == OSSIM_LEFT_HANDED)
275  {
276  *this = ossimDrect(ul.x,
277  ul.y,
278  ul.x+width()-1,
279  ul.y+height()-1,
280  theOrientMode);
281  }
282  else
283  {
284  *this = ossimDrect(ul.x,
285  ul.y,
286  ul.x+width()-1,
287  ul.y-(height()-1),
288  theOrientMode);
289  }
290  return *this;
291  }
292 
293  ossimDrect operator +(const ossimDpt& shift)const
294  {
295  ossimDpt ul((theUlCorner.x+shift.x),
296  (theUlCorner.y+shift.y));
297 
298  if(theOrientMode == OSSIM_LEFT_HANDED)
299  {
300  return ossimDrect(ul.x,
301  ul.y,
302  ul.x+width()-1,
303  ul.y+height()-1,
304  theOrientMode);
305  }
306  else
307  {
308  return ossimDrect(ul.x,
309  ul.y,
310  ul.x+width()-1,
311  ul.y-(height()-1),
312  theOrientMode);
313  }
314  }
315 
316  ossimDrect operator -(const ossimDpt& shift)const
317  {
318  ossimIpt ul(ossim::round<int>(theUlCorner.x-shift.x),
319  ossim::round<int>(theUlCorner.y-shift.y));
320 
321  if(theOrientMode == OSSIM_LEFT_HANDED)
322  {
323  return ossimDrect(ul.x,
324  ul.y,
325  ul.x+width()-1,
326  ul.y+height()-1,
327  theOrientMode);
328  }
329  else
330  {
331  return ossimDrect(ul.x,
332  ul.y,
333  ul.x+width()-1,
334  ul.y-(height()-1),
335  theOrientMode);
336  }
337  }
338 
339  const ossimDpt& ul() const { return theUlCorner; }
340  const ossimDpt& ur() const { return theUrCorner; }
341  const ossimDpt& lr() const { return theLrCorner; }
342  const ossimDpt& ll() const { return theLlCorner; }
343 
345  {
346  // if we are already in the orientation then return
347  //
348  if(mode == theOrientMode) return *this;
349  if(mode == OSSIM_LEFT_HANDED)
350  {
351  // we must be right handed so change to left handed
352  *this = ossimDrect(theUlCorner.x,
353  theLlCorner.y,
354  theLrCorner.x,
355  theUlCorner.y,
357  }
358  else
359  {
360  // we must be left handed so change to RIGHT handed
361  *this = ossimDrect(theUlCorner.x,
362  theLlCorner.y,
363  theLrCorner.x,
364  theUlCorner.y,
366  }
367  theOrientMode = mode;
368 
369  return *this;
370  }
371 
372  void getBounds(double& minx, double& miny,
373  double& maxx, double& maxy)const
374  {
375  minx = theUlCorner.x;
376  maxx = theUrCorner.x;
377  if(theOrientMode == OSSIM_LEFT_HANDED)
378  {
379  miny = theUlCorner.y;
380  maxy = theLrCorner.y;
381  }
382  else
383  {
384  maxy = theUlCorner.y;
385  miny = theLrCorner.y;
386  }
387  }
388  void makeNan()
389  {
390  theUlCorner.makeNan();
391  theLlCorner.makeNan();
392  theLrCorner.makeNan();
393  theUrCorner.makeNan();
394  }
395 
396  bool hasNans()const{ return (theUlCorner.hasNans() ||
397  theLlCorner.hasNans() ||
398  theLrCorner.hasNans() ||
399  theUrCorner.hasNans());}
400 
401  bool isNan()const{ return (theUlCorner.hasNans() &&
402  theLlCorner.hasNans() &&
403  theLrCorner.hasNans() &&
404  theUrCorner.hasNans());}
405 
406  double area()const
407  {
408  return width()*height();
409  }
410  //***
411  // This class supports both left and right-handed coordinate systems. For
412  // both, the positive x-axis extends to the "right".
413  //***
414  ossimCoordSysOrientMode orientMode() const { return theOrientMode; }
415  void setOrientMode(ossimCoordSysOrientMode mode) { theOrientMode = mode; }
416 
421  inline void set_ul(const ossimDpt& pt);
422 
427  inline void set_ur(const ossimDpt& pt);
428 
433  inline void set_lr(const ossimDpt& pt);
434 
439  inline void set_ll(const ossimDpt& pt);
440 
444  inline void set_ulx(ossim_float64 x);
445 
449  inline void set_uly(ossim_float64 y);
450 
454  inline void set_urx(ossim_float64 x);
455 
459  inline void set_ury(ossim_float64 y);
460 
464  inline void set_lrx(ossim_float64 x);
465 
469  inline void set_lry(ossim_float64 y);
470 
474  inline void set_llx(ossim_float64 x);
475 
479  inline void set_lly(ossim_float64 y);
480 
486  void initBoundingRect(const std::vector<ossimDpt>& points);
487 
493  bool pointWithin(const ossimDpt& pt, double epsilon=0.0) const;
494 
499  bool pointWithin(const ossimFpt& pt, double epsilon=0.0) const;
500 
505  bool intersects(const ossimDrect& rect) const;
506 
511  bool completely_within(const ossimDrect& rect) const;
512 
513  ossimCoordSysOrientMode orientationMode()const{return theOrientMode;}
517  ossim_float64 height() const { return fabs(theLlCorner.y - theUlCorner.y) + 1.0; }
518 
522  ossim_float64 width() const { return fabs(theLrCorner.x - theLlCorner.x) + 1.0; }
523 
524  ossimDpt size() const { return ossimDpt(width(), height()); }
525 
529  void stretchOut();
530 
534  void stretchToTileBoundary(const ossimDpt& widthHeight);
535 
536  const ossimDrect& expand(const ossimDpt& padding);
537 
551  ossimString toString()const;
566  bool toRect(const ossimString& rectString);
567 
568  bool saveState(ossimKeywordlist& kwl,
569  const char* prefix=0)const;
570  bool loadState(const ossimKeywordlist& kwl,
571  const char* prefix=0);
572 
576  void splitToQuad(ossimDrect& ulRect,
577  ossimDrect& urRect,
578  ossimDrect& lrRect,
579  ossimDrect& llRect);
580 
585  ossimDpt findClosestEdgePointTo(const ossimDpt& arg_point) const;
586 
587  ossimDrect clipToRect(const ossimDrect& rect)const;
588 
589  inline ossimDpt midPoint()const;
590 
591  void print(std::ostream& os) const;
592 
593  ossimDrect combine(const ossimDrect& rect)const;
594 
596  const ossimDrect& rect);
597 
598  bool clip(ossimDpt &p1,
599  ossimDpt &p2)const;
600 
601  static long getCode(const ossimDpt& aPoint,
602  const ossimDrect& clipRect);
603 private:
604 
606  {
607  NONE = 0,
608  LEFT = 1,
609  RIGHT = 2,
610  BOTTOM = 4,
611  TOP = 8
612  };
613 
614  //***
615  // Private data members representing the rectangle corners.
616  //***
621 
623 };
624 
625 //*******************************************************************
626 // Inline Method: ossimDrect::operator=(ossimDrect)
627 //*******************************************************************
628 inline const ossimDrect& ossimDrect::operator=(const ossimDrect& rect)
629 {
630  if (this != &rect)
631  {
632  theUlCorner = rect.theUlCorner;
633  theUrCorner = rect.theUrCorner;
634  theLrCorner = rect.theLrCorner;
635  theLlCorner = rect.theLlCorner;
637  }
638 
639  return *this;
640 }
641 
642 //*******************************************************************
643 // Inline Method: ossimDrect::operator!=
644 //*******************************************************************
645 inline bool ossimDrect::operator!=(const ossimDrect& rect) const
646 {
647  return ( (theUlCorner != rect.theUlCorner) ||
648  (theUrCorner != rect.theUrCorner) ||
649  (theLrCorner != rect.theLrCorner) ||
650  (theLlCorner != rect.theLlCorner) ||
651  (theOrientMode != rect.theOrientMode));
652 }
653 
654 //*******************************************************************
655 // Inline Method: ossimDrect::operator==
656 //*******************************************************************
657 inline bool ossimDrect::operator==(const ossimDrect& rect) const
658 {
659  return ( (theUlCorner == rect.theUlCorner) &&
660  (theUrCorner == rect.theUrCorner) &&
661  (theLrCorner == rect.theLrCorner) &&
662  (theLlCorner == rect.theLlCorner) &&
663  (theOrientMode == rect.theOrientMode));
664 }
665 
666 //*******************************************************************
667 // Inline Method: ossimDrect::set_ul
668 //*******************************************************************
669 inline void ossimDrect::set_ul(const ossimDpt& pt)
670 {
671  theUlCorner = pt;
672  theUrCorner.y = pt.y;
673  theLlCorner.x = pt.x;
674 }
675 
676 //*******************************************************************
677 // Inline Method: ossimDrect::set_ur
678 //*******************************************************************
679 inline void ossimDrect::set_ur(const ossimDpt& pt)
680 {
681  theUrCorner = pt;
682  theUlCorner.y = pt.y;
683  theLrCorner.x = pt.x;
684 }
685 
686 //*******************************************************************
687 // Inline Method: ossimDrect::set_lr
688 //*******************************************************************
689 inline void ossimDrect::set_lr(const ossimDpt& pt)
690 {
691  theLrCorner = pt;
692  theUrCorner.x = pt.x;
693  theLlCorner.y = pt.y;
694 }
695 
696 //*******************************************************************
697 // Inline Method: ossimDrect::set_ll
698 //*******************************************************************
699 inline void ossimDrect::set_ll(const ossimDpt& pt)
700 {
701  theLlCorner = pt;
702  theUlCorner.x = pt.x;
703  theLrCorner.y = pt.y;
704 }
705 
706 //*******************************************************************
707 // Inline Method: ossimDrect::set_ulx
708 //*******************************************************************
710 {
711  theUlCorner.x = x;
712  theLlCorner.x = x;
713 }
714 
715 //*******************************************************************
716 // Inline Method: ossimDrect::set_uly
717 //*******************************************************************
719 {
720  theUlCorner.y = y;
721  theUrCorner.y = y;
722 }
723 
724 //*******************************************************************
725 // Inline Method: ossimDrect::set_urx
726 //*******************************************************************
728 {
729  theUrCorner.x = x;
730  theLrCorner.x = x;
731 }
732 
733 //*******************************************************************
734 // Inline Method: ossimDrect::set_ury
735 //*******************************************************************
737 {
738  theUrCorner.y = y;
739  theUlCorner.y = y;
740 }
741 
742 //*******************************************************************
743 // Inline Method: ossimDrect::set_lrx
744 //*******************************************************************
746 {
747  theLrCorner.x = x;
748  theUrCorner.x = x;
749 }
750 
751 //*******************************************************************
752 // Inline Method: ossimDrect::set_lry
753 //*******************************************************************
755 {
756  theLrCorner.y = y;
757  theLlCorner.y = y;
758 }
759 
760 //*******************************************************************
761 // Inline Method: ossimDrect::set_llx
762 //*******************************************************************
764 {
765  theLlCorner.x = x;
766  theUlCorner.x = x;
767 }
768 
769 //*******************************************************************
770 // Inline Method: ossimDrect::set_lly
771 //*******************************************************************
773 {
774  theLlCorner.y = y;
775  theLrCorner.y = y;
776 }
777 
778 //*******************************************************************
779 // Inline Method: ossimDrect::pointWithin(const ossimDpt& pt)
780 //*******************************************************************
781 inline bool ossimDrect::pointWithin(const ossimDpt& pt, double epsilon) const
782 {
784  {
785  return ((pt.x >= (ul().x-epsilon)) &&
786  (pt.x <= (ur().x+epsilon)) &&
787  (pt.y >= (ul().y-epsilon)) &&
788  (pt.y <= (ll().y+epsilon)));
789  }
790  return ((pt.x >= (ul().x-epsilon)) &&
791  (pt.x <= (ur().x+epsilon)) &&
792  (pt.y <= (ul().y+epsilon)) &&
793  (pt.y >= (ll().y-epsilon)));
794 }
795 
796 //*******************************************************************
797 // Inline Method: ossimDrect::pointWithin(const ossimFpt& pt)
798 //*******************************************************************
799 inline bool ossimDrect::pointWithin(const ossimFpt& pt, double epsilon) const
800 {
802  {
803  return ((pt.x >= (ul().x-epsilon)) &&
804  (pt.x <= (ur().x+epsilon)) &&
805  (pt.y >= (ul().y-epsilon)) &&
806  (pt.y <= (ll().y+epsilon)));
807  }
808  return ((pt.x >= (ul().x-epsilon)) &&
809  (pt.x <= (ur().x+epsilon)) &&
810  (pt.y <= (ul().y+epsilon)) &&
811  (pt.y >= (ll().y-epsilon)));
812 }
813 
814 //*******************************************************************
815 // Inline Method: ossimDrect::midPoint()
816 //*******************************************************************
818 {
819  return ossimDpt( (ul().x + ur().x + ll().x + lr().x)*.25,
820  (ul().y + ur().y + ll().y + lr().y)*.25);
821 }
822 
823 //*******************************************************************
824 // Inline Method: ossimDrect::combine(const ossimDrect& rect)
825 //*******************************************************************
826 inline ossimDrect ossimDrect::combine(const ossimDrect& rect)const
827 {
828  if(rect.hasNans() || hasNans())
829  {
830  ossimDrect result;
831 
832  result.makeNan();
833 
834  return result;
835  }
836  if (theOrientMode != rect.theOrientMode)
837  return(*this);
838 
839  ossimDpt ulCombine;
840  ossimDpt lrCombine;
841 
843  {
844  ulCombine.x = ((ul().x <= rect.ul().x)?ul().x:rect.ul().x);
845  ulCombine.y = ((ul().y <= rect.ul().y)?ul().y:rect.ul().y);
846  lrCombine.x = ((lr().x >= rect.lr().x)?lr().x:rect.lr().x);
847  lrCombine.y = ((lr().y >= rect.lr().y)?lr().y:rect.lr().y);
848  }
849  else
850  {
851  ulCombine.x = ((ul().x <= rect.ul().x)?ul().x:rect.ul().x);
852  ulCombine.y = ((ul().y >= rect.ul().y)?ul().y:rect.ul().y);
853  lrCombine.x = ((lr().x >= rect.lr().x)?lr().x:rect.lr().x);
854  lrCombine.y = ((lr().y <= rect.lr().y)?lr().y:rect.lr().y);
855  }
856 
857  return ossimDrect(ulCombine, lrCombine, theOrientMode);
858 }
859 #endif
void set_ul(const ossimDpt &pt)
Definition: ossimDrect.h:669
void set_uly(ossim_float64 y)
Definition: ossimDrect.h:718
void makeNan()
Definition: ossimDrect.h:388
ossim_uint32 x
ossimDpt theLlCorner
Definition: ossimDrect.h:620
bool pointWithin(const ossimDpt &pt, double epsilon=0.0) const
Definition: ossimDrect.h:781
bool isNan() const
Definition: ossimDrect.h:401
ossimRationalNumber operator-(ossim_int32 i, ossimRationalNumber &r)
void set_ulx(ossim_float64 x)
Definition: ossimDrect.h:709
#define OSSIMDLLEXPORT
ossim_float64 width() const
Definition: ossimDrect.h:522
bool operator!=(const ossimRefPtr< _Tp1 > &__a, const ossimRefPtr< _Tp2 > &__b) noexcept
Definition: ossimRefPtr.h:111
bool operator==(const ossimDrect &rect) const
Definition: ossimDrect.h:657
Represents serializable keyword/value map.
bool operator!=(const ossimDrect &rect) const
Definition: ossimDrect.h:645
ossim_uint32 y
void set_ury(ossim_float64 y)
Definition: ossimDrect.h:736
void combine(const std::string &left, const std::string &right, char separator, std::string &result)
const ossimDpt & ul() const
Definition: ossimDrect.h:339
double y
Definition: ossimDpt.h:165
void set_llx(ossim_float64 x)
Definition: ossimDrect.h:763
ossimDpt theUrCorner
Definition: ossimDrect.h:618
std::ostream & print(H5::H5File *file, std::ostream &out)
Print method.
Definition: ossimH5Util.cpp:41
ossimDrect combine(const ossimDrect &rect) const
Definition: ossimDrect.h:826
ossimRationalNumber operator*(ossim_int32 i, ossimRationalNumber &r)
const ossimDrect & operator=(const ossimDrect &rect)
Definition: ossimDrect.h:628
ossimCoordSysOrientMode orientMode() const
Definition: ossimDrect.h:414
void set_urx(ossim_float64 x)
Definition: ossimDrect.h:727
ossimCoordSysOrientMode
double ossim_float64
ostream & operator<<(ostream &out, const ossimAxes &axes)
Definition: ossimAxes.h:88
void set_lry(ossim_float64 y)
Definition: ossimDrect.h:754
ossim_float32 x
Definition: ossimFpt.h:70
void set_ll(const ossimDpt &pt)
Definition: ossimDrect.h:699
ossimCohenSutherlandClipCodes
Definition: ossimDrect.h:605
const ossimDrect & changeOrientationMode(ossimCoordSysOrientMode mode)
Definition: ossimDrect.h:344
bool hasNans() const
Definition: ossimDrect.h:396
bool operator==(const ossimRefPtr< _Tp1 > &__a, const ossimRefPtr< _Tp2 > &__b) noexcept
Definition: ossimRefPtr.h:101
ossim_float64 height() const
Definition: ossimDrect.h:517
ossimDpt theLrCorner
Definition: ossimDrect.h:619
ossimCoordSysOrientMode theOrientMode
Definition: ossimDrect.h:622
ossimDpt theUlCorner
Definition: ossimDrect.h:617
ossimDrect(const ossimDrect &rect)
Definition: ossimDrect.h:98
void set_lly(ossim_float64 y)
Definition: ossimDrect.h:772
ossimDpt size() const
Definition: ossimDrect.h:524
ossimDpt midPoint() const
Definition: ossimDrect.h:817
ossim_int32 y
Definition: ossimIpt.h:142
const ossimDpt & ur() const
Definition: ossimDrect.h:340
void setOrientMode(ossimCoordSysOrientMode mode)
Definition: ossimDrect.h:415
double x
Definition: ossimDpt.h:164
ossim_int32 x
Definition: ossimIpt.h:141
const ossimDpt & ll() const
Definition: ossimDrect.h:342
ossimDrect(const double &ul_corner_x, const double &ul_corner_y, const double &lr_corner_x, const double &lr_corner_y, ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED)
Definition: ossimDrect.h:85
void getBounds(double &minx, double &miny, double &maxx, double &maxy) const
Definition: ossimDrect.h:372
void set_lr(const ossimDpt &pt)
Definition: ossimDrect.h:689
ossim_float32 y
Definition: ossimFpt.h:71
void set_lrx(ossim_float64 x)
Definition: ossimDrect.h:745
const ossimDpt & lr() const
Definition: ossimDrect.h:341
int completely_within(extent_type extent1, extent_type extent2)
ossimRationalNumber operator+(ossim_int32 i, ossimRationalNumber &r)
ossimCoordSysOrientMode orientationMode() const
Definition: ossimDrect.h:513
void set_ur(const ossimDpt &pt)
Definition: ossimDrect.h:679
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
double area() const
Definition: ossimDrect.h:406
friend ossimDrect operator*(double scalar, const ossimDrect &rect)
Definition: ossimDrect.h:136
ossimDrect(const ossimDpt &ul_corner, const ossimDpt &lr_corner, ossimCoordSysOrientMode mode=OSSIM_LEFT_HANDED)
Definition: ossimDrect.h:73