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

#include <ossimLsrRay.h>

Public Member Functions

 ossimLsrRay ()
 
 ossimLsrRay (const ossimLsrRay &copy_this)
 
 ossimLsrRay (const ossimLsrPoint &origin, const ossimLsrVector &direction)
 
 ossimLsrRay (const ossimLsrPoint &origin, const ossimLsrPoint &towards)
 
 ossimLsrRay (const ossimLsrRay &convert_this, const ossimLsrSpace &new_space)
 
const ossimLsrRayoperator= (const ossimLsrRay &r)
 
bool operator== (const ossimLsrRay &r) const
 
bool operator!= (const ossimLsrRay &r) const
 
const ossimLsrPointorigin () const
 
const ossimLsrVectordirection () const
 
const ossimLsrSpacelsrSpace () const
 
 operator ossimEcefRay () const
 
bool hasNans () const
 
void makeNan ()
 
ossimLsrPoint extend (const double &t) const
 
void print (ostream &stream=ossimNotify(ossimNotifyLevel_INFO)) const
 

Private Attributes

ossimLsrPoint theOrigin
 
ossimLsrVector theDirection
 

Friends

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

Detailed Description

Definition at line 37 of file ossimLsrRay.h.

Constructor & Destructor Documentation

◆ ossimLsrRay() [1/5]

ossimLsrRay::ossimLsrRay ( )
inline

CONSTRUCTORS:

Definition at line 43 of file ossimLsrRay.h.

43 {}

◆ ossimLsrRay() [2/5]

ossimLsrRay::ossimLsrRay ( const ossimLsrRay copy_this)
inline

Definition at line 45 of file ossimLsrRay.h.

46  : theOrigin(copy_this.theOrigin), theDirection(copy_this.theDirection) {}
ossimLsrVector theDirection
Definition: ossimLsrRay.h:117
ossimLsrPoint theOrigin
Definition: ossimLsrRay.h:116

◆ ossimLsrRay() [3/5]

ossimLsrRay::ossimLsrRay ( const ossimLsrPoint origin,
const ossimLsrVector direction 
)

Definition at line 54 of file ossimLsrRay.cpp.

References direction(), hasNans(), ossimLsrPoint::lsrSpace(), ossimLsrVector::lsrSpace(), ossim::nan(), origin(), ossimNotify(), ossimNotifyLevel_FATAL, theDirection, and theOrigin.

56  : theOrigin(origin),
58 {
59  if (origin.lsrSpace() != direction.lsrSpace() || hasNans())
60  {
61  ossimNotify(ossimNotifyLevel_FATAL) << "FATAL -- ossimLsrRay(ossimLsrPoint,ossimLsrVector) Constructor:"
62  << "\n The origin and direction LSR quantities do not share the"
63  << "\n same LSR space. Setting to NAN. Check the data for errors." << std::endl;
64 
66  origin.lsrSpace());
69  }
70 }
bool hasNans() const
Definition: ossimLsrRay.h:80
ossimLsrVector theDirection
Definition: ossimLsrRay.h:117
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
ossimLsrSpace & lsrSpace()
ossimLsrVector unitVector() const
ossimLsrPoint theOrigin
Definition: ossimLsrRay.h:116
ossimLsrSpace & lsrSpace()
Definition: ossimLsrPoint.h:95
const ossimLsrPoint & origin() const
Definition: ossimLsrRay.h:69
const ossimLsrVector & direction() const
Definition: ossimLsrRay.h:70
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ ossimLsrRay() [4/5]

ossimLsrRay::ossimLsrRay ( const ossimLsrPoint origin,
const ossimLsrPoint towards 
)

Definition at line 78 of file ossimLsrRay.cpp.

References ossimLsrPoint::hasNans(), ossimLsrPoint::lsrSpace(), ossim::nan(), ossimLsrVector::normalize(), origin(), ossimNotify(), ossimNotifyLevel_FATAL, theDirection, and theOrigin.

80  : theOrigin(origin)
81 {
82  if ((origin.lsrSpace() != towards.lsrSpace())||
83  origin.hasNans()||
84  towards.hasNans() )
85  {
86  ossimNotify(ossimNotifyLevel_FATAL) << "ERROR -- ossimLsrRay(ossimLsrPoint,ossimLsrPoint) Constructor:"
87  << "\n The origin and direction LSR quantities do not share the"
88  << "\n same LSR space. Setting to NAN. Check the data for errors." << std::endl;
89 
91  origin.lsrSpace());
93  origin.lsrSpace());
94  }
95  else
96  {
97  theDirection = towards - origin;
99  }
100 }
ossimLsrVector theDirection
Definition: ossimLsrRay.h:117
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
bool hasNans() const
Definition: ossimLsrPoint.h:98
ossimLsrPoint theOrigin
Definition: ossimLsrRay.h:116
ossimLsrSpace & lsrSpace()
Definition: ossimLsrPoint.h:95
const ossimLsrPoint & origin() const
Definition: ossimLsrRay.h:69
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ ossimLsrRay() [5/5]

ossimLsrRay::ossimLsrRay ( const ossimLsrRay convert_this,
const ossimLsrSpace new_space 
)
inline

Definition at line 54 of file ossimLsrRay.h.

