USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::ShapeModel Class Referenceabstract

Define shapes and provide utilities for Isis3 targets. More...

#include <ShapeModel.h>

Inheritance diagram for Isis::ShapeModel:
Inheritance graph
Collaboration diagram for Isis::ShapeModel:
Collaboration graph

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
 
SurfacePointsurfaceIntersection () 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< DistancetargetRadii () 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
 
SurfacePointm_surfacePoint
 Current intersection point.
 
Targetm_target
 

Detailed Description

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.

Author
2010-07-30 Debbie A. Cook
History:

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.

Constructor & Destructor Documentation

Isis::ShapeModel::ShapeModel ( )

default constructor

Definition at line 27 of file ShapeModel.cpp.

Isis::ShapeModel::ShapeModel ( Target target,
Isis::Pvl pvl 
)

Construct and load a shape model from a pvl.

Parameters
pvlValid 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.

Parameters
targetValid Isis3 target.

Definition at line 49 of file ShapeModel.cpp.

Isis::ShapeModel::~ShapeModel ( )
pure virtual

Destroys the ShapeModel.

Definition at line 68 of file ShapeModel.cpp.

Member Function Documentation

void Isis::ShapeModel::calculateEllipsoidalSurfaceNormal ( )
protected
double Isis::ShapeModel::emissionAngle ( const std::vector< double > &  sB)
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.

Parameters
sB,:Spacecraft position in body-fixed coordinates
Returns
Emmision angle in decimal degrees

Reimplemented in Isis::PlaneShape.

Definition at line 123 of file ShapeModel.cpp.

References Isis::RAD2DEG().

Referenced by Isis::Sensor::EmissionAngle(), and Isis::Sensor::SetGroundLocal().

bool Isis::ShapeModel::hasEllipsoidIntersection ( )
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::hasNormal ( ) const

Return surface point normal status.

Definition at line 278 of file ShapeModel.cpp.

Referenced by Isis::Camera::GetLocalNormal().

double Isis::ShapeModel::incidenceAngle ( const std::vector< double > &  uB)
virtual

Returns the incidence angle in degrees.

This does not use the surface model.

Returns
double Incidence angle, in degrees.

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.

bool Isis::ShapeModel::intersectEllipsoid ( const std::vector< double >  observerPosRelativeToTarget,
const std::vector< double > &  observerLookVectorToTarget 
)
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().

std::vector< double > Isis::ShapeModel::normal ( )

Return the local normal of the current intersection point.

Parameters
returnsnormal 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().

double Isis::ShapeModel::phaseAngle ( const std::vector< double > &  sB,
const std::vector< double > &  uB 
)
virtual

Returns the phase angle in degrees.

Returns
double Phase angle, in degrees.

Definition at line 232 of file ShapeModel.cpp.

References Isis::RAD2DEG().

Referenced by Isis::Sensor::PhaseAngle().

double Isis::ShapeModel::resolution ( )
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::setHasNormal ( bool  status)
protected

Set the hasNormal flag.

Definition at line 401 of file ShapeModel.cpp.

Referenced by Isis::EllipsoidShape::calculateLocalNormal(), and Isis::DemShape::calculateLocalNormal().

void Isis::ShapeModel::setName ( QString  name)
protected
void Isis::ShapeModel::setNormal ( const std::vector< double >  normal)
protected
void Isis::ShapeModel::setNormal ( const double  a,
const double  b,
const double  c 
)
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().

std::vector< Distance > Isis::ShapeModel::targetRadii ( ) const
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().

Member Data Documentation

bool Isis::ShapeModel::m_hasIntersection
private

indicates good intersection exists

Definition at line 148 of file ShapeModel.h.

bool Isis::ShapeModel::m_hasNormal
private

indicates normal has been computed

Definition at line 149 of file ShapeModel.h.

std::vector<double> Isis::ShapeModel::m_normal
private

Local normal of current intersection point.

Definition at line 150 of file ShapeModel.h.

SurfacePoint* Isis::ShapeModel::m_surfacePoint
private

Current intersection point.

Definition at line 152 of file ShapeModel.h.


The documentation for this class was generated from the following files: