This file is indexed.

/usr/include/ossim/base/ossimEcefRay.h is in libossim-dev 1.7.21-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
//*******************************************************************
//
// License:  See top level LICENSE.txt file.
//
// DESCRIPTION:
//  Class for representing a ray in the earth-centered, earth-fixed (ECEF)
//  coordinate system. A ray is defined as having an origin point and a
//  unit direction vector radiating from the origin.
//
// SOFTWARE HISTORY:
//>
//   08Aug2001  Oscar Kramer (okramer@imagelinks.com)
//              Initial coding.
//<
//*****************************************************************************
//  $Id: ossimEcefRay.h 12769 2008-04-30 17:46:18Z dburken $

#ifndef ossimEcefRay_HEADER
#define ossimEcefRay_HEADER

#include <iosfwd>

#include <ossim/base/ossimEcefPoint.h>
#include <ossim/base/ossimEcefVector.h>
#include <ossim/base/ossimDatumFactory.h>
#include <ossim/base/ossimNotify.h>

class ossimGpt;
class ossimLsrRay;

//*****************************************************************************
//  CLASS: ossimEcefRay
//
//*****************************************************************************
class OSSIMDLLEXPORT ossimEcefRay
{
public:
   /*!
    * CONSTRUCTORS: 
    */
   ossimEcefRay() {};
     
   ossimEcefRay(const ossimEcefRay& copy_this)
      : theOrigin(copy_this.theOrigin), theDirection(copy_this.theDirection) {}
   
   ossimEcefRay(const ossimEcefPoint&  origin,
                const ossimEcefVector& direction)
      : theOrigin(origin), theDirection(direction.unitVector()) {}
   
   ossimEcefRay(const ossimEcefPoint& from,
                const ossimEcefPoint& to);
   
   ossimEcefRay(const ossimGpt& from,
                const ossimGpt& to);

   bool isNan()const
      {
         return theOrigin.isNan()&&theDirection.isNan();
      }
   bool hasNans()const
      {
         return theOrigin.isNan()||theDirection.isNan();
      }
   void makeNan()
      {
         theOrigin.makeNan();
         theDirection.makeNan();
      }
   /*!
    * OPERATORS:
    */
   const ossimEcefRay& operator= (const ossimEcefRay& r); // inline below
   bool                operator==(const ossimEcefRay& r) const; // inline below
   bool                operator!=(const ossimEcefRay& r) const; // inline below
   
   /*!
    * DATA ACCESS METHODS:
    */
   const ossimEcefPoint&  origin()    const     { return theOrigin; }
   const ossimEcefVector& direction() const     { return theDirection; }
   void  setOrigin(const ossimEcefPoint& orig)  { theOrigin = orig; }
   void  setDirection(const ossimEcefVector& d) { theDirection=d.unitVector();}

   /*!
    * Extends the ray by distance t (meters) from the origin to the ECEF
    * point returned.
    */
   ossimEcefPoint extend(const double& t) const; // inline below

   /*!
    * This method computes a ray with the same origin but a new direction
    * corresponding to a reflection from some surface defined by its normal
    * vector (assumed to be a unit vector):
    */
   ossimEcefRay reflectRay(const ossimEcefVector& normal) const;// inline below

   /*!
    * Intersects the ray with the given elevation above the earth ellipsoid.
    */
   ossimEcefPoint intersectAboveEarthEllipsoid
      (const double& heightAboveEllipsoid,
       const ossimDatum* aDatum = ossimDatumFactory::instance()->wgs84()) const;
                                       
   /*!
    * Debug Dump
    */
   std::ostream& print(
      std::ostream& os = ossimNotify(ossimNotifyLevel_INFO))const;
   
   friend std::ostream& operator<<(std::ostream& os ,
                                   const ossimEcefRay& instance);

private:
   ossimEcefPoint  theOrigin;
   ossimEcefVector theDirection;
}; 

//================== BEGIN DEFINITIONS FOR INLINE METHODS =====================

//*****************************************************************************
//  INLINE METHOD: ossimEcefRay::operator=(ossimEcefRay)
//*****************************************************************************
inline const ossimEcefRay& ossimEcefRay::operator=(const ossimEcefRay& r)
{
   theOrigin = r.theOrigin;
   theDirection = r.theDirection;
   return *this;
}

//*****************************************************************************
//  INLINE METHOD: ossimEcefRay::operator==(ossimEcefRay)
//*****************************************************************************
inline bool ossimEcefRay::operator==(const ossimEcefRay& r) const
{
   return ((theOrigin == r.theOrigin) && (theDirection == r.theDirection));
}

//*****************************************************************************
//  INLINE METHOD: ossimEcefRay::operator!=(ossimEcefRay)
//*****************************************************************************
inline bool ossimEcefRay::operator!=(const ossimEcefRay& r) const 
{
   return !(*this == r);
}

//*****************************************************************************
//  INLINE METHOD: ossimEcefRay::extend(double t)
//  
//   Extends the ray by distance t (meters) from the origin to the ECEF
//   point returned.
//*****************************************************************************
inline ossimEcefPoint ossimEcefRay::extend(const double& t) const
{
   return (theOrigin + theDirection*t);
}

//*****************************************************************************
//  INLINE METHOD: ossimEcefRay::reflectRay(normal)
//  
//   This method computes a ray with the same origin but a new direction
//   corresponding to a reflection from some surface defined by its normal
//   vector:
//*****************************************************************************
inline ossimEcefRay
ossimEcefRay::reflectRay(const ossimEcefVector& normal) const
{
   ossimEcefVector new_dir(theDirection - normal*2.0*normal.dot(theDirection));
   return ossimEcefRay(theOrigin, new_dir);
}

   
#endif