56  : theOrigin(convert_this.theOrigin, new_space),
57  theDirection(convert_this.theDirection, new_space) {}
ossimLsrVector theDirection
Definition: ossimLsrRay.h:117
ossimLsrPoint theOrigin
Definition: ossimLsrRay.h:116

Member Function Documentation

◆ direction()

const ossimLsrVector& ossimLsrRay::direction ( ) const
inline

Definition at line 70 of file ossimLsrRay.h.

Referenced by ossimLsrRay().

70 { return theDirection; }
ossimLsrVector theDirection
Definition: ossimLsrRay.h:117

◆ extend()

ossimLsrPoint ossimLsrRay::extend ( const double &  t) const
inline

METHOD: extend(t) Extends the ray by distance t (meters) from the origin to the LSR point returned (in same space).

Definition at line 95 of file ossimLsrRay.h.

References ossimLsrPoint::makeNan().

96  {
97  if(!hasNans())
98  {
99  return (theOrigin + theDirection*t);
100  }
101 
102  ossimLsrPoint p;
103  p.makeNan();
104  return p;
105  }
bool hasNans() const
Definition: ossimLsrRay.h:80
ossimLsrVector theDirection
Definition: ossimLsrRay.h:117
ossimLsrPoint theOrigin
Definition: ossimLsrRay.h:116

◆ hasNans()

bool ossimLsrRay::hasNans ( ) const
inline

Definition at line 80 of file ossimLsrRay.h.

Referenced by ossimLsrRay().

81  {
82  return (theOrigin.hasNans()||theDirection.hasNans());
83  }
ossimLsrVector theDirection
Definition: ossimLsrRay.h:117
bool hasNans() const
bool hasNans() const
Definition: ossimLsrPoint.h:98
ossimLsrPoint theOrigin
Definition: ossimLsrRay.h:116

◆ lsrSpace()

const ossimLsrSpace& ossimLsrRay::lsrSpace ( ) const
inline

Definition at line 71 of file ossimLsrRay.h.

71 { return theOrigin.lsrSpace(); }
ossimLsrPoint theOrigin
Definition: ossimLsrRay.h:116
ossimLsrSpace & lsrSpace()
Definition: ossimLsrPoint.h:95

◆ makeNan()

void ossimLsrRay::makeNan ( )
inline

Definition at line 85 of file ossimLsrRay.h.

86  {
89  }
ossimLsrVector theDirection
Definition: ossimLsrRay.h:117
ossimLsrPoint theOrigin
Definition: ossimLsrRay.h:116

◆ operator ossimEcefRay()

ossimLsrRay::operator ossimEcefRay ( ) const
inline

CASTING OPERATOR: ossimEcefRay() Looks like a constructor for an ossimEcefRay but is an operation on this object. Returns the ossimEcefRay equivalent.

Definition at line 155 of file ossimLsrRay.h.

◆ operator!=()

bool ossimLsrRay::operator!= ( const ossimLsrRay r) const
inline

Definition at line 144 of file ossimLsrRay.h.

145 {
146  return !(*this == r);
147 }

◆ operator=()

const ossimLsrRay & ossimLsrRay::operator= ( const ossimLsrRay r)
inline

OPERATORS:

Definition at line 126 of file ossimLsrRay.h.

References theDirection, and theOrigin.

127 {
128  theOrigin = r.theOrigin;
130  return *this;
131 }
ossimLsrVector theDirection
Definition: ossimLsrRay.h:117
ossimLsrPoint theOrigin
Definition: ossimLsrRay.h:116

◆ operator==()

bool ossimLsrRay::operator== ( const ossimLsrRay r) const
inline

Definition at line 136 of file ossimLsrRay.h.

References theDirection, and theOrigin.

137 {
138  return ((theOrigin == r.theOrigin) && (theDirection == r.theDirection));
139 }
ossimLsrVector theDirection
Definition: ossimLsrRay.h:117
ossimLsrPoint theOrigin
Definition: ossimLsrRay.h:116

◆ origin()

const ossimLsrPoint& ossimLsrRay::origin ( ) const
inline

DATA ACCESS METHODS:

Definition at line 69 of file ossimLsrRay.h.

Referenced by ossimLsrRay().

69 { return theOrigin; }
ossimLsrPoint theOrigin
Definition: ossimLsrRay.h:116

◆ print()

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

Debug Dump:

Definition at line 165 of file ossimLsrRay.h.

References theDirection, and theOrigin.

166 {
167  os << "(ossimLsrRay)"
168  << "\n theOrigin = " << theOrigin
169  << "\n theDirection = " << theDirection << ends;
170 }
ossimLsrVector theDirection
Definition: ossimLsrRay.h:117
ossimLsrPoint theOrigin
Definition: ossimLsrRay.h:116

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 112 of file ossimLsrRay.h.

113  { instance.print(os); return os; }
void print(ostream &stream=ossimNotify(ossimNotifyLevel_INFO)) const
Definition: ossimLsrRay.h:165

Member Data Documentation

◆ theDirection

ossimLsrVector ossimLsrRay::theDirection
private

Definition at line 117 of file ossimLsrRay.h.

Referenced by operator=(), operator==(), ossimLsrRay(), and print().

◆ theOrigin

ossimLsrPoint ossimLsrRay::theOrigin
private

Definition at line 116 of file ossimLsrRay.h.

Referenced by operator=(), operator==(), ossimLsrRay(), and print().


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