HDK
|
#include <Unit.h>
Public Member Functions | |
UnitConverter () | |
virtual | ~UnitConverter () |
virtual float | convert (float input, const string &inputUnit, const string &outputUnit) const =0 |
virtual int | getUnitAsInteger (const string &) const |
virtual string | getUnitFromInteger (int) const |
virtual Vector2 | convert (const Vector2 &input, const string &inputUnit, const string &outputUnit) const =0 |
virtual Vector3 | convert (const Vector3 &input, const string &inputUnit, const string &outputUnit) const =0 |
virtual Vector4 | convert (const Vector4 &input, const string &inputUnit, const string &outputUnit) const =0 |
virtual void | write (DocumentPtr doc) const =0 |
Create unit definitions in a document based on the converter. More... | |
An abstract base class for unit converters. Each unit converter instance is responsible for a single unit type.
|
pure virtual |
Convert a given value in a given unit to a desired unit
Implemented in LinearUnitConverter.
|
pure virtual |
Convert a given value in a given unit to a desired unit
Implemented in LinearUnitConverter.
|
pure virtual |
Convert a given value in a given unit to a desired unit
Implemented in LinearUnitConverter.
|
pure virtual |
Convert a given value in a given unit to a desired unit
Implemented in LinearUnitConverter.
Given a unit name return a value that it can map to as an integer Returns -1 value if not found
Reimplemented in LinearUnitConverter.
Given an integer index return the unit name in the map used by the converter Returns Empty string if not found
Reimplemented in LinearUnitConverter.
|
pure virtual |
Create unit definitions in a document based on the converter.
Implemented in LinearUnitConverter.