Isis 3 Programmer Reference
Isis::Intercept Class Reference

Container for a intercept condition. More...

#include <Intercept.h>

Collaboration diagram for Isis::Intercept:
Collaboration graph

Public Member Functions

 Intercept ()
 Default empty constructor.
 
 Intercept (const NaifVertex &observer, const NaifVector &raydir, SurfacePoint *ipoint, AbstractPlate *shape)
 Constructor of predetermined intercept point.
 
virtual ~Intercept ()
 Empty destructor.
 
bool isValid () const
 This method tests the vailidty of the intercept point.
 
const NaifVertexobserver () const
 Accessor for the observer position of the intercept.
 
const NaifVectorlookDirectionRay () const
 Accessor for the look direction of the intercept.
 
SurfacePoint location () const
 Returns the location of the intercept location on the shape.
 
NaifVector normal () const
 Gets the normal vector to the shape for this plate.
 
Angle emission () const
 Compute the emission of the intercept point from the observer.
 
Angle separationAngle (const NaifVector &raydir) const
 Returns the separation angle of the observer and the plate normal.
 
const AbstractPlateshape () const
 Access the plate for this intercept.
 

Private Types

enum  ErrAction { Throw , NoThrow }
 Enumeration to indicate whether to throw an exception if an error occurs. More...
 

Private Member Functions

bool verify (const bool &test, const QString &errmsg, const ErrAction &action=Throw) const
 Convenient error handler.
 

Private Attributes

NaifVertex m_observer
 Three dimensional coordinate position of the observer, in body fixed.
 
NaifVector m_raydir
 Three dimensional ray representing the look direction.
 
QSharedPointer< SurfacePointm_point
 Surface point of the intercept location on the body, in body fixed.
 
QSharedPointer< AbstractPlatem_shape
 Shape Model for the intercept point.
 

Detailed Description

Container for a intercept condition.

This class is intended to contain all the necessary elements of an observer with a look direction and intercept point on an abtract shape. If efficient, reintrant, thread safe memory management elements (e.g., TNT) are used for the types, this can be used in threaded environments.

Author
2012-12-05 Kris Becker
History

2012-12-05 Kris Becker - Original version.

2015-03-08 Jeannie Backer - Added documentation and test. Added class to ISIS trunk. References #2035

Definition at line 36 of file Intercept.h.

Member Enumeration Documentation

◆ ErrAction

Enumeration to indicate whether to throw an exception if an error occurs.

Enumerator
Throw 

Throw an exception if an error occurs.

NoThrow 

Do not throw an exception if an error occurs.

Definition at line 62 of file Intercept.h.

Constructor & Destructor Documentation

◆ Intercept() [1/2]

Isis::Intercept::Intercept ( )

Default empty constructor.

Definition at line 30 of file Intercept.cpp.

◆ Intercept() [2/2]

Isis::Intercept::Intercept ( const NaifVertex & observer,
const NaifVector & raydir,
SurfacePoint * ipoint,
AbstractPlate * shape )

Constructor of predetermined intercept point.

This constructor provides all the elements that comprise an observer, look direction, intercept point and the shape it intersects. This is well suited for plates (TIN) intercept senarios.

Parameters
observerLocation of observer in body fixed position
raydirLook direction of observer presumably at the target body
ipointSurface point of the intercept location on the body
shapeShape of the intercept point
History
2014-02-10 Kris Becker - Original version

Definition at line 50 of file Intercept.cpp.

◆ ~Intercept()

Isis::Intercept::~Intercept ( )
virtual

Empty destructor.

Definition at line 59 of file Intercept.cpp.

Member Function Documentation

◆ emission()

Angle Isis::Intercept::emission ( ) const

Compute the emission of the intercept point from the observer.

This method computes the emission angle from the observer to the plate intercept point if the representation of the observer, look direction and intercept point are valid.

Returns
Angle Returns the emission angle as computed from the observer given as determine from the intercept point
History
2013-12-05 Kris Becker - Original version.

Definition at line 150 of file Intercept.cpp.

References isValid(), m_observer, m_point, separationAngle(), and verify().

◆ isValid()

bool Isis::Intercept::isValid ( ) const

