OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
ossimLsrPoint Class Reference

#include <ossimLsrPoint.h>

Public Member Functions

 ossimLsrPoint ()
 
 ossimLsrPoint (const ossimLsrPoint &copy_this)
 
 ossimLsrPoint (const ossimColumnVector3d &assign_this, const ossimLsrSpace &space)
 
 ossimLsrPoint (const double &x, const double &y, const double &z, const ossimLsrSpace &space)
 
 ossimLsrPoint (const ossimLsrPoint &convert_this, const ossimLsrSpace &)
 
 ossimLsrPoint (const ossimGpt &convert_this, const ossimLsrSpace &)
 
 ossimLsrPoint (const ossimEcefPoint &convert_this, const ossimLsrSpace &)
 
const ossimLsrPointoperator= (const ossimLsrPoint &)
 
ossimLsrVector operator- (const ossimLsrPoint &) const
 
ossimLsrPoint operator+ (const ossimLsrVector &) const
 
bool operator== (const ossimLsrPoint &) const
 
bool operator!= (const ossimLsrPoint &) const
 
 operator ossimEcefPoint () const
 
double x () const
 
double & x ()
 
double y () const
 
double & y ()
 
double z () const
 
double & z ()
 
ossimColumnVector3ddata ()
 
const ossimColumnVector3ddata () const
 
ossimLsrSpacelsrSpace ()
 
const ossimLsrSpacelsrSpace () const
 
bool hasNans () const
 
void makeNan ()
 
void print (ostream &stream=ossimNotify(ossimNotifyLevel_INFO)) const
 

Protected Member Functions

void initialize (const ossimEcefPoint &ecef_point)
 

Protected Attributes

ossimColumnVector3d theData
 
ossimLsrSpace theLsrSpace
 

Friends

ostream & operator<< (ostream &os, const ossimLsrPoint &instance)
 

Detailed Description

Definition at line 33 of file ossimLsrPoint.h.

Constructor & Destructor Documentation

◆ ossimLsrPoint() [1/7]

ossimLsrPoint::ossimLsrPoint ( )
inline

CONSTRUCTORS:

Definition at line 39 of file ossimLsrPoint.h.

Referenced by operator+().

40  : theData(0,0,0) {}
ossimColumnVector3d theData

◆ ossimLsrPoint() [2/7]

ossimLsrPoint::ossimLsrPoint ( const ossimLsrPoint copy_this)
inline

Definition at line 42 of file ossimLsrPoint.h.

43  : theData(copy_this.theData), theLsrSpace(copy_this.theLsrSpace) {}
ossimLsrSpace theLsrSpace
ossimColumnVector3d theData

◆ ossimLsrPoint() [3/7]

ossimLsrPoint::ossimLsrPoint ( const ossimColumnVector3d assign_this,
const ossimLsrSpace space 
)
inline

Definition at line 45 of file ossimLsrPoint.h.

47  : theData(assign_this), theLsrSpace(space) {}
ossimLsrSpace theLsrSpace
ossimColumnVector3d theData

◆ ossimLsrPoint() [4/7]

ossimLsrPoint::ossimLsrPoint ( const double &  x,
const double &  y,
const double &  z,
const ossimLsrSpace space 
)
inline

Definition at line 49 of file ossimLsrPoint.h.

53  : theData(x, y, z), theLsrSpace(space) {}
double z() const
Definition: ossimLsrPoint.h:88
double x() const
Definition: ossimLsrPoint.h:84
ossimLsrSpace theLsrSpace
ossimColumnVector3d theData
double y() const
Definition: ossimLsrPoint.h:86

◆ ossimLsrPoint() [5/7]

ossimLsrPoint::ossimLsrPoint ( const ossimLsrPoint convert_this,
const ossimLsrSpace new_space 
)

Definition at line 38 of file ossimLsrPoint.cpp.

References initialize().

40  : theLsrSpace(new_space)
41 {
42  initialize(ossimEcefPoint(convert_this));
43 }
void initialize(const ossimEcefPoint &ecef_point)
ossimLsrSpace theLsrSpace

◆ ossimLsrPoint() [6/7]

ossimLsrPoint::ossimLsrPoint ( const ossimGpt convert_this,
const ossimLsrSpace space 
)

Definition at line 49 of file ossimLsrPoint.cpp.

References initialize().

51  : theLsrSpace(space)
52 {
54 }
void initialize(const ossimEcefPoint &ecef_point)
ossimLsrSpace theLsrSpace

◆ ossimLsrPoint() [7/7]

ossimLsrPoint::ossimLsrPoint ( const ossimEcefPoint convert_this,
const ossimLsrSpace space 
)

Definition at line 60 of file ossimLsrPoint.cpp.

References initialize().

