7#include "NaifDskShape.h"
14#include "IException.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"
77 dskFile = (QString) kernels[
"ElevationModel"];
80 dskFile = (QString) kernels[
"ShapeModel"];
104 m_model(model), m_intercept(NULL) {
136 std::vector<double> lookDirection) {
167 const std::vector<double> &observerPos,
168 const bool &backCheck) {
170 std::vector<double> look(3);
171 look[0] = surfpt.GetX().kilometers() - observerPos[0];
172 look[1] = surfpt.GetY().kilometers() - observerPos[1];
173 look[2] = surfpt.GetZ().kilometers() - observerPos[2];
198 QScopedPointer<SurfacePoint> pnt(
m_model.
point(lat, lon));
199 if ( !pnt.isNull() )
return (pnt->GetLocalRadius());
217 QString mess =
"Intercept point does not exist - cannot provide normal vector";
268 QString mess =
"Intercept point does not exist - cannot provide normal vector";
310 QString msg =
"An intersection must be defined before computing the surface normal.";
314 QString msg =
"The surface point intersection must be valid to compute the surface normal.";
318 QString msg =
"A valid target must be defined before computing the surface normal.";
327 QVector<double> norm(3);
331 surfnm_c(radii[0].kilometers(), radii[1].kilometers(), radii[2].kilometers(),
Distance measurement, usually in meters.
@ Programmer
This error is for when a programmer made an API call that was illegal.
Container for a intercept condition.
This class is designed to encapsulate the concept of a Latitude.
This class is designed to encapsulate the concept of a Longitude.
Implementation interface API for NAIF's DSK plate model.
Intercept * intercept(const NaifVertex &vertex, const NaifVector &raydir) const
Determine a target body intercept point from an observer and look direction.
SurfacePoint * point(const Latitude &lat, const Longitude &lon) const
Get surface intersection for a lat/lon grid point.
QScopedPointer< Intercept > m_intercept
Pointer to the shape's intercept.
void setLocalNormalFromIntercept()
Set the local normal vector to the intercept point normal.
const Intercept * intercept() const
Returns a pointer to the current intercept.
QVector< double > ellipsoidNormal()
Compute the true surface normal vector of an ellipsoid.
NaifDskShape()
Generic constructor sets type to a TIN.
NaifDskPlateModel m_model
Plate model to intersect.
bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)
Compute a DEM intersection from and observer and look direction.
void calculateDefaultNormal()
Return the surface normal of the ellipsoid as the default.
Distance localRadius(const Latitude &lat, const Longitude &lon)
Determine DEM radius at a given lat/lon grid point.
void calculateSurfaceNormal()
Return the surface normal of the ellipsoid.
void calculateLocalNormal(QVector< double * > cornerNeighborPoints)
Compute the normal for a local region of surface points.
bool isDEM() const
Indicates that this shape model is not from a DEM.
~NaifDskShape()
Destructor - cleanup is handled automagically.
const NaifDskPlateModel & model() const
Returns a direct reference to the DSK plate model file interface.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Contains multiple PvlContainers.
Container for cube-like labels.
@ Traverse
Search child objects.
Define shapes and provide utilities for Isis targets.
bool hasIntersection()
Returns intersection status.
void setNormal(const std::vector< double >)
Sets the surface normal for the currect intersection point.
void setLocalNormal(const std::vector< double >)
Sets the local normal for the currect intersection point.
virtual SurfacePoint * surfaceIntersection() const
Returns the surface intersection for this ShapeModel.
bool hasValidTarget() const
Returns the status of the target.
virtual void setSurfacePoint(const SurfacePoint &surfacePoint)
Set surface intersection point.
std::vector< Distance > targetRadii() const
Returns the radii of the body in km.
void setName(QString name)
Sets the shape name.
This class defines a body-fixed surface point.
This class is used to create and store valid Isis targets.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
TNT::Array1D< SpiceDouble > NaifVector
Namespace to contain type definitions of NAIF DSK fundamentals.
TNT::Array1D< SpiceDouble > NaifVertex
1-D Buffer[3]
Namespace for the standard library.