This method tests the vailidty of the intercept point.

A point is invalid if the intercept point is null, if the shape is null, or if either the observer position or look direction vector is not size 3.

Returns
bool Indicates whether this object is valid.

Definition at line 70 of file Intercept.cpp.

References m_observer, m_point, m_raydir, m_shape, and Isis::validate().

Referenced by emission(), location(), normal(), and separationAngle().

◆ location()

SurfacePoint Isis::Intercept::location ( ) const

Returns the location of the intercept location on the shape.

This method returns the point of intercept from the observer and a given look direction from the perspective of the observer.

Returns
SurfacePoint Intercept point from the observer and look direction
History
2014-02-13 Kris Becker - Original version

Definition at line 116 of file Intercept.cpp.

References isValid(), m_point, and verify().

◆ lookDirectionRay()

const NaifVector & Isis::Intercept::lookDirectionRay ( ) const

Accessor for the look direction of the intercept.

Returns
NaifVector A 3D ray representing the look direction of the observer in body fixed coordinates.

Definition at line 99 of file Intercept.cpp.

References m_raydir.

◆ normal()

NaifVector Isis::Intercept::normal ( ) const

Gets the normal vector to the shape for this plate.

Returns
NaifVector A 3D ray representing the normal direction at the intercept point in body fixed coordinates.

Definition at line 129 of file Intercept.cpp.

References isValid(), m_shape, and verify().

◆ observer()

const NaifVertex & Isis::Intercept::observer ( ) const

Accessor for the observer position of the intercept.

Returns
NaifVertex A 3D point representing the position of the observer in body fixed coordinates

Definition at line 87 of file Intercept.cpp.

References m_observer.

◆ separationAngle()

Angle Isis::Intercept::separationAngle ( const NaifVector & raydir) const

Returns the separation angle of the observer and the plate normal.

This method computes the seperation between the look direction (from the observer) and the plate normal if the object contains a valid intercept point.

Parameters
raydirLook direction to compute the separation angle between it and the plate normal.
Returns
Angle Angle of separation
History
2013-12-05 Kris Becker - Original version.

Definition at line 182 of file Intercept.cpp.

References isValid(), m_shape, and verify().

Referenced by emission().

◆ shape()

const AbstractPlate * Isis::Intercept::shape ( ) const

Access the plate for this intercept.

NOTE: A null pointer may be returned if this Intercept was constructed without a shape.

Returns
NaifVector A pointer to the AbstractPlate associated with this intercept.

Definition at line 223 of file Intercept.cpp.

References m_shape.

◆ verify()

bool Isis::Intercept::verify ( const bool & test,
const QString & errmsg,
const ErrAction & action = Throw ) const
private

Convenient error handler.

This convenience method provides an abtraction from which to throw errors.

Parameters
testBoolean parameter to test for an error condition
errmsgString containing the error message to include in the exception
actionSpecifies action to take if error is specfied
Returns
bool Always returns the value of test if the specfied action does not request an exception to be thrown
History
2013-12-05 Kris Becker - Original version.

Definition at line 205 of file Intercept.cpp.

References Isis::IException::Programmer, and Throw.

Referenced by emission(), location(), normal(), and separationAngle().

Member Data Documentation

◆ m_observer

NaifVertex Isis::Intercept::m_observer
private

Three dimensional coordinate position of the observer, in body fixed.

Definition at line 69 of file Intercept.h.

Referenced by emission(), isValid(), and observer().

◆ m_point

QSharedPointer<SurfacePoint> Isis::Intercept::m_point
private

Surface point of the intercept location on the body, in body fixed.

Definition at line 72 of file Intercept.h.

Referenced by emission(), isValid(), and location().

◆ m_raydir

NaifVector Isis::Intercept::m_raydir
private

Three dimensional ray representing the look direction.

Definition at line 70 of file Intercept.h.

Referenced by isValid(), and lookDirectionRay().

◆ m_shape

QSharedPointer<AbstractPlate> Isis::Intercept::m_shape
private

Shape Model for the intercept point.

Definition at line 74 of file Intercept.h.

Referenced by isValid(), normal(), separationAngle(), and shape().


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