Isis Developer Reference
Isis::NaifDskPlateModel Class Reference

Implementation interface API for NAIF's DSK plate model. More...

#include <NaifDskPlateModel.h>

Collaboration diagram for Isis::NaifDskPlateModel:
Collaboration graph

Public Member Functions

 NaifDskPlateModel ()
 Default empty constructor.
 
 NaifDskPlateModel (const QString &dskfile)
 Construct given a file name - the only way to create with a DSK file.
 
virtual ~NaifDskPlateModel ()
 
bool isValid () const
 Checks validity of the object.
 
QString filename () const
 Returns the nane of the NAIF DSK file.
 
int size () const
 Returns the number of plates in the DSK file - mostly for conformity.
 
SpiceInt numberPlates () const
 Returns the number of plates in the model.
 
SpiceInt numberVertices () const
 Returns the number of vertices in the plate model.
 
SurfacePointpoint (const Latitude &lat, const Longitude &lon) const
 Get surface intersection for a lat/lon grid point.
 
Interceptintercept (const NaifVertex &vertex, const NaifVector &raydir) const
 Determine a target body intercept point from an observer and look direction.
 
bool isPlateIdValid (const SpiceInt plateid) const
 Determines if the plate ID is valid.
 
SpiceInt plateIdOfIntercept (const NaifVertex &vertex, const NaifVector &raydir, NaifVertex &xpoint) const
 Primary API to determine ray intercept from observer/look direction.
 
NaifTriangle plate (SpiceInt plateid) const
 Retrieve the triangular plate identified by its ID.
 
NaifDskPlateModelclone () const
 

Detailed Description

Implementation interface API for NAIF's DSK plate model.

This class implements a thread safe version of the NAIF DSK plate model API. This version is coded using the "alpha" version of the DSK library toolkit as release in 2010.

Part of the design of this implementation is the abilty to efficiently clone the object so that it is suitable for use in a threaded environment. Note that files is only closed when the last reference is released.

It is recommended that a shared or scoped pointer that provides the necessary elements for efficient safe thread computing.

Author
2013-12-05 Kris Becker

Constructor & Destructor Documentation

◆ NaifDskPlateModel() [1/2]

Isis::NaifDskPlateModel::NaifDskPlateModel ( )

Default empty constructor.

◆ NaifDskPlateModel() [2/2]

Isis::NaifDskPlateModel::NaifDskPlateModel ( const QString & dskfile)

Construct given a file name - the only way to create with a DSK file.

References _FILEINFO_, isValid(), and Isis::IException::User.

◆ ~NaifDskPlateModel()

Isis::NaifDskPlateModel::~NaifDskPlateModel ( )
virtual

Member Function Documentation

◆ clone()

NaifDskPlateModel * Isis::NaifDskPlateModel::clone ( ) const

◆ filename()

QString Isis::NaifDskPlateModel::filename ( ) const

Returns the nane of the NAIF DSK file.

References isValid().

◆ intercept()

Intercept * Isis::NaifDskPlateModel::intercept ( const NaifVertex & vertex,
const NaifVector & raydir ) const

Determine a target body intercept point from an observer and look direction.

This method will compute an intercept point on the target body given a body fixed vertex of an observer and a look direction. This implements a true ray intersection algortihm.

If an intercept point cannot be found a null pointer is returned.

History
2013-12-05 Kris Becker Original Version
Parameters
vertexBody fixed X/Y/Z coordinate of the observer
raydirVector that specifies a look direction
Returns
Intercept* Pointer to a valid intercept point. If no intercept is found, a null pointer is returned.

References isPlateIdValid(), plate(), and plateIdOfIntercept().

Referenced by Isis::NaifDskShape::intersectSurface().

◆ isPlateIdValid()

bool Isis::NaifDskPlateModel::isPlateIdValid ( const SpiceInt plateid) const

Determines if the plate ID is valid.

A valid plateId is between the values of 1 and the number of plates in the model.

This method is useful for checking for errors when determining the plate of intersection. Valid intersections are initially return by the NAID DSK API as identifying the plate ID where the intersection occurs. A DSK routine then retreives the triangle plate (TIN) by this ID number.

History
2013-12-05 Kris Becker Original Version
Parameters
plateidPlate ID to check for validity
Returns
bool Returns true if a valid plate ID is provided, otherwise false is returned

References isValid().

Referenced by intercept(), plate(), and point().

◆ isValid()

bool Isis::NaifDskPlateModel::isValid ( ) const

◆ numberPlates()

int Isis::NaifDskPlateModel::numberPlates ( ) const

Returns the number of plates in the model.

References isValid().

Referenced by size().

◆ numberVertices()

int Isis::NaifDskPlateModel::numberVertices ( ) const

Returns the number of vertices in the plate model.

References isValid().

◆ plate()

NaifTriangle Isis::NaifDskPlateModel::plate ( SpiceInt plateid) const

Retrieve the triangular plate identified by its ID.

This method can be used to retrieve a particular plate specified by its ID. This is useful for general retrieval and can be used to easily read all plates in a DSK file.

Author
2014-02-05 Kris Becker Original Version
Parameters
plateidValid id of the plate to retrieve
Returns
NaifTriangle Triahgle associated with the plate id

References _FILEINFO_, Isis::NaifStatus::CheckErrors(), isPlateIdValid(), isValid(), plate(), and Isis::IException::Programmer.

Referenced by intercept(), and plate().

◆ plateIdOfIntercept()

SpiceInt Isis::NaifDskPlateModel::plateIdOfIntercept ( const NaifVertex & vertex,
const NaifVector & raydir,
NaifVertex & xpoint ) const

Primary API to determine ray intercept from observer/look direction.

This method determines an intercept point given an observer position and a look direction vector. It uses the NAIF DSK API to determine the ray intercept point given the position and look direction from the observer.

History
2013-12-05 Kris Becker Original Version
Parameters
vertexPosition in body fixed coordinates of observer
raydirLook direction vector to use as intercept ray
xpointOutput of point of intercept in body fixed coordinates if an intercept point is found
Returns
SpiceInt Returns the plate ID of the intercept point

References _FILEINFO_, Isis::NaifStatus::CheckErrors(), isValid(), Isis::IException::Programmer, and Isis::validate().

Referenced by intercept().

◆ point()

SurfacePoint * Isis::NaifDskPlateModel::point ( const Latitude & lat,
const Longitude & lon ) const

Get surface intersection for a lat/lon grid point.

This method will return a surface point intercept given a lat/lon coordinate. Primary use of this method is to determine radius values at the grid point.

Essentially a fixed body ray is created from the lat/lon location that extends beyond the highest radius of the body as defined by the plate model. The endpoint of this ray serves as the observer position. A look direction vector is created from the observer point by reversing the direction of the vector from the center of the body to the observer point. Theoretically, this routine should not fail based upon this technique.

History
2013-12-05 Kris Becker Original Version
Parameters
latLatitide of the grid coordinate point
lonLongitude of the grid coordinate point
Returns
SurfacePoint* Returns a pointer to a valid intercept point

References _FILEINFO_, Isis::NaifStatus::CheckErrors(), isPlateIdValid(), isValid(), Isis::IException::Programmer, and Isis::Angle::Radians.

Referenced by Isis::NaifDskShape::localRadius().

◆ size()

int Isis::NaifDskPlateModel::size ( ) const

Returns the number of plates in the DSK file - mostly for conformity.

References numberPlates().


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