46 std::vector<double> lookDirection) {
86 IString msg =
"A valid intersection must be defined before computing the surface normal";
98 double a = radii[0].kilometers();
99 double b = radii[1].kilometers();
100 double c = radii[2].kilometers();
101 vector<double>
normal(3,0.);
104 surfnm_c(a, b, c, pB, (SpiceDouble *) &normal[0]);
123 double a = radii[0].kilometers();
124 double b = radii[1].kilometers();
125 double c = radii[2].kilometers();
130 double xyradius = a * b / sqrt(pow(b * cos(rlon), 2) +
131 pow(a * sin(rlon), 2));
132 const double &radius = xyradius * c / sqrt(pow(c * cos(rlat), 2) +
133 pow(xyradius * sin(rlat), 2));
void calculateEllipsoidalSurfaceNormal()
Calculates the ellipsoidal surface normal.
std::vector< double > normal()
Returns the local surface normal at the current intersection point.
void calculateLocalNormal(QVector< double * > cornerNeighborPoints)
Calculate the local surface normal of the current intersection point.
double radians() const
Convert an angle to a double.
void setNormal(const std::vector< double >)
Sets the normal for the currect intersection point.
bool hasIntersection()
Returns intersection status.
void calculateSurfaceNormal()
Calculate the surface normal of the current intersection point.
virtual void calculateDefaultNormal()
Calculate the default normal of the current intersection point.
This class is designed to encapsulate the concept of a Latitude.
The distance is being specified in kilometers.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
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.
This class is designed to encapsulate the concept of a Longitude.
EllipsoidShape()
Initialize the EllipsoidShape.
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...
double kilometers() const
Get the displacement in kilometers.
#define _FILEINFO_
Macro for the filename and line number.
bool isDEM() const
Indicates that this shape model is not from a DEM.
Distance localRadius(const Latitude &lat, const Longitude &lon)
Get the local radius for a point on the surface.
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.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Adds specific functionality to C++ strings.
void setName(QString name)
Sets the shape name.
void setHasNormal(bool status)
Sets the flag to indicate whether this ShapeModel has a surface normal.
bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)
Intersect the shape model.
SurfacePoint * surfaceIntersection() const
Returns the surface intersection for this ShapeModel.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.