62  : theLsrSpace(space)
63 {
64  initialize(convert_this);
65 }
void initialize(const ossimEcefPoint &ecef_point)
ossimLsrSpace theLsrSpace

Member Function Documentation

◆ data() [1/2]

ossimColumnVector3d& ossimLsrPoint::data ( )
inline

Definition at line 92 of file ossimLsrPoint.h.

Referenced by initialize(), and ossimLsrVector::operator+().

92 { return theData; }
ossimColumnVector3d theData

◆ data() [2/2]

const ossimColumnVector3d& ossimLsrPoint::data ( ) const
inline

Definition at line 93 of file ossimLsrPoint.h.

93 { return theData; }
ossimColumnVector3d theData

◆ hasNans()

bool ossimLsrPoint::hasNans ( ) const
inline

Definition at line 98 of file ossimLsrPoint.h.

References ossim::isnan().

Referenced by operator+(), ossimLsrVector::operator+(), operator-(), and ossimLsrRay::ossimLsrRay().

99  {
100  return (ossim::isnan(theData[0])||
101  ossim::isnan(theData[1])||
102  ossim::isnan(theData[2]));
103  }
ossimColumnVector3d theData
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.
Definition: ossimCommon.h:91

◆ initialize()

void ossimLsrPoint::initialize ( const ossimEcefPoint ecef_point)
protected

METHOD: initialize(ossimEcefPoint) Convenience method used by several constructors for initializing theData given an ECEF point. Assumes theLsrSpace has been previously initialized.

Definition at line 74 of file ossimLsrPoint.cpp.

References data(), ossimLsrSpace::ecefToLsrRotMatrix(), ossimEcefPoint::hasNans(), makeNan(), ossimLsrSpace::origin(), theData, and theLsrSpace.

Referenced by ossimLsrPoint().

75 {
76  if(ecef_point.hasNans())
77  {
78  makeNan();
79  }
80  else
81  {
82  //
83  // Translate to new space given the space's offset origin:
84  //
85  ossimColumnVector3d xlated ((ecef_point - theLsrSpace.origin()).data());
86 
87  //
88  // Rotate by the inverse (transpose) of the LSR-to-ECEF rot matrix:
89  //
91  }
92 }
bool hasNans() const
ossimColumnVector3d & data()
Definition: ossimLsrPoint.h:92
NEWMAT::Matrix ecefToLsrRotMatrix() const
const ossimEcefPoint & origin() const
ossimLsrSpace theLsrSpace
ossimColumnVector3d theData

◆ lsrSpace() [1/2]

ossimLsrSpace& ossimLsrPoint::lsrSpace ( )
inline

Definition at line 95 of file ossimLsrPoint.h.

Referenced by ossimLsrVector::operator+(), operator-(), and ossimLsrRay::ossimLsrRay().

95 { return theLsrSpace; }
ossimLsrSpace theLsrSpace

◆ lsrSpace() [2/2]

const ossimLsrSpace& ossimLsrPoint::lsrSpace ( ) const
inline

Definition at line 96 of file ossimLsrPoint.h.

96 { return theLsrSpace; }
ossimLsrSpace theLsrSpace

◆ makeNan()

void ossimLsrPoint::makeNan ( )
inline

Definition at line 105 of file ossimLsrPoint.h.

References ossim::nan().

Referenced by ossimLsrRay::extend(), and initialize().

106  {
107  theData[0] = ossim::nan();
108  theData[1] = ossim::nan();
109  theData[2] = ossim::nan();
110  }
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
ossimColumnVector3d theData

◆ operator ossimEcefPoint()

ossimLsrPoint::operator ossimEcefPoint ( ) const
inline

CASTING OPERATOR: Used as: myEcefVector = ossimEcefPoint(this) – looks like a constructor but is an operation on this object. ECEF knows nothing about LSR, so cannot provide an ossimEcefVector(ossimLsrPoint) constructor.

Definition at line 168 of file ossimLsrPoint.h.

169 {
172 }
const ossimColumnVector3d & data() const
const NEWMAT::Matrix & lsrToEcefRotMatrix() const
const ossimEcefPoint & origin() const
ossimLsrSpace theLsrSpace
ossimColumnVector3d theData

◆ operator!=()

bool ossimLsrPoint::operator!= ( const ossimLsrPoint p) const
inline

Definition at line 157 of file ossimLsrPoint.h.

158 {
159  return (!(*this == p));
160 }

◆ operator+()

ossimLsrPoint ossimLsrPoint::operator+ ( const ossimLsrVector v) const

Definition at line 113 of file ossimLsrPoint.cpp.

References ossimLsrVector::data(), hasNans(), ossimLsrVector::hasNans(), ossimLsrVector::lsrSpace(), ossimLsrSpace::lsrSpaceErrorMessage(), ossim::nan(), ossimLsrPoint(), theData, and theLsrSpace.

