7#include "EllipsoidShape.h"
17#include "IException.h"
21#include "NaifStatus.h"
22#include "ShapeModel.h"
23#include "SurfacePoint.h"
53 std::vector<double> lookDirection) {
71 QVector <double *> points;
112 IString msg =
"A valid intersection must be defined before computing the surface normal";
124 double a = radii[0].kilometers();
125 double b = radii[1].kilometers();
126 double c = radii[2].kilometers();
128 vector<double>
normal(3,0.);
130 surfnm_c(a, b, c, pB, (SpiceDouble *) &
normal[0]);
149 double a = radii[0].kilometers();
150 double b = radii[1].kilometers();
151 double c = radii[2].kilometers();
153 double rlat = lat.radians();
154 double rlon = lon.radians();
156 double xyradius = a * b / sqrt(pow(b * cos(rlon), 2) +
157 pow(a * sin(rlon), 2));
158 const double &radius = xyradius * c / sqrt(pow(c * cos(rlat), 2) +
159 pow(xyradius * sin(rlat), 2));
Distance measurement, usually in meters.
@ Kilometers
The distance is being specified in kilometers.
EllipsoidShape()
Initialize the EllipsoidShape.
bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)
Intersect the shape model.
bool isDEM() const
Indicates that this shape model is not from a DEM.
void calculateLocalNormal(QVector< double * > cornerNeighborPoints)
Calculate the local surface normal of the current intersection point.
void calculateSurfaceNormal()
Calculate the surface normal of the current intersection point.
Distance localRadius(const Latitude &lat, const Longitude &lon)
Get the local radius for a point on the surface.
virtual void calculateDefaultNormal()
Calculate the default normal of the current intersection point.
@ Programmer
This error is for when a programmer made an API call that was illegal.
Adds specific functionality to C++ strings.
This class is designed to encapsulate the concept of a Latitude.
This class is designed to encapsulate the concept of a Longitude.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
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 intersectEllipsoid(const std::vector< double > observerPosRelativeToTarget, const std::vector< double > &observerLookVectorToTarget)
Finds the intersection point on the ellipsoid model using the given position of the observer (spacecr...
virtual std::vector< double > normal()
Returns the surface normal at the current intersection point.
virtual std::vector< double > localNormal()
Returns the local surface normal at the current intersection point.
std::vector< Distance > targetRadii() const
Returns the radii of the body in km.
void setHasLocalNormal(bool status)
Sets the flag to indicate whether this ShapeModel has a local normal.
void setName(QString name)
Sets the shape name.
This class is used to create and store valid Isis targets.
This is free and unencumbered software released into the public domain.
Namespace for the standard library.