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.
Definition at line 34 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 36 of file TriangularPlate.cpp.
|
virtual |
Returns the area of the plate in km.
Implements Isis::AbstractPlate.
Definition at line 85 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 333 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 57 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 357 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 176 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 198 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 280 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 64 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 70 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 46 of file TriangularPlate.cpp.
|
virtual |
Compute the surface normal of the plate.
Implements Isis::AbstractPlate.
Definition at line 115 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 237 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 153 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 306 of file TriangularPlate.cpp.
References 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 67 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 69 of file TriangularPlate.h.
Referenced by clone().