17#include "AbstractPlate.h"
18#include "IException.h"
20#include "NaifDskApi.h"
23#include "SurfacePoint.h"
52 m_observer(observer.copy()), m_raydir(raydir.copy()),
53 m_point(ipoint), m_shape(shape) {}
74 if (
m_point.isNull() ) valid =
false;
75 if (
m_shape.isNull() ) valid =
false;
117 verify(
isValid(),
"Unable to return Intercept location. Invalid/undefined Intercept point.");
130 verify(
isValid(),
"Unable to return Intercept normal. Invalid/undefined Intercept point.");
152 "Unable to return Intercept emission angle. Invalid/undefined Intercept point." );
156 m_point->ToNaifArray(&point[0]);
159 vsub_c(&
m_observer[0], &point[0], &raydir[0]);
184 "Unable to return Intercept separation angle. Invalid/undefined Intercept point.");
185 return (
m_shape->separationAngle(raydir));
207 if ( (
Throw == action ) && ( !test ) ) {
Abstract interface to a TIN plate.
Defines an angle and provides unit conversions.
@ Programmer
This error is for when a programmer made an API call that was illegal.
bool verify(const bool &test, const QString &errmsg, const ErrAction &action=Throw) const
Convenient error handler.
bool isValid() const
This method tests the vailidty of the intercept point.
NaifVector normal() const
Gets the normal vector to the shape for this plate.
QSharedPointer< AbstractPlate > m_shape
Shape Model for the intercept point.
NaifVertex m_observer
Three dimensional coordinate position of the observer, in body fixed.
SurfacePoint location() const
Returns the location of the intercept location on the shape.
NaifVector m_raydir
Three dimensional ray representing the look direction.
Angle separationAngle(const NaifVector &raydir) const
Returns the separation angle of the observer and the plate normal.
QSharedPointer< SurfacePoint > m_point
Surface point of the intercept location on the body, in body fixed.
virtual ~Intercept()
Empty destructor.
const AbstractPlate * shape() const
Access the plate for this intercept.
const NaifVertex & observer() const
Accessor for the observer position of the intercept.
const NaifVector & lookDirectionRay() const
Accessor for the look direction of the intercept.
ErrAction
Enumeration to indicate whether to throw an exception if an error occurs.
@ Throw
Throw an exception if an error occurs.
Angle emission() const
Compute the emission of the intercept point from the observer.
Intercept()
Default empty constructor.
This class defines a body-fixed surface point.
This is free and unencumbered software released into the public domain.
TNT::Array1D< SpiceDouble > NaifVector
Namespace to contain type definitions of NAIF DSK fundamentals.
TNT::Array1D< SpiceDouble > NaifVertex
1-D Buffer[3]
bool validate(const NaifVertex &v)
Verifies that the given NaifVector or NaifVertex is 3 dimensional.
Namespace for the standard library.