Commit 3b4c181f authored by Makayla Shepherd's avatar Makayla Shepherd
Browse files

Updated documentation for AbstractPlate. References #4807.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@7806 41f8697f-d340-4b68-9986-7bafba869bb8
parent c6e69f85
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ namespace Isis {
  AbstractPlate::AbstractPlate() {}



  /**
   * Empty destructor for an AbstractPlate object.
   *
@@ -54,7 +53,7 @@ namespace Isis {
  /**
   * Gets the name of this Plate type. 
   *  
   * @return Then name of this plate, "AbstractPlate" 
   * @return QString The name of this plate, "AbstractPlate" 
   *
   */
  QString AbstractPlate::name() const {
@@ -62,7 +61,6 @@ namespace Isis {
  }



  /**
   * Construct an intercept from a clone of this plate as well as the given 
   * vertex, direction vector, and surface point. 
+120 −4
Original line number Diff line number Diff line
@@ -55,29 +55,133 @@ namespace Isis {
   *   @history 2014-02-15 Kris Becker - Original Version 
   *   @history 2015-03-08 Jeannie Backer - Added documentation and test. Added class to ISIS trunk.
   *                           References #2035
   *   @history 2017-06-28 Makayla Shepherd - Updated documentation. References #4807.
   */
  class AbstractPlate {
    public:
      /**
       * Empty destructor for an AbstractPlate object.
       */
      virtual ~AbstractPlate();
  
      /**
       * Gets the name of this Plate type
       * 
       * @return QString AbstractPlate
       */
      virtual QString name() const = 0;
  
      /**
       * Gets the minimum radius. This is a pure virtual function.
       * 
       * @return Distance The minimum radius
       */
      virtual Distance minRadius() const = 0;
      
      /**
       * Gets the maximum radius. This is a pure virtual function.
       * 
       * @return Distance The maximum radius
       */
      virtual Distance maxRadius() const = 0;
  
      /**
       * Gets the area of the plate. This is a pure virtual function.
       * 
       * @return double The area of the plate.
       */
      virtual double area() const = 0;
      
      /**
       * Gets the normal. This is a pure virtual function.
       * 
       * @return NaifVector The normal
       */
      virtual NaifVector normal() const = 0;
      
      /**
       * Gets the separation angle. This is a pure virtual function.
       * 
       * @param raydir Given a direction vector, compute the angle of separation 
       *               between it and the plate normal vector
       * 
       * @return Angle The separation angle
       */
      virtual Angle separationAngle(const NaifVector &raydir) const = 0;
  
      /**
       * @brief Determines if a look direction from a point intercepts the plate 
       *  
       * Given a point in space in body fixed coordinates and a look direction, this 
       * method determines the point of intercept on the plate. This is a pure virtual function.
       * 
       * @param vertex An observer point in space in body fixed coordinates
       * @param raydir A look direction vector 
       * 
       * @return bool Returns true if the look direction from the observer intercepts 
       *              the plate, otherwise returns false
       */
      virtual bool hasIntercept(const NaifVertex &vertex, 
                                const NaifVector &raydir) const = 0;
                                
      /**
       * @brief Determines the give lat/lon point intercept the triangular plate 
       *  
       * Given a latitude/longitude point, this method determines if it intercepts the 
       * plate. This is a pure virtual function.
       * 
       * @param lat  The latitude of the given grid point
       * @param lon  Longitude of the given point
       * 
       * @return bool Returns true if the lat/lon point intercepts the plate, false 
       *              otherwise
       */  
      virtual bool hasPoint(const Latitude &lat, const Longitude &lon) const = 0;
        
      /**
       * @brief Conpute the intercept point on a triangular plate 
       *  
       * Given a point in space and a look direction, compute the intercept point on a 
       * triangular plate. If the intercept point does not exist, return a null 
       * pointer. This is a pure virtual function.
       * 
       * @param vertex Specifies a point in space of a body fixed coordinate
       * @param raydir Specifies a look direction from the vertex in body fixed 
       *               coordinates.  It can be of any magnitude.
       * 
       * @return Intercept* Returns the intercept point if it exists on the 
       *                    triangular plate, otherwise returns a null pointer.
       */
      virtual Intercept *intercept(const NaifVertex &vertex, 
                                      const NaifVector &raydir) const = 0;  

      /**
       * @brief Determine the intercept point of a lat/lon location for the plate 
       *  
       * Determines if a lat/lon point intercepts a plate.  Given a latitude and 
       * longitude coordinate, this method converts the point to a body fixed X/Y/Z 
       * value and computes intercept point within the boundaries if the plate. If no 
       * intercept is found, a null pointer is returned. This is a pure virtual function.
       * 
       * @param lat Latitude of the point
       * @param lon Longitude of the point
       * 
       * @return SurfacePoint* Pointer to the intersection of the point on the 
       *                       triangle. If an intersection does not exist a null
       *                       pointer is returned.
       */
      virtual SurfacePoint *point(const Latitude &lat, 
                                  const Longitude &lon) const = 0;
  
      /**
       * @brief Returns a clone of the current plate 
       *  
       * Provides replication of the current triangular plate. Note this 
       * implementation returns a shared copy of the triangular plate as long as the 
       * plate type is shared by copy (TNT library is). This is a pure virtual function.
       * 
       * @return AbstractPlate* Returns a copy of the plate 
       */
      virtual AbstractPlate *clone() const = 0;
  
    protected:
@@ -85,8 +189,20 @@ namespace Isis {
      Intercept *construct(const NaifVertex &vertex, const NaifVector &raydir,
                           SurfacePoint *ipoint) const;  
    private:
      // Disallow direct copies - use clones
      /**
       * Copy contructor. Do not use, clone instead.
       * 
       * @param plate AbstractPlate to copy
       */
      AbstractPlate(const AbstractPlate &plate);
      
      /**
       * Assignment operator
       * 
       * @param plate AbstractPlate to copy
       * 
       * @return AbstractPlate
       */
      AbstractPlate &operator=(const AbstractPlate &plate);
  };