Isis 3 Programmer Reference
Isis::TriangularPlate Class Reference

Specification for an abstract triangular plate. More...

#include <TriangularPlate.h>

Inheritance diagram for Isis::TriangularPlate:
Inheritance graph
Collaboration diagram for Isis::TriangularPlate:
Collaboration graph

Public Member Functions

 TriangularPlate (const NaifTriangle &plate, const int &plateId=0)
 Basic zero plate constructor. More...
 
int id () const
 
QString name () const
 Gets the name of this Plate type. More...
 
Distance minRadius () const
 Gets the minimum radius. More...
 
Distance maxRadius () const
 Determines the maximum radius from all the vertices of the plate. More...
 
double area () const
 Returns the area of the plate in km. More...
 
NaifVector normal () const
 Compute the surface normal of the plate. More...
 
NaifVector center () const
 
Angle separationAngle (const NaifVector &raydir) const
 Computes the separation angle from the plate normal of a given vector. More...
 
bool hasIntercept (const NaifVertex &vertex, const NaifVector &raydir) const
 Determines if a look direction from a point intercepts the plate. More...
 
bool hasPoint (const Latitude &lat, const Longitude &lon) const
 Determines the give lat/lon point intercept the triangular plate. More...
 
SurfacePointpoint (const Latitude &lat, const Longitude &lon) const
 Determine the intercept point of a lat/lon location for the plate. More...
 
Interceptintercept (const NaifVertex &vertex, const NaifVector &raydir) const
 Conpute the intercept point on a triangular plate. More...
 
NaifVertex vertex (int v) const
 Returns the vth point of the triangle. More...
 
AbstractPlateclone () const
 Retrns a clone of the current plate. More...
 

Protected Member Functions

bool findPlateIntercept (const NaifVertex &obs, const NaifVector &raydir, NaifVertex &point) const
 Determines of if given a vertex and look direction intercepts the plate. More...
 
Interceptconstruct (const NaifVertex &vertex, const NaifVector &raydir, SurfacePoint *ipoint) const
 Construct an intercept from a clone of this plate as well as the given vertex, direction vector, and surface point. More...
 

Private Attributes

NaifTriangle m_plate
 Tetrahedron, defined by the coordinate system origin and 3 vertices, used to represent the TriangularPlate. More...
 
int m_plateId
 ID for this plate on the ShapeModel. More...
 

Detailed Description

Specification for an abstract triangular plate.

This class implements the abstract concept of a triangular plate. It provides the basic elements of the plate to compute intersections and property values.

Author
2013-12-05 Kris Becker
History:

2013-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 50 of file TriangularPlate.h.

Constructor & Destructor Documentation

◆ TriangularPlate()

Isis::TriangularPlate::TriangularPlate ( const NaifTriangle plate,
const int &  plateId = 0 
)

Basic zero plate constructor.

Constructor creates a unique copy of an existing plate

Definition at line 53 of file TriangularPlate.cpp.

Member Function Documentation

◆ area()

double Isis::TriangularPlate::area ( ) const
virtual

Returns the area of the plate in km.

Returns
double Area of plate in km
Author
2014-02-05 Kris Becker
History:
2014-02-05 Kris Becker Original Version

Implements Isis::AbstractPlate.

Definition at line 102 of file TriangularPlate.cpp.

References m_plate.

◆ clone()

AbstractPlate * Isis::TriangularPlate::clone ( ) const
virtual

Retrns a clone of the current plate.

Provides replication of the current triangular plate. Note this implementation returns a shared copy of the triangular plate as long as the plate type is shared by copy (TNT library is).

Returns
AbstractPlate* Returns a copy of the plate
Author
2013-12-05 Kris Becker
History:
2013-12-05 Kris Becker Original Version

Implements Isis::AbstractPlate.

Definition at line 350 of file TriangularPlate.cpp.

References m_plate, and m_plateId.

Referenced by intercept().

◆ construct()

Intercept * Isis::AbstractPlate::construct ( const NaifVertex vertex,
const NaifVector raydir,
SurfacePoint ipoint 
) const
protectedinherited

Construct an intercept from a clone of this plate as well as the given vertex, direction vector, and surface point.

