#include "pandatoolbase.h"Go to the source code of this file.
Enumerations | |
| enum | DistanceUnit { DU_millimeters, DU_centimeters, DU_meters, DU_kilometers, DU_yards, DU_feet, DU_inches, DU_nautical_miles, DU_statute_miles, DU_invalid } |
| This enumerated type lists all the kinds of units we're likely to come across in model conversion programs. More... | |
Functions | |
| string | format_abbrev_unit (DistanceUnit unit) |
| Returns the string representing the common abbreviation for the given unit. | |
| string | format_long_unit (DistanceUnit unit) |
| Returns the string representing the full name (plural) for the given unit. | |
| ostream & | operator<< (ostream &out, DistanceUnit unit) |
| DistanceUnit | string_distance_unit (const string &str) |
| Converts from a string, as might be input by the user, to one of the known DistanceUnit types. | |
| double | convert_units (DistanceUnit from, DistanceUnit to) |
| Returns the scaling factor that must be applied to convert from units of "from" to "to". | |
Definition in file distanceUnit.h.
|
|
This enumerated type lists all the kinds of units we're likely to come across in model conversion programs.
Definition at line 38 of file distanceUnit.h. Referenced by FltHeader::get_auto_attr_update(). |
|
||||||||||||
|
Returns the scaling factor that must be applied to convert from units of "from" to "to".
Definition at line 236 of file distanceUnit.cxx. |
|
|
Returns the string representing the common abbreviation for the given unit.
Definition at line 37 of file distanceUnit.cxx. References DU_feet, DU_inches, DU_invalid, DU_kilometers, DU_meters, DU_nautical_miles, DU_statute_miles, and DU_yards. |
|
|
Returns the string representing the full name (plural) for the given unit.
Definition at line 83 of file distanceUnit.cxx. References DU_feet, DU_inches, DU_invalid, DU_kilometers, DU_nautical_miles, DU_statute_miles, and DU_yards. |
|
||||||||||||
|
Definition at line 126 of file distanceUnit.cxx. References DU_millimeters. |
|
|
Converts from a string, as might be input by the user, to one of the known DistanceUnit types. Returns DU_invalid if the string is unknown. Definition at line 142 of file distanceUnit.cxx. |
1.3