114 {
115  if(hasNans()||v.hasNans()||(theLsrSpace != v.lsrSpace()))
116  {
119 
120  }
121  return ossimLsrPoint(theData + v.data(), theLsrSpace);
122 }
static ostream & lsrSpaceErrorMessage(ostream &os=ossimNotify(ossimNotifyLevel_INFO))
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
ossimLsrSpace & lsrSpace()
ossimColumnVector3d & data()
bool hasNans() const
bool hasNans() const
Definition: ossimLsrPoint.h:98
ossimLsrSpace theLsrSpace
ossimColumnVector3d theData

◆ operator-()

ossimLsrVector ossimLsrPoint::operator- ( const ossimLsrPoint p) const

Definition at line 98 of file ossimLsrPoint.cpp.

References hasNans(), lsrSpace(), ossimLsrSpace::lsrSpaceErrorMessage(), ossim::nan(), theData, and theLsrSpace.

99 {
100  if(hasNans()||p.hasNans()||(theLsrSpace != p.lsrSpace()))
101  {
104 
105  }
107 }
static ostream & lsrSpaceErrorMessage(ostream &os=ossimNotify(ossimNotifyLevel_INFO))
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
bool hasNans() const
Definition: ossimLsrPoint.h:98
ossimLsrSpace theLsrSpace
ossimLsrSpace & lsrSpace()
Definition: ossimLsrPoint.h:95
ossimColumnVector3d theData

◆ operator=()

const ossimLsrPoint & ossimLsrPoint::operator= ( const ossimLsrPoint p)
inline

OPERATORS:

Definition at line 138 of file ossimLsrPoint.h.

References theData, and theLsrSpace.

139 {
140  theData = p.theData;
142 
143  return *this;
144 }
ossimLsrSpace theLsrSpace
ossimColumnVector3d theData

◆ operator==()

bool ossimLsrPoint::operator== ( const ossimLsrPoint p) const
inline

Definition at line 149 of file ossimLsrPoint.h.

References theData, and theLsrSpace.

150 {
151  return ((theData == p.theData) && (theLsrSpace == p.theLsrSpace));
152 }
ossimLsrSpace theLsrSpace
ossimColumnVector3d theData

◆ print()

void ossimLsrPoint::print ( ostream &  stream = ossimNotify(ossimNotifyLevel_INFO)) const
inline

Debug Dump:

Definition at line 179 of file ossimLsrPoint.h.

References theData, and theLsrSpace.

180 {
181  os << "(ossimLsrPoint)\n"
182  << " theData = " << theData
183  << "\n theLsrSpace = " << theLsrSpace;
184 }
ossimLsrSpace theLsrSpace
ossimColumnVector3d theData

◆ x() [1/2]

double ossimLsrPoint::x ( ) const
inline

DATA ACCESS METHODS:

Definition at line 84 of file ossimLsrPoint.h.

84 { return theData[0]; }
ossimColumnVector3d theData

◆ x() [2/2]

double& ossimLsrPoint::x ( )
inline

Definition at line 85 of file ossimLsrPoint.h.

85 { return theData[0]; }
ossimColumnVector3d theData

◆ y() [1/2]

double ossimLsrPoint::y ( ) const
inline

Definition at line 86 of file ossimLsrPoint.h.

86 { return theData[1]; }
ossimColumnVector3d theData

◆ y() [2/2]

double& ossimLsrPoint::y ( )
inline

Definition at line 87 of file ossimLsrPoint.h.

87 { return theData[1]; }
ossimColumnVector3d theData

◆ z() [1/2]

double ossimLsrPoint::z ( ) const
inline

Definition at line 88 of file ossimLsrPoint.h.

88 { return theData[2]; }
ossimColumnVector3d theData

◆ z() [2/2]

double& ossimLsrPoint::z ( )
inline

Definition at line 89 of file ossimLsrPoint.h.

89 { return theData[2]; }
ossimColumnVector3d theData

Friends And Related Function Documentation

◆ operator<<

ostream& operator<< ( ostream &  os,
const ossimLsrPoint instance 
)
friend

Definition at line 116 of file ossimLsrPoint.h.

117  { instance.print(os); return os; }
void print(ostream &stream=ossimNotify(ossimNotifyLevel_INFO)) const

Member Data Documentation

◆ theData

ossimColumnVector3d ossimLsrPoint::theData
protected

Definition at line 127 of file ossimLsrPoint.h.

Referenced by initialize(), operator+(), operator-(), operator=(), operator==(), and print().

◆ theLsrSpace

ossimLsrSpace ossimLsrPoint::theLsrSpace
protected

Definition at line 128 of file ossimLsrPoint.h.

Referenced by initialize(), operator+(), operator-(), operator=(), operator==(), and print().


The documentation for this class was generated from the following files: