Isis 3 Programmer Reference
|
Specification for an abstract triangular plate. More...
#include <TriangularPlate.h>
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... | |
SurfacePoint * | point (const Latitude &lat, const Longitude &lon) const |
Determine the intercept point of a lat/lon location for the plate. More... | |
Intercept * | intercept (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... | |
AbstractPlate * | clone () 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... | |
Intercept * | construct (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... | |
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.
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.
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.
|
virtual |
Returns the area of the plate in km.
Implements Isis::AbstractPlate.
Definition at line 102 of file TriangularPlate.cpp.
References m_plate.
|
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).
Implements Isis::AbstractPlate.
Definition at line 350 of file TriangularPlate.cpp.
References m_plate, and m_plateId.
Referenced by intercept().
|
protectedinherited |
Construct an intercept from a clone of this plate as well as the given vertex, direction vector, and surface point.
vertex | Observer position |
raydir | Look direction |
ipoint | Surface point of the intercept location on the body |
Definition at line 75 of file AbstractPlate.cpp.
References Isis::AbstractPlate::clone().
|
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.
obs | An observer point in space |
raydir | A look direction eminating from the observer point |
point | If 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. |
Definition at line 374 of file TriangularPlate.cpp.
References m_plate, and point().
Referenced by hasIntercept(), hasPoint(), intercept(), and point().
|
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.
vertex | An observer point in space in body fixed coordinates |
raydir | A look direction vector |
Implements Isis::AbstractPlate.
Definition at line 193 of file TriangularPlate.cpp.
References findPlateIntercept(), point(), and vertex().
Determines the give lat/lon point intercept the triangular plate.
Given a latitude/longitude point, this method determines if it intercepts the plate.
lat | The latitude of the given grid point |
lon | Longitude of the given point |
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().
|
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.
vertex | Specifies a point in space of a body fixed coordinate |
raydir | Specifies a look direction from the vertex in body fixed coordinates. It can be of any magnitude. |
Implements Isis::AbstractPlate.
Definition at line 297 of file TriangularPlate.cpp.
References clone(), findPlateIntercept(), Isis::SurfacePoint::FromNaifArray(), point(), and vertex().
|
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.
Implements Isis::AbstractPlate.
Definition at line 81 of file TriangularPlate.cpp.
References Isis::Distance::Kilometers, and m_plate.
Referenced by hasPoint(), and point().
|
virtual |
Gets the minimum radius.
This is a pure virtual function.
Implements Isis::AbstractPlate.
Definition at line 87 of file TriangularPlate.cpp.
References Isis::Distance::Kilometers, and m_plate.
|
virtual |
Gets the name of this Plate type.
Implements Isis::AbstractPlate.
Definition at line 63 of file TriangularPlate.cpp.
|
virtual |
Compute the surface normal of the plate.
Implements Isis::AbstractPlate.
Definition at line 132 of file TriangularPlate.cpp.
References m_plate.
Referenced by separationAngle().
|
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.
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().
|
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.
raydir | Given a direction vector, compute the angle of separation between it and the plate normal vector |
Implements Isis::AbstractPlate.
Definition at line 170 of file TriangularPlate.cpp.
References normal(), and Isis::Angle::Radians.
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.
v | Specifies the point to return. Valid values of v is 0 to 2. |
Definition at line 323 of file TriangularPlate.cpp.
References _FILEINFO_, m_plate, Isis::IException::Programmer, and Isis::toString().
Referenced by hasIntercept(), and intercept().
|
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().
|
private |
ID for this plate on the ShapeModel.
Definition at line 85 of file TriangularPlate.h.
Referenced by clone().