Isis 3 Programmer Reference
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 
66 
67  public:
69  NaifDskPlateModel(const QString &dskfile);
70  virtual ~NaifDskPlateModel();
71 
72  bool isValid() const;
73  QString filename() const;
74 
75  int size() const;
76  SpiceInt numberPlates() const;
77  SpiceInt numberVertices() const;
78 
79  SurfacePoint *point(const Latitude &lat, const Longitude &lon) const;
80  Intercept *intercept(const NaifVertex &vertex, const NaifVector &raydir) const;
81  // Intercept *intercept(const SurfacePoint &pnt) const;
82 
83  // Lower level I/O
84  bool isPlateIdValid(const SpiceInt plateid) const;
85  SpiceInt plateIdOfIntercept(const NaifVertex &vertex,
86  const NaifVector &raydir,
87  NaifVertex &xpoint) const;
88  NaifTriangle plate(SpiceInt plateid) const;
89 
90  NaifDskPlateModel *clone() const;
91 
92  private:
97  enum ErrAction { Throw,
99  };
100 
113  public:
116 
117  QString m_dskfile;
118  SpiceInt m_handle;
119  SpiceDLADescr m_dladsc;
121  SpiceDSKDescr m_dskdsc;
122  SpiceInt m_plates;
123  SpiceInt m_vertices;
124  QMutex m_mutex;
125  };
126 
127  // Shared file descriptor supports copying of object
130 
131  NaifDskDescriptor *openDSK(const QString &dskfile);
132  bool verify(const bool &test, const QString &errmsg,
133  const ErrAction &action = Throw) const;
134  SurfacePoint *makePoint(const NaifVertex &v) const;
135  };
136 
137 } // namespace Isis
138 
139 #endif
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:148
SpiceInt numberPlates() const
Returns the number of plates in the model.
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.
SurfacePoint * makePoint(const NaifVertex &v) const
Construct and return a SurfacePoint pointer.
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:63
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:61
Intercept * intercept(const NaifVertex &vertex, const NaifVector &raydir) const
Determine a target body intercept point from an observer and 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:62
SpiceInt m_vertices
Number of vertices defining the plate.
SpiceInt numberVertices() const
Returns the number of vertices in the plate model.
SpiceInt m_plates
Number of Plates in the model.
SurfacePoint * point(const Latitude &lat, const Longitude &lon) const
Get surface intersection for a lat/lon grid point.
NaifTriangle plate(SpiceInt plateid) const
Retrieve the triangular plate identified by its ID.
bool isValid() const
Checks validity of the object.
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.
int size() const
Returns the number of plates in the DSK file - mostly for conformity.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
QString m_dskfile
The NAIF DSK file representing this plate&#39;s shape model.
QString filename() const
Returns the nane of the NAIF DSK file.
Implementation interface API for NAIF&#39;s DSK plate model.
bool verify(const bool &test, const QString &errmsg, const ErrAction &action=Throw) const
Convenience method for generalized error reporting.
bool isPlateIdValid(const SpiceInt plateid) const
Determines if the plate ID is valid.
TNT::Array2D< SpiceDouble > NaifTriangle
3-D triangle[3][3]
Definition: NaifDskApi.h:63
SpiceInt plateIdOfIntercept(const NaifVertex &vertex, const NaifVector &raydir, NaifVertex &xpoint) const
Primary API to determine ray intercept from observer/look direction.