![]() |
VR-Forces 5.0.3 Developer's Guide
|
Repository for all unit converters. Provides utility functions for converting value units without having to retrieve the appropriate unit converter(s) manually.
Protected Types | |
| typedef boost::unordered_map < unsigned int, const DtUnitConverter * > | UnitConverterMap |
| typedef boost::unordered_map < unsigned int, UnitConverterMap > | UnitConverterTypeMap |
Protected Member Functions | |
| void | addDefaultConverters () |
Methods for getting the conversion factor for different units. | |
| double | distanceConversionFactor (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits units) const |
| double | velocityConversionFactor (makArchives::DtDisplayUnitsSettingsRecord::VelocityUnits units) const |
| double | accelerationConversionFactor (makArchives::DtDisplayUnitsSettingsRecord::AccelerationUnits units) const |
| double | angleConversionFactor (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits units) const |
| double | rotationalVelocityConversionFactor (makArchives::DtDisplayUnitsSettingsRecord::RotVelocityUnits units) const |
| double | pressureConversionFactor (makArchives::DtDisplayUnitsSettingsRecord::PressureUnits units) const |
Protected Attributes | |
| UnitConverterTypeMap | myConverters |
Private Member Functions | |
| DtUnitConverterCollection & | operator= (const DtUnitConverterCollection &) |
|
protected |
|
protected |
| makVrv::DtUnitConverterCollection::DtUnitConverterCollection | ( | ) |
CTOR.
| makVrv::DtUnitConverterCollection::DtUnitConverterCollection | ( | const DtUnitConverterCollection & | ) |
Copy CTOR.
| makVrv::DtUnitConverterCollection::~DtUnitConverterCollection | ( | ) |
DTOR.
| double makVrv::DtUnitConverterCollection::convertDistance | ( | makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits | distUnits, |
| double | distance | ||
| ) | const |
Converts the distance to the given units from meters.
| double makVrv::DtUnitConverterCollection::convertSpeed | ( | makArchives::DtDisplayUnitsSettingsRecord::VelocityUnits | speedUnits, |
| double | speed | ||
| ) | const |
Converts the speed to the given units from m/s.
| DtVector makVrv::DtUnitConverterCollection::convertVelocity | ( | makArchives::DtDisplayUnitsSettingsRecord::VelocityUnits | velUnits, |
| const DtVector & | velocity | ||
| ) | const |
Converts the speed to the given units from m/s.
| double makVrv::DtUnitConverterCollection::convertAcceleration | ( | makArchives::DtDisplayUnitsSettingsRecord::AccelerationUnits | accelUnits, |
| double | accel | ||
| ) | const |
Converts the acceleration to the given units from m/s^2.
| DtVector makVrv::DtUnitConverterCollection::convertAcceleration | ( | makArchives::DtDisplayUnitsSettingsRecord::AccelerationUnits | accelUnits, |
| const DtVector & | accel | ||
| ) | const |
Converts the acceleration to the given units from m/s^2.
| DtTaitBryan makVrv::DtUnitConverterCollection::convertOrientation | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | oriUnits, |
| const DtTaitBryan & | orientation | ||
| ) | const |
Converts the orientation to the given units from radians.
| double makVrv::DtUnitConverterCollection::convertAngle | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | oriUnits, |
| double | angle | ||
| ) | const |
Converts the angle to the given units from radians.
| DtVector makVrv::DtUnitConverterCollection::convertRotationalVelocity | ( | makArchives::DtDisplayUnitsSettingsRecord::RotVelocityUnits | wUnits, |
| const DtVector & | rotVel | ||
| ) | const |
Converts the rotational velocity to the given units from rad/s.
| double makVrv::DtUnitConverterCollection::convertTemperature | ( | makArchives::DtDisplayUnitsSettingsRecord::TemperatureUnits | tempUnits, |
| double | temperature | ||
| ) | const |
Converts the temperature to the given units from Kelvins.
| double makVrv::DtUnitConverterCollection::convertPressure | ( | makArchives::DtDisplayUnitsSettingsRecord::PressureUnits | pressureUnits, |
| double | pressure | ||
| ) | const |
Converts the pressure to the given units from Pascals.
| double makVrv::DtUnitConverterCollection::revertDistance | ( | makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits | distUnits, |
| double | distance | ||
| ) | const |
Converts the distance from the given units to meters.
| double makVrv::DtUnitConverterCollection::revertSpeed | ( | makArchives::DtDisplayUnitsSettingsRecord::VelocityUnits | velUnits, |
| double | speed | ||
| ) | const |
Converts the speed to the given units from m/s.
| DtVector makVrv::DtUnitConverterCollection::revertVelocity | ( | makArchives::DtDisplayUnitsSettingsRecord::VelocityUnits | velUnits, |
| const DtVector & | velocity | ||
| ) | const |
Converts the speed to the given units from m/s.
| DtVector makVrv::DtUnitConverterCollection::revertAcceleration | ( | makArchives::DtDisplayUnitsSettingsRecord::AccelerationUnits | accelUnits, |
| const DtVector & | accel | ||
| ) | const |
Converts the acceleration from the given units to m/s^2.
| double makVrv::DtUnitConverterCollection::revertAcceleration | ( | makArchives::DtDisplayUnitsSettingsRecord::AccelerationUnits | accelUnits, |
| double | accel | ||
| ) | const |
Converts the acceleration from the given units to m/s^2.
| DtTaitBryan makVrv::DtUnitConverterCollection::revertOrientation | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | oriUnits, |
| const DtTaitBryan & | ori | ||
| ) | const |
Converts the orientation from the given units to radians.
| double makVrv::DtUnitConverterCollection::revertAngle | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | oriUnits, |
| double | angle | ||
| ) | const |
Converts the angle from the given units to radians.
| DtVector makVrv::DtUnitConverterCollection::revertRotationalVelocity | ( | makArchives::DtDisplayUnitsSettingsRecord::RotVelocityUnits | wUnits, |
| const DtVector & | rotVel | ||
| ) | const |
Converts the rotational velocity from the given units to rad/s.
| double makVrv::DtUnitConverterCollection::revertTemperature | ( | makArchives::DtDisplayUnitsSettingsRecord::TemperatureUnits | tempUnits, |
| double | temperature | ||
| ) | const |
Converts the temperature from the given units to Kelvins.
| double makVrv::DtUnitConverterCollection::revertPressure | ( | makArchives::DtDisplayUnitsSettingsRecord::PressureUnits | pressureUnits, |
| double | pressure | ||
| ) | const |
Converts the pressure from the given units to Pascals.
| void makVrv::DtUnitConverterCollection::addUnitConverter | ( | makArchives::DtDisplayUnitsSettingsRecord::DisplayUnitType | type, |
| unsigned int | unit, | ||
| const DtUnitConverter * | converter | ||
| ) |
Adds the converter to the unit converter dictionary. If a converter for the given unit exists, it is deleted and replaced. This converter collection takes ownership of the converter.
| const DtTimeUnitConverter* makVrv::DtUnitConverterCollection::timeConverterFor | ( | makArchives::DtDisplayUnitsSettingsRecord::TimeUnits | unit | ) | const |
Returns the velocity converter for the specified unit type.
| const DtDistanceUnitConverter* makVrv::DtUnitConverterCollection::distanceConverterFor | ( | makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits | unit | ) | const |
Returns the distance converter for the specified unit type.
| const DtOrientationUnitConverter* makVrv::DtUnitConverterCollection::orientationConverterFor | ( | makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits | unit | ) | const |
Returns the orientation converter for the specified unit type.
| const DtTemperatureUnitConverter* makVrv::DtUnitConverterCollection::temperatureConverterFor | ( | makArchives::DtDisplayUnitsSettingsRecord::TemperatureUnits | unit | ) | const |
Returns the temperature converter for the specified unit type.
| const DtPressureUnitConverter* makVrv::DtUnitConverterCollection::pressureConverterFor | ( | makArchives::DtDisplayUnitsSettingsRecord::PressureUnits | unit | ) | const |
Returns the pressure converter for the specified unit type.
|
protected |
Populates the converter collection.
|
protected |
Returns the factor for converting a distance to the given units.
|
protected |
Returns the factor for converting a velocity to the given units.
|
protected |
Returns the factor for converting an acceleration to the given units.
|
protected |
Returns the factor for converting an angle to the given units.
|
protected |
Returns the factor for converting a rotational velocity to the given units.
|
protected |
Returns the factor for converting a pressure to the given units.
|
private |
Not implemented.
|
protected |