47 std::vector<double> lookDirection) {
105 IString msg =
"A valid intersection must be defined before computing the surface normal";
117 double a = radii[0].kilometers();
118 double b = radii[1].kilometers();
119 double c = radii[2].kilometers();
121 vector<double>
normal(3,0.);
123 surfnm_c(a, b, c, pB, (SpiceDouble *) &
normal[0]);
142 double a = radii[0].kilometers();
143 double b = radii[1].kilometers();
144 double c = radii[2].kilometers();
149 double xyradius = a * b / sqrt(pow(b * cos(rlon), 2) +
150 pow(a * sin(rlon), 2));
151 const double &radius = xyradius * c / sqrt(pow(c * cos(rlat), 2) +
152 pow(xyradius * sin(rlat), 2));
std::vector< double > normal()
Returns the local surface normal at the current intersection point.
void setNormal(const std::vector< double >)
Sets the normal for the currect intersection point.
double radians() const
Convert an angle to a double.
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.
Namespace for the standard library.
This class is designed to encapsulate the concept of a Latitude.
The distance is being specified in kilometers.
SurfacePoint * surfaceIntersection() const
Returns the surface intersection for this ShapeModel.
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...
#define _FILEINFO_
Macro for the filename and line number.
Distance localRadius(const Latitude &lat, const Longitude &lon)
Get the local radius for a point on the surface.
bool isDEM() const
Indicates that this shape model is not from a DEM.
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.
Namespace for ISIS/Bullet specific routines.
void setName(QString name)
Sets the shape name.
void setHasNormal(bool status)
Sets the flag to indicate whether this ShapeModel has a surface normal.
double kilometers() const
Get the displacement in kilometers.
bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)
Intersect the shape model.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
void calculateLocalNormal(QVector< double *> cornerNeighborPoints)
Calculate the local surface normal of the current intersection point.