Isis Developer Reference
DemShape.h
Go to the documentation of this file.
1#ifndef DemShape_h
2#define DemShape_h
8/* SPDX-License-Identifier: CC0-1.0 */
9
10#include "ShapeModel.h"
11
12template<class T> class QVector;
13
14namespace Isis {
15 class Cube;
16 class Interpolator;
17 class Portal;
18 class Projection;
19
52 class DemShape : public ShapeModel {
53 public:
54 // Constructor
55 DemShape(Target *target, Pvl &pvl);
56
57 // Constructor
58 DemShape();
59
60 // Destructor
61 ~DemShape();
62
63 // Make parent functions visible
65
66 // Intersect the shape model
67 bool intersectSurface(std::vector<double> observerPos,
68 std::vector<double> lookDirection);
69
70 Distance localRadius(const Latitude &lat, const Longitude &lon);
71
72 // Return dem scale in pixels/degree
73 double demScale();
74
75 // Calculate the default normal of the current intersection point
76 virtual void calculateDefaultNormal();
77
78 // implement pure virtual method from ShapeModel class
79 bool isDEM() const;
80
81 // To compute the surface normal, you must call setLocalAreaPoint on top,
82 // bottom, left, and right surrounding points in the image. Then call
83 // calculateSurfaceNormal and directSurfaceNormal to calculate the normal.
84 // Use removeLOcalAreaPoints to clean up as needed. See Camera for an
85 // example, or use its GetLocalNormal method.
86
87 // Calculate the surface normal of the current intersection point
88 void calculateLocalNormal(QVector<double *> cornerNeighborPoints);
90
91 protected:
92 Cube *demCube();
93
94 private:
95 Cube *m_demCube;
96 Projection *m_demProj;
97 double m_pixPerDegree;
98 Portal *m_portal;
99 Interpolator *m_interp;
100 };
101}
102
103#endif
IO Handler for Isis Cubes.
Definition Cube.h:168
Define shapes and provide utilities for targets stored as ISIS maps.
Definition DemShape.h:52
~DemShape()
Destroys the DemShape.
Definition DemShape.cpp:112
Distance localRadius(const Latitude &lat, const Longitude &lon)
Gets the radius from the DEM, if we have one.
Definition DemShape.cpp:264
double demScale()
Return the scale of the DEM shape, in pixels per degree.
Definition DemShape.cpp:295
virtual void calculateDefaultNormal()
This method calculates the default normal (Ellipsoid for backwards compatability) for the DemShape.
Definition DemShape.cpp:305
DemShape()
Construct a DemShape object.
Definition DemShape.cpp:54
Cube * demCube()
Returns the cube defining the shape model.
Definition DemShape.cpp:342
bool isDEM() const
Indicates that this shape model is from a DEM.
Definition DemShape.cpp:356
void calculateLocalNormal(QVector< double * > cornerNeighborPoints)
This method calculates the local surface normal of the current intersection point.
Definition DemShape.cpp:367
void calculateSurfaceNormal()
This method calculates the surface normal of the current intersection point.
Definition DemShape.cpp:421
bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)
Find the intersection point with the DEM.
Definition DemShape.cpp:143
Distance measurement, usually in meters.
Definition Distance.h:34
Pixel interpolator.
Definition Interpolator.h:34
This class is designed to encapsulate the concept of a Latitude.
Definition Latitude.h:51
This class is designed to encapsulate the concept of a Longitude.
Definition Longitude.h:40
Buffer for containing a two dimensional section of an image.
Definition Portal.h:36
Base class for Map Projections.
Definition Projection.h:155
Container for cube-like labels.
Definition Pvl.h:119
Define shapes and provide utilities for Isis targets.
Definition ShapeModel.h:66
virtual bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)=0
This class is used to create and store valid Isis targets.
Definition Target.h:63
This is free and unencumbered software released into the public domain.
Definition Calculator.h:18
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16