Isis 3 Programmer Reference
|
Container for a intercept condition. More...
#include <Intercept.h>
Public Member Functions | |
Intercept () | |
Default empty constructor. More... | |
Intercept (const NaifVertex &observer, const NaifVector &raydir, SurfacePoint *ipoint, AbstractPlate *shape) | |
Constructor of predetermined intercept point. More... | |
virtual | ~Intercept () |
Empty destructor. More... | |
bool | isValid () const |
This method tests the vailidty of the intercept point. More... | |
const NaifVertex & | observer () const |
Accessor for the observer position of the intercept. More... | |
const NaifVector & | lookDirectionRay () const |
Accessor for the look direction of the intercept. More... | |
SurfacePoint | location () const |
Returns the location of the intercept location on the shape. More... | |
NaifVector | normal () const |
Gets the normal vector to the shape for this plate. More... | |
Angle | emission () const |
Compute the emission of the intercept point from the observer. More... | |
Angle | separationAngle (const NaifVector &raydir) const |
Returns the separation angle of the observer and the plate normal. More... | |
const AbstractPlate * | shape () const |
Access the plate for this intercept. More... | |
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. More... | |
Private Attributes | |
NaifVertex | m_observer |
Three dimensional coordinate position of the observer, in body fixed. More... | |
NaifVector | m_raydir |
Three dimensional ray representing the look direction. More... | |
QSharedPointer< SurfacePoint > | m_point |
Surface point of the intercept location on the body, in body fixed. More... | |
QSharedPointer< AbstractPlate > | m_shape |
Shape Model for the intercept point. More... | |
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.
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 51 of file Intercept.h.
|
private |
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 77 of file Intercept.h.
Isis::Intercept::Intercept | ( | ) |
Default empty constructor.
Definition at line 47 of file Intercept.cpp.
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.
observer | Location of observer in body fixed position |
raydir | Look direction of observer presumably at the target body |
ipoint | Surface point of the intercept location on the body |
shape | Shape of the intercept point |
Definition at line 67 of file Intercept.cpp.
|
virtual |
Empty destructor.
Definition at line 76 of file Intercept.cpp.
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.
Definition at line 167 of file Intercept.cpp.
References isValid(), m_observer, m_point, separationAngle(), and verify().
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.
Definition at line 87 of file Intercept.cpp.
References m_observer, m_point, m_raydir, m_shape, and Isis::validate().
Referenced by emission(), location(), normal(), and separationAngle().
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.
Definition at line 133 of file Intercept.cpp.
const NaifVector & Isis::Intercept::lookDirectionRay | ( | ) | const |
Accessor for the look direction of the intercept.
Definition at line 116 of file Intercept.cpp.
References m_raydir.
NaifVector Isis::Intercept::normal | ( | ) | const |
Gets the normal vector to the shape for this plate.
Definition at line 146 of file Intercept.cpp.
const NaifVertex & Isis::Intercept::observer | ( | ) | const |
Accessor for the observer position of the intercept.
Definition at line 104 of file Intercept.cpp.
References m_observer.
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.
raydir | Look direction to compute the separation angle between it and the plate normal. |
Definition at line 199 of file Intercept.cpp.
References isValid(), m_shape, and verify().
Referenced by emission().
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.
Definition at line 240 of file Intercept.cpp.
References m_shape.
|
private |
Convenient error handler.
This convenience method provides an abtraction from which to throw errors.
test | Boolean parameter to test for an error condition |
errmsg | String containing the error message to include in the exception |
action | Specifies action to take if error is specfied |
Definition at line 222 of file Intercept.cpp.
References _FILEINFO_, Isis::IException::Programmer, and Throw.
Referenced by emission(), location(), normal(), and separationAngle().
|
private |
Three dimensional coordinate position of the observer, in body fixed.
Definition at line 84 of file Intercept.h.
Referenced by emission(), isValid(), and observer().
|
private |
Surface point of the intercept location on the body, in body fixed.
Definition at line 87 of file Intercept.h.
Referenced by emission(), isValid(), and location().
|
private |
Three dimensional ray representing the look direction.
Definition at line 85 of file Intercept.h.
Referenced by isValid(), and lookDirectionRay().
|
private |
Shape Model for the intercept point.
Definition at line 89 of file Intercept.h.
Referenced by isValid(), normal(), separationAngle(), and shape().