|
Isis 3 Programmer Reference
|
7 #include "NaifDskShape.h"
14 #include "IException.h"
15 #include "Intercept.h"
18 #include "Longitude.h"
19 #include "NaifDskApi.h"
20 #include "NaifDskPlateModel.h"
21 #include "NaifStatus.h"
23 #include "ShapeModel.h"
24 #include "SpecialPixel.h"
25 #include "Statistics.h"
26 #include "SurfacePoint.h"
35 NaifDskShape::NaifDskShape() :
ShapeModel(), m_intercept(NULL) {
76 dskFile = (QString) kernels[
"ElevationModel"];
79 dskFile = (QString) kernels[
"ShapeModel"];
102 m_model(model), m_intercept(NULL) {
134 std::vector<double> lookDirection) {
165 QScopedPointer<SurfacePoint> pnt(
m_model.
point(lat, lon));
166 if ( !pnt.isNull() )
return (pnt->GetLocalRadius());
183 QString mess =
"Intercept point does not exist - cannot provide normal vector";
235 QString mess =
"Intercept point does not exist - cannot provide normal vector";
275 QString msg =
"An intersection must be defined before computing the surface normal.";
279 QString msg =
"The surface point intersection must be valid to compute the surface normal.";
283 QString msg =
"A valid target must be defined before computing the surface normal.";
296 surfnm_c(radii[0].kilometers(), radii[1].kilometers(), radii[2].kilometers(),
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
QVector< double > ellipsoidNormal()
Compute the true surface normal vector of an ellipsoid.
TNT::Array1D< SpiceDouble > NaifVertex
1-D Buffer[3]
This class is designed to encapsulate the concept of a Latitude.
SurfacePoint * surfaceIntersection() const
Returns the surface intersection for this ShapeModel.
virtual void setSurfacePoint(const SurfacePoint &surfacePoint)
Set surface intersection point.
std::vector< Distance > targetRadii() const
Returns the radii of the body in km.
void calculateDefaultNormal()
Return the surface normal of the ellipsoid as the default.
const NaifDskPlateModel & model() const
Returns a direct reference to the DSK plate model file interface.
bool isDEM() const
Indicates that this shape model is not from a DEM.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Container for cube-like labels.
NaifDskShape()
Generic constructor sets type to a TIN.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
void setNormal(const std::vector< double >)
Sets the normal for the currect intersection point.
bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)
Compute a DEM intersection from and observer and look direction.
void calculateSurfaceNormal()
Return the surface normal of the ellipsi=oud.
const Intercept * intercept() const
Returns a pointer to the current intercept.
void setLocalNormalFromIntercept()
Set the normal vector to the intercept point normal.
Distance measurement, usually in meters.
This class is designed to encapsulate the concept of a Longitude.
@ Traverse
Search child objects.
Distance localRadius(const Latitude &lat, const Longitude &lon)
Determine DEM radius at a given lat/lon grid point.
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.
Contains multiple PvlContainers.
QScopedPointer< Intercept > m_intercept
Pointer to the shape's intercept.
@ Programmer
This error is for when a programmer made an API call that was illegal.
Namespace for the standard library.
bool hasValidTarget() const
Returns the status of the target.
Define shapes and provide utilities for Isis targets.
Container for a intercept condition.
void ToNaifArray(double naifOutput[3]) const
A naif array is a c-style array of size 3.
bool hasIntersection()
Returns intersection status.
This is free and unencumbered software released into the public domain.
Implementation interface API for NAIF's DSK plate model.
TNT::Array1D< SpiceDouble > NaifVector
Namespace to contain type definitions of NAIF DSK fundamentals.
NaifDskPlateModel m_model
Plate model to intersect.
This class is used to create and store valid Isis targets.
SurfacePoint * point(const Latitude &lat, const Longitude &lon) const
Get surface intersection for a lat/lon grid point.
This class defines a body-fixed surface point.
This is free and unencumbered software released into the public domain.
~NaifDskShape()
Destructor - cleanup is handled automagically.
void calculateLocalNormal(QVector< double * > cornerNeighborPoints)
Compute the normal for a local region of surface points.