Isis 3 Developer Reference
DemShape.h
Go to the documentation of this file.
1 #ifndef DemShape_h
2 #define DemShape_h
3 
25 #include "ShapeModel.h"
26 
27 template<class T> class QVector;
28 
29 namespace Isis {
30  class Cube;
31  class Interpolator;
32  class Portal;
33  class Projection;
34 
67  class DemShape : public ShapeModel {
68  public:
69  // Constructor
70  DemShape(Target *target, Pvl &pvl);
71 
72  // Constructor
73  DemShape();
74 
75  // Destructor
76  ~DemShape();
77 
78  // Make parent functions visible
80 
81  // Intersect the shape model
82  bool intersectSurface(std::vector<double> observerPos,
83  std::vector<double> lookDirection);
84 
85  Distance localRadius(const Latitude &lat, const Longitude &lon);
86 
87  // Return dem scale in pixels/degree
88  double demScale();
89 
90  // Calculate the default normal of the current intersection point
91  virtual void calculateDefaultNormal();
92 
93  // implement pure virtual method from ShapeModel class
94  bool isDEM() const;
95 
96  // To compute the surface normal, you must call setLocalAreaPoint on top,
97  // bottom, left, and right surrounding points in the image. Then call
98  // calculateSurfaceNormal and directSurfaceNormal to calculate the normal.
99  // Use removeLOcalAreaPoints to clean up as needed. See Camera for an
100  // example, or use its GetLocalNormal method.
101 
102  // Calculate the surface normal of the current intersection point
103  void calculateLocalNormal(QVector<double *> cornerNeighborPoints);
104  void calculateSurfaceNormal();
105 
106  protected:
107  Cube *demCube();
108 
109  private:
110  Cube *m_demCube;
111  Projection *m_demProj;
112  double m_pixPerDegree;
113  Portal *m_portal;
114  Interpolator *m_interp;
115  };
116 }
117 
118 #endif
void calculateLocalNormal(QVector< double *> cornerNeighborPoints)
This method calculates the local surface normal of the current intersection point.
Definition: DemShape.cpp:361
~DemShape()
Destroys the DemShape.
Definition: DemShape.cpp:106
void calculateSurfaceNormal()
This method calculates the surface normal of the current intersection point.
Definition: DemShape.cpp:415
Buffer for containing a two dimensional section of an image.
Definition: Portal.h:52
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:63
Distance measurement, usually in meters.
Definition: Distance.h:47
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:52
Base class for Map Projections.
Definition: Projection.h:171
Define shapes and provide utilities for targets stored as Isis3 maps.
Definition: DemShape.h:67
virtual bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)=0
Container for cube-like labels.
Definition: Pvl.h:135
This class is used to create and store valid Isis3 targets.
Definition: Target.h:76
Define shapes and provide utilities for Isis3 targets.
Definition: ShapeModel.h:78
Definition: Calculator.h:33
Cube * demCube()
Returns the cube defining the shape model.
Definition: DemShape.cpp:336
Pixel interpolator.
Definition: Interpolator.h:51
Distance localRadius(const Latitude &lat, const Longitude &lon)
Gets the radius from the DEM, if we have one.
Definition: DemShape.cpp:258
double demScale()
Return the scale of the DEM shape, in pixels per degree.
Definition: DemShape.cpp:289
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)
Find the intersection point with the DEM.
Definition: DemShape.cpp:137
virtual void calculateDefaultNormal()
This method calculates the default normal (Ellipsoid for backwards compatability) for the DemShape...
Definition: DemShape.cpp:299
DemShape()
Construct a DemShape object.
Definition: DemShape.cpp:48
bool isDEM() const
Indicates that this shape model is from a DEM.
Definition: DemShape.cpp:350
IO Handler for Isis Cubes.
Definition: Cube.h:170