Parameters
vertexObserver position
raydirLook direction
ipointSurface point of the intercept location on the body
Returns
Intercept * A pointer to an intercept constructed with the vertex, raydir, ipoint and clone of this AbstractPlate.

Definition at line 75 of file AbstractPlate.cpp.

References Isis::AbstractPlate::clone().

◆ findPlateIntercept()

bool Isis::TriangularPlate::findPlateIntercept ( const NaifVertex obs,
const NaifVector raydir,
NaifVertex point 
) const
protected

Determines of if given a vertex and look direction intercepts the plate.

If from the location in space as specifed by obs and a look direction intercepts the current plate, the intercept point is returned.

Parameters
obsAn observer point in space
raydirA look direction eminating from the observer point
pointIf the observer/look direction intercepts the plate, the intercept point is computed an returned in this parameter. If the intercept point is not determined, this point is unchanged.
Returns
bool Returns true in an intercept point is found, otherwise it returned.
Author
2013-12-05 Kris Becker
History:
2013-12-05 Kris Becker Original Version

Definition at line 374 of file TriangularPlate.cpp.

References m_plate, and point().

Referenced by hasIntercept(), hasPoint(), intercept(), and point().

◆ hasIntercept()

bool Isis::TriangularPlate::hasIntercept ( const NaifVertex vertex,
const NaifVector raydir 
) const
virtual

Determines if a look direction from a point intercepts the plate.

Given a point in space in body fixed coordinates and a look direction, this method determines the point of intercept on the plate.

Parameters
vertexAn observer point in space in body fixed coordinates
raydirA look direction vector
Returns
bool Returns true if the look direction from the observer intercepts the plate, otherwise returns false
Author
2013-12-05 Kris Becker
History:
2013-12-05 Kris Becker Original Version

Implements Isis::AbstractPlate.

Definition at line 193 of file TriangularPlate.cpp.

References findPlateIntercept(), point(), and vertex().

◆ hasPoint()

bool Isis::TriangularPlate::hasPoint ( const Latitude lat,
const Longitude lon 
) const
virtual

Determines the give lat/lon point intercept the triangular plate.

Given a latitude/longitude point, this method determines if it intercepts the plate.

Parameters
latThe latitude of the given grid point
lonLongitude of the given point
Returns
bool Returns true if the lat/lon point intercepts the plate, false otherwise
Author
2013-12-05 Kris Becker
History:
2013-12-05 Kris Becker Original Version

Implements Isis::AbstractPlate.

Definition at line 215 of file TriangularPlate.cpp.

References findPlateIntercept(), Isis::Distance::Kilometers, Isis::Distance::kilometers(), maxRadius(), point(), and Isis::SurfacePoint::ToNaifArray().

◆ intercept()

Intercept * Isis::TriangularPlate::intercept ( const NaifVertex vertex,
const NaifVector raydir 
) const
virtual

Conpute the intercept point on a triangular plate.

Given a point in space and a look direction, compute the intercept point on a triangular plate. If the intercept point does not exist, return a null pointer.

Parameters
vertexSpecifies a point in space of a body fixed coordinate
raydirSpecifies a look direction from the vertex in body fixed coordinates. It can be of any magnitude.
Returns
Intercept* Returns the intercept point if it exists on the triangular plate, otherwise returns a null pointer.
Author
2013-12-05 Kris Becker
History:
2013-12-05 Kris Becker Original Version

Implements Isis::AbstractPlate.

Definition at line 297 of file TriangularPlate.cpp.

References clone(), findPlateIntercept(), Isis::SurfacePoint::FromNaifArray(), point(), and vertex().

◆ maxRadius()

Distance Isis::TriangularPlate::maxRadius ( ) const
virtual

Determines the maximum radius from all the vertices of the plate.

This method returns the maximum radius (or magnitude) of the vectors of the plate. This routine is typically use to determine the maximum height of a plate so that a sufficient body fixed radius can be used to determine grid intercept points.

Returns
Distance Returns the maximum magnitude of the vertex vectors
Author
2013-12-05 Kris Becker
History:
2013-12-05 Kris Becker Original Version

Implements Isis::AbstractPlate.

Definition at line 81 of file TriangularPlate.cpp.

