OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimFpt.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: David Burken
6 // Description:
7 //
8 // Contains class definitions for ossimFpt.
9 //
10 //*******************************************************************
11 // $Id: ossimFpt.cpp 11399 2007-07-26 13:39:54Z dburken $
12 
13 #include <iostream>
14 #include <iomanip>
15 
16 #include <ossim/base/ossimFpt.h>
17 #include <ossim/base/ossimIpt.h>
18 #include <ossim/base/ossimDpt.h>
19 
20 //*******************************************************************
21 // Public Constructor:
22 //*******************************************************************
24  :
25  x(pt.x), y(pt.y)
26 {
27  if(pt.hasNans())
28  {
29  makeNan();
30  }
31 }
32 
33 //*******************************************************************
34 // Public Constructor:
35 //*******************************************************************
37  :
38  x(pt.x), y(pt.y)
39 {
40  if(pt.hasNans())
41  {
42  makeNan();
43  }
44 }
45 
46 //*******************************************************************
47 // Public Method:
48 //*******************************************************************
50 {
51  x = pt.x;
52  y = pt.y;
53 
54  if(pt.hasNans())
55  {
56  makeNan();
57  }
58  return *this;
59 }
60 
61 //*******************************************************************
62 // Public Method:
63 //*******************************************************************
65 {
66  x = pt.x;
67  y = pt.y;
68  if(pt.hasNans())
69  {
70  makeNan();
71  }
72 
73  return *this;
74 }
75 
76 //*******************************************************************
77 // Public Method:
78 //*******************************************************************
80 {
81  os << std::setiosflags(std::ios::fixed) << std::setprecision(15)
82  << "( " << x << " " << y << " )";
83 }
84 
85 //*******************************************************************
86 // friend function:
87 //*******************************************************************
89 {
90  pt.print(os);
91 
92  return os;
93 }
ossim_uint32 x
void print(std::ostream &os) const
Definition: ossimFpt.cpp:79
void makeNan()
Definition: ossimFpt.h:56
ossim_uint32 y
double y
Definition: ossimDpt.h:165
ossim_float32 x
Definition: ossimFpt.h:70
ossimFpt()
Definition: ossimFpt.h:28
bool hasNans() const
Definition: ossimDpt.h:67
const ossimFpt & operator=(const ossimFpt &pt)
Definition: ossimFpt.h:74
std::ostream & operator<<(std::ostream &os, const ossimFpt &pt)
Definition: ossimFpt.cpp:88
ossim_int32 y
Definition: ossimIpt.h:142
double x
Definition: ossimDpt.h:164
ossim_int32 x
Definition: ossimIpt.h:141
bool hasNans() const
Definition: ossimIpt.h:58
ossim_float32 y
Definition: ossimFpt.h:71
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23