|
osgEarth 2.1.1
|
Collaboration diagram for osgEarth::Units:Public Types | |
| enum | Type { TYPE_LINEAR, TYPE_ANGULAR, TYPE_TEMPORAL, TYPE_SPEED, TYPE_INVALID } |
Public Member Functions | |
| bool | canConvert (const Units &to) const |
| bool | convertTo (const Units &to, double input, double &output) const |
| double | convertTo (const Units &to, double input) const |
| const std::string & | getName () const |
| const std::string & | getAbbr () const |
| const Type & | getType () const |
| bool | operator== (const Units &rhs) const |
| bool | operator!= (const Units &rhs) const |
| bool | isLinear () const |
| bool | isAngular () const |
| bool | isTemporal () const |
| bool | isSpeed () const |
| Units (const std::string &name, const std::string &abbr, const Type &type, double toBase) | |
| Units (const std::string &name, const std::string &abbr, const Units &distance, const Units &time) | |
| Units () | |
Static Public Member Functions | |
| static bool | convert (const Units &from, const Units &to, double input, double &output) |
| static double | convert (const Units &from, const Units &to, double input) |
| static bool | canConvert (const Units &from, const Units &to) |
Static Public Attributes | |
| static const Units | CENTIMETERS |
| static const Units | DATA_MILES |
| static const Units | FATHOMS |
| static const Units | FEET |
| static const Units | FEET_US_SURVEY |
| static const Units | INCHES |
| static const Units | KILOFEET |
| static const Units | KILOMETERS |
| static const Units | KILOYARDS |
| static const Units | METERS |
| static const Units | MILES |
| static const Units | MILLIMETERS |
| static const Units | NAUTICAL_MILES |
| static const Units | YARDS |
| static const Units | BAM |
| static const Units | DEGREES |
| static const Units | NATO_MILS |
| static const Units | RADIANS |
| static const Units | DAYS |
| static const Units | HOURS |
| static const Units | MICROSECONDS |
| static const Units | MILLISECONDS |
| static const Units | MINUTES |
| static const Units | SECONDS |
| static const Units | WEEKS |
| static const Units | FEET_PER_SECOND |
| static const Units | YARDS_PER_SECOND |
| static const Units | METERS_PER_SECOND |
| static const Units | KILOMETERS_PER_SECOND |
| static const Units | KILOMETERS_PER_HOUR |
| static const Units | MILES_PER_HOUR |
| static const Units | DATA_MILES_PER_HOUR |
| static const Units | KNOTS |
Static Private Member Functions | |
| static void | convertSimple (const Units &from, const Units &to, double input, double &output) |
| static void | convertSpeed (const Units &from, const Units &to, double input, double &output) |
Private Attributes | |
| std::string | _name |
| std::string | _abbr |
| Type | _type |
| double | _toBase |
| const Units * | _distance |
| const Units * | _time |
| Units::Units | ( | const std::string & | name, |
| const std::string & | abbr, | ||
| const Type & | type, | ||
| double | toBase | ||
| ) |
| osgEarth::Units::Units | ( | ) | [inline] |
Definition at line 135 of file Units.
: _type(TYPE_INVALID) { }
| bool osgEarth::Units::canConvert | ( | const Units & | to | ) | const [inline] |
| static bool osgEarth::Units::convert | ( | const Units & | from, |
| const Units & | to, | ||
| double | input, | ||
| double & | output | ||
| ) | [inline, static] |
Definition at line 74 of file Units.
{
if ( canConvert(from, to) ) {
if ( from._type == TYPE_LINEAR || from._type == TYPE_ANGULAR || from._type == TYPE_TEMPORAL )
convertSimple( from, to, input, output );
else if ( from._type == TYPE_SPEED )
convertSpeed( from, to, input, output );
return true;
}
return false;
}
Here is the caller graph for this function:| bool osgEarth::Units::convertTo | ( | const Units & | to, |
| double | input, | ||
| double & | output | ||
| ) | const [inline] |
| double osgEarth::Units::convertTo | ( | const Units & | to, |
| double | input | ||
| ) | const [inline] |
| const std::string& osgEarth::Units::getAbbr | ( | ) | const [inline] |
| const std::string& osgEarth::Units::getName | ( | ) | const [inline] |
| const Type& osgEarth::Units::getType | ( | ) | const [inline] |
| bool osgEarth::Units::isAngular | ( | ) | const [inline] |
Definition at line 121 of file Units.
{ return _type == TYPE_ANGULAR; }
| bool osgEarth::Units::isLinear | ( | ) | const [inline] |
Definition at line 119 of file Units.
{ return _type == TYPE_LINEAR; }
| bool osgEarth::Units::isSpeed | ( | ) | const [inline] |
Definition at line 125 of file Units.
{ return _type == TYPE_SPEED; }
| bool osgEarth::Units::isTemporal | ( | ) | const [inline] |
Definition at line 123 of file Units.
{ return _type == TYPE_TEMPORAL; }
| bool osgEarth::Units::operator!= | ( | const Units & | rhs | ) | const [inline] |
| bool osgEarth::Units::operator== | ( | const Units & | rhs | ) | const [inline] |
std::string osgEarth::Units::_abbr [private] |
const Units* osgEarth::Units::_distance [private] |
std::string osgEarth::Units::_name [private] |
const Units* osgEarth::Units::_time [private] |
double osgEarth::Units::_toBase [private] |
Type osgEarth::Units::_type [private] |
const Units Units::BAM [static] |
const Units Units::CENTIMETERS [static] |
const Units Units::DATA_MILES [static] |
const Units Units::DATA_MILES_PER_HOUR [static] |
const Units Units::DAYS [static] |
const Units Units::DEGREES [static] |
const Units Units::FATHOMS [static] |
const Units Units::FEET [static] |
const Units Units::FEET_PER_SECOND [static] |
const Units Units::FEET_US_SURVEY [static] |
const Units Units::HOURS [static] |
const Units Units::INCHES [static] |
const Units Units::KILOFEET [static] |
const Units Units::KILOMETERS [static] |
const Units Units::KILOMETERS_PER_HOUR [static] |
const Units Units::KILOMETERS_PER_SECOND [static] |
const Units Units::KILOYARDS [static] |
const Units Units::KNOTS [static] |
const Units Units::METERS [static] |
const Units Units::METERS_PER_SECOND [static] |
const Units Units::MICROSECONDS [static] |
const Units Units::MILES [static] |
const Units Units::MILES_PER_HOUR [static] |
const Units Units::MILLIMETERS [static] |
const Units Units::MILLISECONDS [static] |
const Units Units::MINUTES [static] |
const Units Units::NATO_MILS [static] |
const Units Units::NAUTICAL_MILES [static] |
const Units Units::RADIANS [static] |
const Units Units::SECONDS [static] |
const Units Units::WEEKS [static] |
const Units Units::YARDS [static] |
const Units Units::YARDS_PER_SECOND [static] |
1.7.3