Isis 3.0 Programmer Reference
Back | Home
NaifDskPlateModel.h
Go to the documentation of this file.
1 #ifndef NaifDskPlateModel_h
2 #define NaifDskPlateModel_h
3 
26 #include <QMutex>
27 #include <QSharedPointer>
28 #include <QString>
29 
30 #include "NaifDskApi.h"
31 
32 namespace Isis {
33 
34  class Intercept;
35  class Latitude;
36  class Longitude;
37  class SurfacePoint;
38 
60 
61  public:
63  NaifDskPlateModel(const QString &dskfile);
64  virtual ~NaifDskPlateModel();
65 
66  bool isValid() const;
67  QString filename() const;
68 
69  int size() const;
70  SpiceInt numberPlates() const;
71  SpiceInt numberVertices() const;
72 
73  SurfacePoint *point(const Latitude &lat, const Longitude &lon) const;
74  Intercept *intercept(const NaifVertex &vertex, const NaifVector &raydir) const;
75  // Intercept *intercept(const SurfacePoint &pnt) const;
76 
77  // Lower level I/O
78  bool isPlateIdValid(const SpiceInt plateid) const;
79  SpiceInt plateIdOfIntercept(const NaifVertex &vertex,
80  const NaifVector &raydir,
81  NaifVertex &xpoint) const;
82  NaifTriangle plate(SpiceInt plateid) const;
83 
84  NaifDskPlateModel *clone() const;
85 
86  private:
91  enum ErrAction { Throw,
93  };
94 
107  public:
110 
111  QString m_dskfile;
112  SpiceInt m_handle;
113  SpiceDLADescr m_dladsc;
115  SpiceDSKDescr m_dskdsc;
116  SpiceInt m_plates;
117  SpiceInt m_vertices;
118  QMutex m_mutex;
119  };
120 
121  // Shared file descriptor supports copying of object
122  typedef QSharedPointer<NaifDskDescriptor> SharedNaifDskDescriptor;
123  SharedNaifDskDescriptor m_dsk;
124 
125  NaifDskDescriptor *openDSK(const QString &dskfile);
126  bool verify(const bool &test, const QString &errmsg,
127  const ErrAction &action = Throw) const;
128  SurfacePoint *makePoint(const NaifVertex &v) const;
129  };
130 
131 } // namespace Isis
132 
133 #endif
134 
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:86
SpiceDSKDescr m_dskdsc
The DSK descriptor.
QMutex m_mutex
Mutex for thread saftey.
NaifDskDescriptor * openDSK(const QString &dskfile)
Opens a valid NAIF DSK plate model file.
Throw an exception if an error occurs.
int size() const
Returns the number of plates in the DSK file - mostly for conformity.
NaifTriangle plate(SpiceInt plateid) const
Retrieve the triangular plate identified by its ID.
QString filename() const
Returns the nane of the NAIF DSK file.
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:59
SurfacePoint * point(const Latitude &lat, const Longitude &lon) const
Get surface intersection for a lat/lon grid point.
SurfacePoint * makePoint(const NaifVertex &v) const
Construct and return a SurfacePoint pointer.
SpiceInt m_handle
The DAS file handle of the DSK file.
TNT::Array1D< SpiceDouble > NaifVector
Namespace to contain type definitions of NAIF DSK fundamentals.
Definition: NaifDskApi.h:64
SpiceInt plateIdOfIntercept(const NaifVertex &vertex, const NaifVector &raydir, NaifVertex &xpoint) const
Primary API to determine ray intercept from observer/look direction.
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:52
TNT::Array1D< SpiceDouble > NaifVertex
1-D Buffer[3]
Definition: NaifDskApi.h:65
SpiceInt m_vertices
Number of vertices defining the plate.
SpiceInt m_plates
Number of Plates in the model.
SpiceInt numberPlates() const
Returns the number of plates in the model.
bool verify(const bool &test, const QString &errmsg, const ErrAction &action=Throw) const
Convenience method for generalized error reporting.
Container for a intercept condition.
Definition: Intercept.h:51
Do not throw an exception if an error occurs.
SpiceDLADescr m_dladsc
The DLA descriptor of the DSK segment representing the target surface.
SharedNaifDskDescriptor m_dsk
Shared pointer to the NaifDskDescriptor for this plate.
ErrAction
Enumeration to indicate whether to throw an exception if an error occurs.
NaifDskPlateModel()
Default empty constructor.
bool isValid() const
Checks validity of the object.
bool isPlateIdValid(const SpiceInt plateid) const
Determines if the plate ID is valid.
QString m_dskfile
The NAIF DSK file representing this plate&#39;s shape model.
Intercept * intercept(const NaifVertex &vertex, const NaifVector &raydir) const
Determine a target body intercept point from an observer and look direction.
SpiceInt numberVertices() const
Returns the number of vertices in the plate model.
Implementation interface API for NAIF&#39;s DSK plate model.
TNT::Array2D< SpiceDouble > NaifTriangle
3-D triangle[3][3]
Definition: NaifDskApi.h:66

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:24:22