casa
$Rev:20696$
|
Class to represent a single coordinate (value + unit). More...
#include <DS9FileReader.h>
Public Member Functions | |
DS9Coordinate (DS9::CoordinateSystem s, DS9::CoordinateUnit u=DS9::UNSET) | |
Constructor which takes a system and a unit. | |
~DS9Coordinate () | |
Destructor. | |
void | set (DS9::CoordinateSystem system) |
Sets the coordinate system to the given. | |
void | set (DS9::CoordinateUnit unit) |
Sets the coordinate unit to the given. | |
void | set (double value) |
Sets the single value to the given. | |
void | set (double val1, double val2, double val3, bool minusZero=false) |
Sets the HMS/DMS value to the given. | |
DS9::CoordinateSystem | system () const |
Returns the coordinate system. | |
DS9::CoordinateUnit | unit () const |
Returns the unit. | |
double | value () const |
Returns the first value. | |
vector< double > | values () const |
Returns the value(s). | |
unsigned int | size () const |
Returns 1 for normal coordinates or 3 for HMS/DMS. | |
bool | isValid () const |
Returns true if this coordinate is valid, false otherwise. | |
String | toPrintString () const |
Returns a String version for use with DS9Region::toPrintString. | |
double | toDegrees () const |
Returns the value in degrees. | |
Private Attributes | |
DS9::CoordinateSystem | m_system |
DS9::CoordinateUnit | m_unit |
vector< double > | m_values |
bool | m_minusZero |
Class to represent a single coordinate (value + unit).
Definition at line 259 of file DS9FileReader.h.
Constructor which takes a system and a unit.
Destructor.
bool casa::DS9Coordinate::isValid | ( | ) | const |
Returns true if this coordinate is valid, false otherwise.
If the coordinate is invalid (such as an unset unit), the method will attempt to fix it.
void casa::DS9Coordinate::set | ( | DS9::CoordinateSystem | system | ) |
Sets the coordinate system to the given.
void casa::DS9Coordinate::set | ( | DS9::CoordinateUnit | unit | ) |
Sets the coordinate unit to the given.
void casa::DS9Coordinate::set | ( | double | value | ) |
Sets the single value to the given.
void casa::DS9Coordinate::set | ( | double | val1, |
double | val2, | ||
double | val3, | ||
bool | minusZero = false |
||
) |
Sets the HMS/DMS value to the given.
minusZero is used when the first value is zero, but the whole value is negative.
unsigned int casa::DS9Coordinate::size | ( | ) | const |
Returns 1 for normal coordinates or 3 for HMS/DMS.
Returns the coordinate system.
double casa::DS9Coordinate::toDegrees | ( | ) | const |
Returns the value in degrees.
String casa::DS9Coordinate::toPrintString | ( | ) | const |
Returns a String version for use with DS9Region::toPrintString.
DS9::CoordinateUnit casa::DS9Coordinate::unit | ( | ) | const |
Returns the unit.
double casa::DS9Coordinate::value | ( | ) | const |
Returns the first value.
No conversion is used.
vector<double> casa::DS9Coordinate::values | ( | ) | const |
Returns the value(s).
Size will be 1 for normal coordinates, 3 for HMS/DMS. No conversion is used.
bool casa::DS9Coordinate::m_minusZero [private] |
Definition at line 312 of file DS9FileReader.h.
Definition at line 309 of file DS9FileReader.h.
Definition at line 310 of file DS9FileReader.h.
vector<double> casa::DS9Coordinate::m_values [private] |
Definition at line 311 of file DS9FileReader.h.