53 NaifDskShape::NaifDskShape() :
ShapeModel(), m_intercept(NULL) {
94 dskFile = (QString) kernels[
"ElevationModel"];
97 dskFile = (QString) kernels[
"ShapeModel"];
120 m_model(model), m_intercept(NULL) {
152 std::vector<double> lookDirection) {
183 QScopedPointer<SurfacePoint> pnt(
m_model.
point(lat, lon));
184 if ( !pnt.isNull() )
return (pnt->GetLocalRadius());
201 QString mess =
"Intercept point does not exist - cannot provide normal vector";
253 QString mess =
"Intercept point does not exist - cannot provide normal vector";
293 QString msg =
"An intersection must be defined before computing the surface normal.";
297 QString msg =
"The surface point intersection must be valid to compute the surface normal.";
301 QString msg =
"A valid target must be defined before computing the surface normal.";
314 surfnm_c(radii[0].kilometers(), radii[1].kilometers(), radii[2].kilometers(),
This class defines a body-fixed surface point.
void calculateSurfaceNormal()
Return the surface normal of the ellipsi=oud.
void setLocalNormalFromIntercept()
Set the normal vector to the intercept point normal.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
void setNormal(const std::vector< double >)
Sets the normal for the currect intersection point.
bool hasValidTarget() const
Returns the status of the target.
bool hasIntersection()
Returns intersection status.
NaifDskPlateModel m_model
Plate model to intersect.
const NaifDskPlateModel & model() const
Returns a direct reference to the DSK plate model file interface.
This class is designed to encapsulate the concept of a Latitude.
QVector< double > ellipsoidNormal()
Compute the true surface normal vector of an ellipsoid.
SurfacePoint * point(const Latitude &lat, const Longitude &lon) const
Get surface intersection for a lat/lon grid point.
void ToNaifArray(double naifOutput[3]) const
A naif array is a c-style array of size 3.
This error is for when a programmer made an API call that was illegal.
Distance measurement, usually in meters.
std::vector< Distance > targetRadii() const
Returns the radii of the body in km.
~NaifDskShape()
Destructor - cleanup is handled automagically.
TNT::Array1D< SpiceDouble > NaifVector
Namespace to contain type definitions of NAIF DSK fundamentals.
This class is designed to encapsulate the concept of a Longitude.
TNT::Array1D< SpiceDouble > NaifVertex
1-D Buffer[3]
bool isDEM() const
Indicates that this shape model is not from a DEM.
NaifDskShape()
Generic constructor sets type to a TIN.
Contains multiple PvlContainers.
#define _FILEINFO_
Macro for the filename and line number.
Container for a intercept condition.
QScopedPointer< Intercept > m_intercept
Pointer to the shape's intercept.
void calculateLocalNormal(QVector< double * > cornerNeighborPoints)
Compute the normal for a local region of surface points.
Distance localRadius(const Latitude &lat, const Longitude &lon)
Determine DEM radius at a given lat/lon grid point.
Container for cube-like labels.
This class is used to create and store valid Isis3 targets.
Define shapes and provide utilities for Isis3 targets.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
void setSurfacePoint(const SurfacePoint &surfacePoint)
Set surface intersection point.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
void calculateDefaultNormal()
Return the surface normal of the ellipsoid as the default.
void setName(QString name)
Sets the shape name.
Intercept * intercept(const NaifVertex &vertex, const NaifVector &raydir) const
Determine a target body intercept point from an observer and look direction.
Implementation interface API for NAIF's DSK plate model.
SurfacePoint * surfaceIntersection() const
Returns the surface intersection for this ShapeModel.
const Intercept * intercept() const
Returns a pointer to the current intercept.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)
Compute a DEM intersection from and observer and look direction.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.