Isis 3 Programmer Reference
|
A named feature's position in a cube. More...
Public Member Functions | |
FeaturePosition () | |
Instiantiates a feature position with no data. More... | |
FeaturePosition (MdiCubeViewport *, FeatureNomenclature::Feature, VectorType vectorType) | |
Instiantiates a feature position. More... | |
FeaturePosition (const FeaturePosition &other) | |
Copies a feature position. More... | |
~FeaturePosition () | |
Cleans up allocated memory. More... | |
bool | isValid () const |
Test if sample/line coordinates could be found for this feature. More... | |
QPair< double, double > | center () const |
Get the center sample/line position of the feature. More... | |
QList< QPair< double, double > > | edges () const |
Get the edge sample/line positions of the feature. More... | |
FeatureNomenclature::Feature & | feature () |
Get the feature associated with this feature position. More... | |
const FeatureNomenclature::Feature & | feature () const |
Get the feature associated with this feature position. More... | |
void | applyExtentType (VectorType vectorType) |
Applies the type of extents to the feature. More... | |
void | swap (FeaturePosition &other) |
Trade member data with other. More... | |
FeaturePosition & | operator= (const FeaturePosition &rhs) |
Assign rhs to this. More... | |
Private Attributes | |
double | m_centerLine |
The cube line position of the feature center, Null if !isValid() More... | |
double | m_centerSample |
The cube sample position of the feature center, Null if !isValid() More... | |
UniversalGroundMap * | m_gmap |
The map used to determine the sample, line pair from a lat, lon pair. More... | |
QList< QPair< double, double > > * | m_featureEdgeLineSamples |
The pair is cube sample, line (first and second) respectively. More... | |
FeatureNomenclature::Feature | m_feature |
The feature for which we're encapsulating a viewport position. More... | |
A named feature's position in a cube.
This class encapsulates the sample,line position and extents of a named feature given an image (in this case, a viewport, because that holds the universal ground map).
Definition at line 188 of file FeatureNomenclatureTool.h.
Isis::FeatureNomenclatureTool::FeaturePosition::FeaturePosition | ( | ) |
Instiantiates a feature position with no data.
Definition at line 1028 of file FeatureNomenclatureTool.cpp.
References m_centerLine, m_centerSample, m_featureEdgeLineSamples, m_gmap, and Isis::Null.
Isis::FeatureNomenclatureTool::FeaturePosition::FeaturePosition | ( | MdiCubeViewport * | vp, |
FeatureNomenclature::Feature | feature, | ||
VectorType | vectorType | ||
) |
Instiantiates a feature position.
This will calculate the line/sample coordinates of the feature.
vp | The viewport to use for ground information |
feature | The feature with nomenclature database lat/lon values to be translated into cube line/sample coordinates. |
vectorType | The type of extent vector to display |
Definition at line 1047 of file FeatureNomenclatureTool.cpp.
References Isis::Null, Isis::CubeViewport::universalGroundMap(), and Isis::FeatureNomenclatureTool::vectorType().
Isis::FeatureNomenclatureTool::FeaturePosition::FeaturePosition | ( | const FeaturePosition & | other | ) |
Copies a feature position.
other | The feature position to copy |
Definition at line 1077 of file FeatureNomenclatureTool.cpp.
References m_centerLine, m_centerSample, m_feature, m_featureEdgeLineSamples, and m_gmap.
Isis::FeatureNomenclatureTool::FeaturePosition::~FeaturePosition | ( | ) |
Cleans up allocated memory.
Definition at line 1097 of file FeatureNomenclatureTool.cpp.
References Isis::Null.
void Isis::FeatureNomenclatureTool::FeaturePosition::applyExtentType | ( | VectorType | vectorType | ) |
Applies the type of extents to the feature.
4 Arrows - N, S, E, W 8 Arrows - N, NE, NW, E, W, S, SE, SW Box - Corners at: NE, NW, SE, SW
vectorType | The type of extents that will be drawn with the feature |
Definition at line 1158 of file FeatureNomenclatureTool.cpp.
References Isis::FeatureNomenclatureTool::Arrows4, Isis::FeatureNomenclatureTool::Arrows8, Isis::FeatureNomenclatureTool::Box, Isis::Angle::isValid(), and Isis::FeatureNomenclatureTool::vectorType().
QPair< double, double > Isis::FeatureNomenclatureTool::FeaturePosition::center | ( | ) | const |
Get the center sample/line position of the feature.
Definition at line 1122 of file FeatureNomenclatureTool.cpp.
Get the edge sample/line positions of the feature.
Definition at line 1134 of file FeatureNomenclatureTool.cpp.
FeatureNomenclature::Feature & Isis::FeatureNomenclatureTool::FeaturePosition::feature | ( | ) |
Get the feature associated with this feature position.
Definition at line 1145 of file FeatureNomenclatureTool.cpp.
const FeatureNomenclature::Feature & Isis::FeatureNomenclatureTool::FeaturePosition::feature | ( | ) | const |
Get the feature associated with this feature position.
Definition at line 1277 of file FeatureNomenclatureTool.cpp.
bool Isis::FeatureNomenclatureTool::FeaturePosition::isValid | ( | ) | const |
Test if sample/line coordinates could be found for this feature.
Definition at line 1112 of file FeatureNomenclatureTool.cpp.
References Isis::Null.
Referenced by Isis::FeatureNomenclatureTool::ViewportFeatureDisplay::ViewportFeatureDisplay().
FeatureNomenclatureTool::FeaturePosition & Isis::FeatureNomenclatureTool::FeaturePosition::operator= | ( | const FeaturePosition & | rhs | ) |
Assign rhs to this.
We'll be taking on (mirroring) the state of the other feature position.
rhs | The FeaturePosition on the right hand side of the '=' operator |
Definition at line 1263 of file FeatureNomenclatureTool.cpp.
void Isis::FeatureNomenclatureTool::FeaturePosition::swap | ( | FeaturePosition & | other | ) |
Trade member data with other.
This should never throw an exception.
other | The instance to trade state with |
Definition at line 1245 of file FeatureNomenclatureTool.cpp.
References m_centerLine, m_centerSample, m_feature, m_featureEdgeLineSamples, and m_gmap.
|
private |
The cube line position of the feature center, Null if !isValid()
Definition at line 208 of file FeatureNomenclatureTool.h.
Referenced by FeaturePosition(), and swap().
|
private |
The cube sample position of the feature center, Null if !isValid()
Definition at line 210 of file FeatureNomenclatureTool.h.
Referenced by FeaturePosition(), and swap().
|
private |
The feature for which we're encapsulating a viewport position.
Definition at line 221 of file FeatureNomenclatureTool.h.
Referenced by FeaturePosition(), and swap().
|
private |
The pair is cube sample, line (first and second) respectively.
This holds the edge points/extents of the feature.
Definition at line 219 of file FeatureNomenclatureTool.h.
Referenced by FeaturePosition(), and swap().
|
private |
The map used to determine the sample, line pair from a lat, lon pair.
Definition at line 213 of file FeatureNomenclatureTool.h.
Referenced by FeaturePosition(), and swap().