API Documentation
Loading...
Searching...
No Matches
AngleUnit Struct Reference

Contains logic for converting angles into user defined units including up-direction and clockwise-logic. More...

#include <UnitTypes.h>

Inheritance diagram for AngleUnit:
[legend]
Collaboration diagram for AngleUnit:
[legend]

Public Member Functions

 AngleUnit (const String &name, const TranslatedString &translated_name, const TranslatedString &abbreviation, fltp08 scale)
 
virtual ~AngleUnit ()=default
 
virtual fltp08 convertToUnit (const fltp08 &program_space, uint01 direction=X) const override
 
virtual fltp08 normalize (fltp08 value, uint01 direction) const
 
virtual fltp08 denormalize (fltp08 value, uint01 direction) const
 
virtual fltp08 convertFromUnit (const fltp08 &program_space, uint01 direction=X) const override
 
virtual Vertex< 3, fltp08convertToUnit (const Vertex< 3, fltp08 > &program_space) const override
 
virtual Ray< 3, fltp08convertToUnit (const Ray< 3, fltp08 > &program_space) const override
 
virtual Vertex< 3, fltp08convertFromUnit (const Vertex< 3, fltp08 > &program_space) const override
 
virtual Ray< 3, fltp08convertFromUnit (const Ray< 3, fltp08 > &program_space) const override
 
virtual Unitclone (const String &name, const TranslatedString &translated_id) const override
 
virtual fltp08 epsilon (fltp08 value, uint01 direction=X) const override
 
