USGS

Isis 3.0 Object Programmers' Reference

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