Commit 2c5d000d authored by Oxez's avatar Oxez
Browse files

Some changes from feedback

parent a2b1923d
Loading
Loading
Loading
Loading
+18 −15
Original line number Diff line number Diff line
@@ -28,7 +28,10 @@ using namespace std;

#define MAX(x,y) (((x) > (y)) ? (x) : (y))


namespace Isis {


  /**
   * Initialize the Isis3 Equatorial Cylindrical shape model.
   *
@@ -407,10 +410,11 @@ namespace Isis {

    }

    // Do nothing since the DEM intersection was already successful
    setHasIntersection(true);
    return hasIntersection();
  }
  // Do nothing since the DEM intersection was already successful


  /**
   * Finds the intersection point on the ellipsoid model using the given
@@ -464,9 +468,8 @@ namespace Isis {
    }

    setHasIntersection(intersected);
    m_hasEllipsoidIntersection = intersected;
    setHasEllipsoidIntersection(intersected);
    return intersected;
  }

}
+7 −7
Original line number Diff line number Diff line
@@ -47,10 +47,11 @@ namespace Isis {
   *                           intersection in intersectSurface() method to prevent early return
   *                           and attempt the iterative method even when the ellipsoid is not
   *                           intersected. Fixes #1438
   *   @history 2017-11-22 Jeff Anderson - Added the intersectEllipsoid virtual method so that
   *                           the DTM intersect method can use a starting radius for the
   *                           ellipsoid that is written to the labels during demprep as opposed 
   *                           to the default radius of the target.
   *   @history 2017-11-22 Jeff Anderson - Added the intersectEllipsoid virtual method so that the DTM
   *                           intersect method can use a the MaximumRadius found in the
   *                           ShapeModelStatistics group of the labels (often written during a run of
   *                           demprep) as a starting radius for the ellipsoid  as opposed to the
   *                           default radius of the target.
   */
  class EquatorialCylindricalShape : public DemShape {
    public:
@@ -76,4 +77,3 @@ namespace Isis {
};

#endif
+38 −28
Original line number Diff line number Diff line
@@ -209,6 +209,16 @@ namespace Isis {
  }


  /**
   * Used to set the private member variable m_hasEllipsoidIntersection
   *
   * @param status boolean value to set the m_hasEllipsoidIntersection variable to
   */
  void setHasEllipsoidIntersection(bool status) {
    m_hasEllipsoidIntersection = status;
  }


  /**
   * Computes and returns incidence angle, in degrees, given the illuminator position.
   *
+10 −7
Original line number Diff line number Diff line
@@ -171,24 +171,27 @@ namespace Isis {
      void setNormal(const std::vector<double>);
      void setNormal(const double a, const double b, const double c);

      // accessor and setter for m_hasEllipsoidIntersection
      bool hasEllipsoidIntersection();
      void setHasEllipsoidIntersection(bool status);
      
      // Set shape name
      void setName(QString name);

      void calculateEllipsoidalSurfaceNormal();
      bool hasEllipsoidIntersection();

      // Intersect ellipse
      virtual bool intersectEllipsoid(
                      const std::vector<double> observerPosRelativeToTarget,
                      const std::vector<double> &observerLookVectorToTarget);

      bool m_hasEllipsoidIntersection; //!< Indicates the ellipsoid was successfully intersected
      bool hasValidTarget() const;
      std::vector<Distance> targetRadii() const;
      void setHasNormal(bool status);
      double resolution();

    private:
      bool m_hasEllipsoidIntersection; //!< Indicates the ellipsoid was successfully intersected
      bool m_hasIntersection;          //!< indicates good intersection exists
      bool m_hasNormal;                //!< indicates normal has been computed
      std::vector<double> m_normal;    //!< Local normal of current intersection point