|
| | TwoPartUnit (const StringView &name, const TranslatedString &translated_id, const TranslatedString &abr_major, const TranslatedString &abr_minor, fltp08 scale, fltp08 sub_unit) |
| | Constructs a TwoPartUnit with major and minor subdivisions.
|
| virtual Unit * | clone (const StringView &name, const TranslatedString &translated_id) const override |
| | Creates a copy of this unit with a new name and display name.
|
| virtual fltp08 | epsilon (fltp08 value, uint01 direction) const override |
| | Returns the smallest meaningful difference for a value in this unit.
|
| virtual fltp08 | fromString (const StringView &unit_string, uint01 direction=X) const override |
| | Parses a two-part formatted string into a numeric value in this unit's space.
|
| virtual StringView | getNextPreferredSeparator (const StringView &string, uint01 direction) const override |
| | Returns the next preferred separator character for user input parsing.
|
| void | toString (String &string, const fltp08 &local_space, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, bool include_abv=true, uint01 direction=X) const override |
| | Writes a formatted two-part display string into the given string.
|
| | ScaledUnit (StringView name, TranslatedString translated_id, TranslatedString abbreviation, fltp08 scale) |
| | Constructs a ScaledUnit with the given scale factor and abbreviation.
|
| virtual const TranslatedString & | abbreviation (uint01 direction=X) const override |
| | Returns the translated abbreviation for this unit.
|
| virtual fltp08 | convertFromString (const StringView &unit_string, uint01 direction=X) const override |
| | Converts a unit-formatted string to a program-space value.
|
| virtual fltp08 | convertFromUnit (const fltp08 &program_space, const uint01 direction=X) const override |
| | Converts a scalar from this unit back to program space by dividing by the scale.
|
| virtual Ray< 3, fltp08 > | convertFromUnit (const Ray< 3, fltp08 > &program_space) const override |
| | Converts a 3D ray from this unit back to program space by dividing by the scale.
|
| virtual Vertex< 3, fltp08 > | convertFromUnit (const Vertex< 3, fltp08 > &program_space) const override |
| | Converts a 3D vertex from this unit back to program space by dividing by the scale.
|
| virtual String | convertToString (const fltp08 &program_space, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, bool include_abv=true, uint01 direction=X) const override |
| | Converts a program-space scalar to a formatted display string.
|
| virtual fltp08 | convertToUnit (const fltp08 &program_space, const uint01 direction=X) const override |
| | Converts a scalar from program space to this unit by multiplying by the scale.
|
| virtual Ray< 3, fltp08 > | convertToUnit (const Ray< 3, fltp08 > &program_space) const override |
| | Converts a 3D ray from program space to this unit by multiplying by the scale.
|
| virtual Vertex< 3, fltp08 > | convertToUnit (const Vertex< 3, fltp08 > &program_space) const override |
| | Converts a 3D vertex from program space to this unit by multiplying by the scale.
|
| virtual Matrix< fltp08 > | matrix () const override |
| | Returns the transformation matrix representing this unit's scale.
|
| virtual const Unit * | subUnit (uint01) const override |
| | Returns the sub-unit for the given axis direction.
|
| | Unit (StringView name, TranslatedString translated_id) |
| | Constructs a Unit with the given internal name and translated display name.
|
|
virtual | ~Unit ()=default |
| | Virtual destructor.
|
| virtual Unit * | clone () const |
| | Creates a deep copy of this unit.
|
| template<class t_angle_type> |
| Angle< t_angle_type > | convertAngleFromUnit (const fltp08 &unit_space, uint01 direction=X) const |
| | Converts a scalar value in this unit's space back to an Angle in program space.
|
| template<class t_angle_type> |
| String | convertToString (const Angle< t_angle_type > &program_space, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, bool include_abv=true, uint01 direction=X) const |
| | Converts an angle value from program space to a formatted string in this unit.
|
| template<class t_angle_type> |
| fltp08 | convertToUnit (const Angle< t_angle_type > &program_space, uint01 direction=X) const |
| | Converts an angle value from program space to this unit's scalar representation.
|
| bool | operator== (const Unit &other) const |
| | Checks equality between two units by comparing their matrices and names.
|
| virtual void | toFormula (StringAllocatingView &unit_string, uint01 direction=X) const |
| | Writes the unit conversion as a formula into the given string.
|
| String | toString (const fltp08 &unit_space, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, bool include_abv=true, uint01 direction=X) const |
| | Formats a value already in this unit's space into a display string.
|
| virtual TranslatedString | translatedAxisName (uint04 index) const |
| | Returns the translated axis name for a given axis index.
|
| TranslatedString | translatedName () const |
| | Returns the translated display name of this unit.
|
A unit that has two parts (Think feet, inches).
Definition at line 647 of file UnitTypes.h.