- Public Member Functions inherited from ScaledUnit
 ScaledUnit (String name, TranslatedString translated_id, TranslatedString abbreviation, fltp08 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
 
virtual fltp08 convertFromString (const String &unit_string, uint01 direction=X) const override
 
virtual fltp08 fromString (const String &unit_string, uint01 direction=X) const override
 
virtual const TranslatedStringabbreviation (uint01 direction=X) const override
 
virtual const UnitsubUnit (uint01) const override
 
virtual Matrix< fltp08matrix () const override
 
- Public Member Functions inherited from Unit
 Unit (String name, TranslatedString translated_id)
 
virtual ~Unit ()=default
 
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
 
template<class t_angle_type >
fltp08 convertToUnit (const Angle< t_angle_type > &program_space, uint01 direction=X) const
 
template<class t_angle_type >
Angle< t_angle_type > convertAngleFromUnit (const fltp08 &unit_space, uint01 direction=X) const
 
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
 
virtual void toString (String &string, const fltp08 &unit_space, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, bool include_abv=true, uint01 direction=X) const
 
TranslatedString translatedName () const
 
virtual TranslatedString translatedAxisName (uint04 index) const
 
virtual String getNextPreferredSeparator (const String &current_string, uint01 direction=X) const
 
virtual String toFormula (const String &unit_string, uint01 direction=X) const
 
bool operator== (const Unit &other) const
 
virtual Unitclone () const
 

Public Attributes

fltp08 period = 2.0 * Angle<fltp08>::INDEX_PI
 
Vector< 3, fltp08upper_limits = Vector<3, fltp08>(2.0 * Angle<fltp08>::INDEX_PI)
 
Vector< 3, fltp08reflex_point = Constant<Vector<3, fltp08>>::NaN
 
Vector< 3, bool > normalized = Vector<3, bool>(false)
 
Vector< 3, bool > reflexes_up = Vector<3, bool>(false)
 
- Public Attributes inherited from ScaledUnit
const fltp08 scale
 
const TranslatedString core_abbreviation
 
- Public Attributes inherited from Unit
const String name
 
const TranslatedString translated_id
 
TranslatedString axis_name_ids [4]
 
TranslatedString axis_abbreviations [4]
 

Protected Member Functions

 AngleUnit (const String &name, const TranslatedString &translated_name, const TranslatedString &abbreviation, fltp08 scale, const Vector< 3, bool > &normalized, const Vector< 3, fltp08 > &upper_limits, const Vector< 3, fltp08 > &reflexes, const Vector< 3, bool > &reflexes_up)
 

Additional Inherited Members

- Static Protected Member Functions inherited from Unit
static Buffer< StringOperatorSplit (const String &string)
 

Detailed Description

Contains logic for converting angles into user defined units including up-direction and clockwise-logic.


Class: AngleUnit

autotoc_md478

Constructor & Destructor Documentation

◆ AngleUnit() [1/2]

AngleUnit ( const String & name,
const TranslatedString & translated_name,
const TranslatedString & abbreviation,
fltp08 scale )

◆ AngleUnit() [2/2]

AngleUnit ( const String & name,
const TranslatedString & translated_name,
const TranslatedString & abbreviation,
fltp08 scale,
const Vector< 3, bool > & normalized,
const Vector< 3, fltp08 > & upper_limits,
const Vector< 3, fltp08 > & reflexes,
const Vector< 3, bool > & reflexes_up )
protected

◆ ~AngleUnit()

virtual ~AngleUnit ( )
virtualdefault

Member Function Documentation

◆ clone()

Unit * clone ( const String & name,
const TranslatedString & translated_id ) const
nodiscardoverridevirtual

Reimplemented from ScaledUnit.

Reimplemented in DDMMSSAngleUnit, ThreePartAngleUnit, and TwoPartAngleUnit.

◆ convertFromUnit() [1/3]

fltp08 convertFromUnit ( const fltp08 & program_space,
uint01 direction = X ) const
nodiscardoverridevirtual

Reimplemented from ScaledUnit.

◆ convertFromUnit() [2/3]

Ray< 3, fltp08 > convertFromUnit ( const Ray< 3, fltp08 > & program_space) const
nodiscardoverridevirtual

Reimplemented from ScaledUnit.

◆ convertFromUnit() [3/3]

Vertex< 3, fltp08 > convertFromUnit ( const Vertex< 3, fltp08 > & program_space) const
nodiscardoverridevirtual

Reimplemented from ScaledUnit.

◆ convertToUnit() [1/3]

fltp08 convertToUnit ( const fltp08 & program_space,
uint01 direction = X ) const
nodiscardoverridevirtual

Reimplemented from ScaledUnit.

◆ convertToUnit() [2/3]

Ray< 3, fltp08 > convertToUnit ( const Ray< 3, fltp08 > & program_space) const
nodiscardoverridevirtual

Reimplemented from ScaledUnit.

◆ convertToUnit() [3/3]

Vertex< 3, fltp08 > convertToUnit ( const Vertex< 3, fltp08 > & program_space) const
nodiscardoverridevirtual

Reimplemented from ScaledUnit.

◆ denormalize()

fltp08 denormalize ( fltp08 value,
uint01 direction ) const
nodiscardvirtual

◆ epsilon()

fltp08 epsilon ( fltp08 value,
uint01 direction = X ) const
nodiscardoverridevirtual

Reimplemented from Unit.

Reimplemented in DDMMSSAngleUnit, ThreePartAngleUnit, and TwoPartAngleUnit.

◆ normalize()

fltp08 normalize ( fltp08 value,
uint01 direction ) const
nodiscardvirtual

Member Data Documentation

◆ normalized

Vector<3, bool> normalized = Vector<3, bool>(false)

◆ period

fltp08 period = 2.0 * Angle<fltp08>::INDEX_PI

◆ reflex_point

Vector<3, fltp08> reflex_point = Constant<Vector<3, fltp08>>::NaN

◆ reflexes_up

Vector<3, bool> reflexes_up = Vector<3, bool>(false)

◆ upper_limits

Vector<3, fltp08> upper_limits = Vector<3, fltp08>(2.0 * Angle<fltp08>::INDEX_PI)

The documentation for this struct was generated from the following files: