Isis 3.0 Object Programmers' Reference |
Home |
Define shapes and provide utilities for Isis3 targets. More...
#include <ShapeModel.h>
Public Member Functions | |
ShapeModel () | |
default constructor | |
ShapeModel (Target *target, Isis::Pvl &pvl) | |
Construct and load a shape model from a pvl. | |
ShapeModel (Target *target) | |
Construct and load a shape model from a target only. | |
void | Initialize () |
Initialize the ShapeModel private variables. | |
virtual | ~ShapeModel ()=0 |
Destroys the ShapeModel. | |
virtual bool | intersectSurface (std::vector< double > observerPos, std::vector< double > lookDirection)=0 |
SurfacePoint * | surfaceIntersection () const |
Return the surface intersection. | |
bool | hasIntersection () |
Return intersection status. | |
bool | hasNormal () const |
Return surface point normal status. | |
virtual void | calculateDefaultNormal ()=0 |
virtual void | calculateLocalNormal (QVector< double * > neighborPoints)=0 |
virtual void | calculateSurfaceNormal ()=0 |
void | clearSurfacePoint () |
Clear or reset the current surface point. | |
virtual double | emissionAngle (const std::vector< double > &sB) |
Computes and returns emission angle in degrees given the observer position. | |
virtual double | incidenceAngle (const std::vector< double > &uB) |
Returns the incidence angle in degrees. | |
virtual double | phaseAngle (const std::vector< double > &sB, const std::vector< double > &uB) |
Returns the phase angle in degrees. | |
virtual Distance | localRadius (const Latitude &lat, const Longitude &lon)=0 |
QString | name () const |
Get the shape name. | |
void | setHasIntersection (bool b) |
Set m_hasIntersection;. | |
void | setSurfacePoint (const SurfacePoint &surfacePoint) |
Set surface intersection point. | |
std::vector< double > | normal () |
Return the local normal of the current intersection point. | |
Protected Member Functions | |
void | setNormal (const std::vector< double >) |
Set the normal for the currect intersection point. | |
void | setNormal (const double a, const double b, const double c) |
Set the normal for the currect intersection point. | |
void | setName (QString name) |
Set the shape name. | |
void | calculateEllipsoidalSurfaceNormal () |
Calculate ellipsoidal surface normal. | |
bool | hasEllipsoidIntersection () |
Returns the status of the ellipsoid model intersection. | |
bool | intersectEllipsoid (const std::vector< double > observerPosRelativeToTarget, const std::vector< double > &observerLookVectorToTarget) |
Find the intersection point on the ellipsoid model. | |
bool | hasValidTarget () const |
std::vector< Distance > | targetRadii () const |
Returns the radii of the body in km. | |
void | setHasNormal (bool status) |
Set the hasNormal flag. | |
double | resolution () |
Convenience method to get pixel resolution (m/pix) at current intersection point. | |
Private Attributes | |
bool | m_hasEllipsoidIntersection |
bool | m_hasIntersection |
indicates good intersection exists | |
bool | m_hasNormal |
indicates normal has been computed | |
std::vector< double > | m_normal |
Local normal of current intersection point. | |
QString * | m_name |
SurfacePoint * | m_surfacePoint |
Current intersection point. | |
Target * | m_target |
Define shapes and provide utilities for Isis3 targets.
This base class will define shapes of Isis3 target bodies as well as provide utilities to retrieve radii and photometric information.
2010-07-30 - Debbie A. Cook - Original version.
2012-10-25 - Jeannie Backer - Changed resolution() method and call to Spice::resolution() method to lower camel case. Added resolution() method test to improve unitTest code coverage. References #1181.
2012-10-31 - Ken Edmundson - Added another SetNormal method and fixed original to set the m_hasNormal to true.
2012-11-14 - Jeannie Backer - Removed cout lines left in while testing code. References #1181.
2012-12-21 - Debbie A. Cook - Added new members m_hasEllipsoidIntersection and method hasEllipsoidIntersection(). Fixes Mantis ticket #1343
Definition at line 63 of file ShapeModel.h.
Isis::ShapeModel::ShapeModel | ( | ) |
default constructor
Definition at line 27 of file ShapeModel.cpp.
Construct and load a shape model from a pvl.
pvl | Valid Isis3 cube label. |
Definition at line 38 of file ShapeModel.cpp.
Isis::ShapeModel::ShapeModel | ( | Target * | target | ) |
Construct and load a shape model from a target only.
target | Valid Isis3 target. |
Definition at line 49 of file ShapeModel.cpp.
|
pure virtual |
Destroys the ShapeModel.
Definition at line 68 of file ShapeModel.cpp.
|
protected |
Calculate ellipsoidal surface normal.
Definition at line 81 of file ShapeModel.cpp.
References _FILEINFO_.
Referenced by Isis::EllipsoidShape::calculateDefaultNormal(), Isis::DemShape::calculateDefaultNormal(), Isis::EllipsoidShape::calculateSurfaceNormal(), and Isis::DemShape::calculateSurfaceNormal().
void Isis::ShapeModel::clearSurfacePoint | ( | ) |
Clear or reset the current surface point.
Definition at line 286 of file ShapeModel.cpp.
Referenced by Isis::Camera::RawFocalPlanetoImage(), Isis::Sensor::SetGround(), Isis::Camera::SetGround(), Isis::Sensor::SetGroundLocal(), Isis::Camera::SetImage(), Isis::Sensor::setTime(), Isis::Sensor::SetUniversalGround(), and Isis::Camera::SetUniversalGround().
|
virtual |
Computes and returns emission angle in degrees given the observer position.
Emission Angle: The angle between the surface normal vector at the intersection point and a vector from the intersection point to the spacecraft. The emission angle varies from 0 degrees when the spacecraft is viewing the sub-spacecraft point (nadir viewing) to 90 degrees when the intercept is tangent to the surface of the target body. Thus, higher values of emission angle indicate more oblique viewing of the target.
sB,: | Spacecraft position in body-fixed coordinates |
Reimplemented in Isis::PlaneShape.
Definition at line 123 of file ShapeModel.cpp.
References Isis::RAD2DEG().
Referenced by Isis::Sensor::EmissionAngle(), and Isis::Sensor::SetGroundLocal().
|
protected |
Returns the status of the ellipsoid model intersection.
Definition at line 150 of file ShapeModel.cpp.
Referenced by Isis::EquatorialCylindricalShape::intersectSurface().
bool Isis::ShapeModel::hasIntersection | ( | ) |
Return intersection status.
Definition at line 270 of file ShapeModel.cpp.
Referenced by Isis::EllipsoidShape::calculateLocalNormal(), Isis::NaifDskShape::calculateLocalNormal(), Isis::NaifDskShape::ellipsoidNormal(), Isis::Camera::GetLocalNormal(), Isis::Sensor::HasSurfaceIntersection(), Isis::EquatorialCylindricalShape::intersectSurface(), Isis::DemShape::intersectSurface(), and Isis::NaifDskShape::setLocalNormalFromIntercept().
bool Isis::ShapeModel::hasNormal | ( | ) | const |
Return surface point normal status.
Definition at line 278 of file ShapeModel.cpp.
Referenced by Isis::Camera::GetLocalNormal().
|
virtual |
Returns the incidence angle in degrees.
This does not use the surface model.
Reimplemented in Isis::PlaneShape.
Definition at line 160 of file ShapeModel.cpp.
References Isis::RAD2DEG().
Referenced by Isis::Sensor::IncidenceAngle().
void Isis::ShapeModel::Initialize | ( | ) |
Initialize the ShapeModel private variables.
Definition at line 58 of file ShapeModel.cpp.
|
protected |
Find the intersection point on the ellipsoid model.
Definition at line 186 of file ShapeModel.cpp.
Referenced by Isis::EllipsoidShape::intersectSurface(), and Isis::DemShape::intersectSurface().
QString Isis::ShapeModel::name | ( | ) | const |
Get the shape name.
Definition at line 371 of file ShapeModel.cpp.
Referenced by Isis::Camera::GetLocalNormal(), Isis::UniversalGroundMap::GroundRange(), Isis::VimsGroundMap::SetGround(), Isis::Camera::SetGround(), Isis::Camera::SetImage(), Isis::TrackTool::updateLabels(), and Isis::AdvancedTrackTool::updateRow().
std::vector< double > Isis::ShapeModel::normal | ( | ) |
Return the local normal of the current intersection point.
returns | normal vector if it exists |
Definition at line 297 of file ShapeModel.cpp.
References _FILEINFO_.
Referenced by Isis::EllipsoidShape::calculateLocalNormal(), Isis::DemShape::calculateLocalNormal(), and Isis::Camera::GetLocalNormal().
|
virtual |
Returns the phase angle in degrees.
Definition at line 232 of file ShapeModel.cpp.
References Isis::RAD2DEG().
Referenced by Isis::Sensor::PhaseAngle().
|
protected |
Convenience method to get pixel resolution (m/pix) at current intersection point.
Definition at line 409 of file ShapeModel.cpp.
References _FILEINFO_.
Referenced by Isis::DemShape::intersectSurface().
void Isis::ShapeModel::setHasIntersection | ( | bool | b | ) |
Set m_hasIntersection;.
Definition at line 379 of file ShapeModel.cpp.
Referenced by Isis::EquatorialCylindricalShape::intersectSurface(), Isis::DemShape::intersectSurface(), Isis::PlaneShape::intersectSurface(), Isis::Camera::RawFocalPlanetoImage(), Isis::Sensor::SetGroundLocal(), Isis::Camera::SetImage(), and Isis::Sensor::SetLookDirection().
|
protected |
Set the hasNormal flag.
Definition at line 401 of file ShapeModel.cpp.
Referenced by Isis::EllipsoidShape::calculateLocalNormal(), and Isis::DemShape::calculateLocalNormal().
|
protected |
Set the shape name.
Definition at line 363 of file ShapeModel.cpp.
Referenced by Isis::DemShape::DemShape(), Isis::EllipsoidShape::EllipsoidShape(), Isis::EquatorialCylindricalShape::EquatorialCylindricalShape(), Isis::NaifDskShape::NaifDskShape(), and Isis::PlaneShape::PlaneShape().
|
protected |
Set the normal for the currect intersection point.
Definition at line 331 of file ShapeModel.cpp.
References _FILEINFO_.
Referenced by Isis::EllipsoidShape::calculateLocalNormal(), Isis::DemShape::calculateLocalNormal(), Isis::NaifDskShape::calculateSurfaceNormal(), Isis::PlaneShape::intersectSurface(), and Isis::NaifDskShape::setLocalNormalFromIntercept().
|
protected |
Set the normal for the currect intersection point.
Definition at line 346 of file ShapeModel.cpp.
References _FILEINFO_.
void Isis::ShapeModel::setSurfacePoint | ( | const SurfacePoint & | surfacePoint | ) |
Set surface intersection point.
Definition at line 388 of file ShapeModel.cpp.
Referenced by Isis::NaifDskShape::intersectSurface(), Isis::RadarGroundMap::SetGround(), and Isis::Sensor::SetGround().
SurfacePoint * Isis::ShapeModel::surfaceIntersection | ( | ) | const |
Return the surface intersection.
Definition at line 262 of file ShapeModel.cpp.
Referenced by Isis::EllipsoidShape::calculateLocalNormal(), Isis::DemShape::calculateLocalNormal(), Isis::Sensor::Coordinate(), Isis::NaifDskShape::ellipsoidNormal(), Isis::PlaneShape::emissionAngle(), Isis::Sensor::GetLatitude(), Isis::Sensor::GetLongitude(), Isis::Sensor::GetSurfacePoint(), Isis::PlaneShape::incidenceAngle(), Isis::EquatorialCylindricalShape::intersectSurface(), Isis::DemShape::intersectSurface(), Isis::PlaneShape::intersectSurface(), Isis::PlaneShape::localRadius(), Isis::Sensor::LocalRadius(), Isis::Sensor::SetGroundLocal(), Isis::Sensor::SetUniversalGround(), Isis::Sensor::SlantDistance(), Isis::Sensor::SolarDistance(), Isis::Sensor::UniversalLatitude(), and Isis::Sensor::UniversalLongitude().
|
protected |
Returns the radii of the body in km.
The radii are obtained from the target.
Definition at line 317 of file ShapeModel.cpp.
References _FILEINFO_.
Referenced by Isis::EllipsoidShape::calculateLocalNormal(), Isis::NaifDskShape::ellipsoidNormal(), Isis::EquatorialCylindricalShape::intersectSurface(), and Isis::EllipsoidShape::localRadius().
|
private |
indicates good intersection exists
Definition at line 148 of file ShapeModel.h.
|
private |
indicates normal has been computed
Definition at line 149 of file ShapeModel.h.
|
private |
Local normal of current intersection point.
Definition at line 150 of file ShapeModel.h.
|
private |
Current intersection point.
Definition at line 152 of file ShapeModel.h.