References Isis::Distance::Kilometers, and m_plate.

Referenced by hasPoint(), and point().

◆ minRadius()

Distance Isis::TriangularPlate::minRadius ( ) const
virtual

Gets the minimum radius.

This is a pure virtual function.

Returns
Distance The minimum radius

Implements Isis::AbstractPlate.

Definition at line 87 of file TriangularPlate.cpp.

References Isis::Distance::Kilometers, and m_plate.

◆ name()

QString Isis::TriangularPlate::name ( ) const
virtual

Gets the name of this Plate type.

Returns
QString AbstractPlate
QString The name of this plate, "AbstractPlate"

Implements Isis::AbstractPlate.

Definition at line 63 of file TriangularPlate.cpp.

◆ normal()

NaifVector Isis::TriangularPlate::normal ( ) const
virtual

Compute the surface normal of the plate.

Returns
NaifVector Returns the surface normal of the plate
Author
2013-12-05 Kris Becker
History:
2013-12-05 Kris Becker Original Version

Implements Isis::AbstractPlate.

Definition at line 132 of file TriangularPlate.cpp.

References m_plate.

Referenced by separationAngle().

◆ point()

SurfacePoint * Isis::TriangularPlate::point ( const Latitude lat,
const Longitude lon 
) const
virtual

Determine the intercept point of a lat/lon location for the plate.

Determines if a lat/lon point intercepts a plate. Given a latitude and longitude coordinate, this method converts the point to a body fixed X/Y/Z value and computes intercept point within the boundaries if the plate. If no intercept is found, a null pointer is returned.

Parameters
latLatitude of the point
lonLongitude of the point
Returns
SurfacePoint* Pointer to the intersection of the point on the triangle. If an intersection does not exist a null pointer is returned.
Author
2013-12-05 Kris Becker
History:
2013-12-05 Kris Becker Original Version

Implements Isis::AbstractPlate.

Definition at line 254 of file TriangularPlate.cpp.

References findPlateIntercept(), Isis::SurfacePoint::FromNaifArray(), Isis::Distance::Kilometers, Isis::Distance::kilometers(), maxRadius(), and Isis::SurfacePoint::ToNaifArray().

Referenced by findPlateIntercept(), hasIntercept(), hasPoint(), and intercept().

◆ separationAngle()

Angle Isis::TriangularPlate::separationAngle ( const NaifVector raydir) const
virtual

Computes the separation angle from the plate normal of a given vector.

This method will compute the separation angle between the plate normal and the given direction vector. This can be use for determining the incidence and/or emission angle from an observer point given its look direction.

Parameters
raydirGiven a direction vector, compute the angle of separation between it and the plate normal vector
Returns
Returns the angle of separation
Author
2013-12-05 Kris Becker
History:
2013-12-05 Kris Becker Original Version

Implements Isis::AbstractPlate.

Definition at line 170 of file TriangularPlate.cpp.

References normal(), and Isis::Angle::Radians.

◆ vertex()

NaifVertex Isis::TriangularPlate::vertex ( int  v) const

Returns the vth point of the triangle.

Returns the X/Y/Z body fixed coordinate of the plate.

Parameters
vSpecifies the point to return. Valid values of v is 0 to 2.
Returns
NaifVertex Returns the X/Y/Z body fixed coordinate of the requested vertex in the plate
Author
2013-12-05 Kris Becker
History:
2013-12-05 Kris Becker Original Version

Definition at line 323 of file TriangularPlate.cpp.

References _FILEINFO_, m_plate, Isis::IException::Programmer, and Isis::toString().

Referenced by hasIntercept(), and intercept().

Member Data Documentation

◆ m_plate

NaifTriangle Isis::TriangularPlate::m_plate
private

Tetrahedron, defined by the coordinate system origin and 3 vertices, used to represent the TriangularPlate.

Definition at line 83 of file TriangularPlate.h.

Referenced by area(), clone(), findPlateIntercept(), maxRadius(), minRadius(), normal(), and vertex().

◆ m_plateId

int Isis::TriangularPlate::m_plateId
private

ID for this plate on the ShapeModel.

Definition at line 85 of file TriangularPlate.h.

Referenced by clone().


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