|  | Scanframe Modular Application 0.1.0
    | 
All axis values in one structure accompanied by some handy manipulation methods. More...
#include <AxesCoord.h>
| Public Types | |
| enum | ECompare : unsigned int { crEQUAL = 0 , crTHIS_EQUAL = 1 , crOTHER_EQUAL = 2 , crNOT_EQUAL = 3 } | 
| Result of the compare function.  More... | |
| typedef double | value_type | 
| Type the axes values are stored in. | |
| typedef TVector3D< value_type > | vector3d_type | 
| Type for the 3D vector. | |
| typedef TVector< AxesCoord > | Vector | 
| Type definition. | |
| Public Member Functions | |
| AxesCoord () | |
| Default constructor. | |
| AxesCoord (const AxesCoord &ac) | |
| Copy constructor. | |
| AxesCoord (const vector3d_type &vect) | |
| Initializing constructor using a 3D vector. | |
| AxesCoord (const std::string &s, bool ignore_err=false) noexcept(false) | |
| Constructor using a string containing the axis values. | |
| AxesCoord & | operator= (const AxesCoord &ac) | 
| Assignment operator. | |
| void | clear () | 
| Clears all values in the coordinate. | |
| bool | isEmpty () const | 
| Gets empty status on when no axes are set. | |
| void | set (int axis_loc, value_type value) | 
| Sets an axis value. | |
| void | unset (int axis_loc) | 
| Unsets an axis value. | |
| bool | isSet (int axis_loc) const | 
| Returns true if value of location 'axis_loc' is available. | |
| value_type & | getValue (int axis_loc) | 
| Returns the value in the array. | |
| value_type | getValue (int axis_loc) const | 
| Gets axis value of the passed axis. | |
| int | getMap () const | 
| Gets the bitmap of set axes. | |
| void | setMap (int map) | 
| Sets the bitmap of axes. | |
| std::string | toString () const | 
| Gets the string representation of coord '(1.23,,1.56,,,,,)'. When an axis is not enabled the designated string for it is empty. | |
| AxesCoord & | fromString (const std::string &s, bool ignore_err=false) noexcept(false) | 
| Gets the vector value from the string representation formed like '(1.23,4.56,7.89)'. Throws an exception when the string is not in the correct format. | |
| AxesCoord & | operator<< (const AxisValue &av) | 
| Assign the axis value to the value in the coord and enables it in the map. | |
| AxesCoord & | operator= (const AxisValue &av) | 
| Assign the axis value to the value in the coord but does not enable the value in the map. | |
| AxesCoord & | operator-= (const AxisValue &av) | 
| Subtracts the axis value to the current value in the coord. | |
| AxesCoord & | operator+= (const AxisValue &av) | 
| Adds the axis value to the current value in the coord. | |
| AxesCoord & | operator|= (const AxesCoord &ac) | 
| Operator which add the axes not yet set in this instance. | |
| AxesCoord & | operator&= (const AxesCoord &ac) | 
| Operator which sets the axes already set in this instance. | |
| AxesCoord & | operator-= (const AxesCoord &ac) | 
| Subtracts only axis values form axes set in this instance. | |
| AxesCoord & | operator+= (const AxesCoord &ac) | 
| Adds only axis values form axes set in this instance. | |
| ECompare | compare (const AxesCoord &ac, const AxesCoord &tolerances, const AxisLocations &rad_unlimited) const | 
| Compares two coordinates using a second coordinate containing max differences. | |
| ECompare | compare (const AxesCoord &ac, const AxesCoord &tolerances) const | 
| Compares two coordinates using a second coordinate containing max differences. Tests only the values in the coordinate that exists in both coordinates. The C- and D-axis are set to be unlimited axes. | |
| bool | isEqual (const AxesCoord &ac, const AxesCoord &tolerances={}) const | 
| Compares if the given coord is equal to this one using the compare() method. | |
| AxesCoord & | operator>> (int axis_loc) | 
| Unsets a axis value. | |
| AxisValue | operator[] (size_t axis_loc) const | 
| Assigns a specific axis value to this structure. | |
| vector3d_type | getVector (bool all=true) const | 
| Gets the 3D vector formed by the XYZ axis. | |
| AxesCoord & | setVector (const vector3d_type &vect, bool all=true) | 
| Sets the 3D vector formed by the XYZ axis. | |
| AxesCoord & | offset (const vector3d_type &ofs) | 
| Adds an offset to the existing coordinate. | |
| AxesCoord | offsetBy (const vector3d_type &ofs) const | 
| Adds an offset to the coordinate and returns the new formed coord. | |
| Static Public Attributes | |
| static constexpr auto | tolerance = std::numeric_limits<value_type>::epsilon() * 10.0 | 
| Tolerance for when comparing in the equal operator. Empirical chosen epsilon multiplier to make it work. Used in compare(). | |
All axis values in one structure accompanied by some handy manipulation methods.
| typedef double sf::gmi::AxesCoord::value_type | 
Type the axes values are stored in.
| typedef TVector<AxesCoord> sf::gmi::AxesCoord::Vector | 
Type definition.
Type for the 3D vector.
| enum sf::gmi::AxesCoord::ECompare : unsigned int | 
Result of the compare function.
| sf::gmi::AxesCoord::AxesCoord | ( | ) | 
Default constructor.
| sf::gmi::AxesCoord::AxesCoord | ( | const AxesCoord & | ac | ) | 
Copy constructor.
| 
 | explicit | 
Initializing constructor using a 3D vector.
| 
 | explicit | 
Constructor using a string containing the axis values.
| s | String formatted like '(1.23,,1.56,,,,,)'. | 
| ignore_err | When true no exception is thrown. | 
| void sf::gmi::AxesCoord::clear | ( | ) | 
Clears all values in the coordinate.
Compares two coordinates using a second coordinate containing max differences. Tests only the values in the coordinate that exists in both coordinates. The C- and D-axis are set to be unlimited axes.
| ac | Axes coord being compared. | 
| tolerances | Axes values containing accuracy of the comparison. | 
| ECompare sf::gmi::AxesCoord::compare | ( | const AxesCoord & | ac, | 
| const AxesCoord & | tolerances, | ||
| const AxisLocations & | rad_unlimited | ||
| ) | const | 
Compares two coordinates using a second coordinate containing max differences.
| ac | Axes coord being compared. | 
| tolerances | Axes values containing accuracy of the comparison. | 
| rad_unlimited | Set of radial unlimited axis. When the axis is not set in the tolerances argument defaults to the tolerance value. | 
| AxesCoord & sf::gmi::AxesCoord::fromString | ( | const std::string & | s, | 
| bool | ignore_err = false | ||
| ) | 
Gets the vector value from the string representation formed like '(1.23,4.56,7.89)'. Throws an exception when the string is not in the correct format.
| s | Formatted string to read the values from. | 
| ignore_err | Determines to throw an exception or not when the format is invalid. | 
| std::invalid_argument | 
| int sf::gmi::AxesCoord::getMap | ( | ) | const | 
Gets the bitmap of set axes.
| value_type & sf::gmi::AxesCoord::getValue | ( | int | axis_loc | ) | 
Returns the value in the array.
| axis_loc | Axis location. | 
| value_type sf::gmi::AxesCoord::getValue | ( | int | axis_loc | ) | const | 
Gets axis value of the passed axis.
| axis_loc | 
| vector3d_type sf::gmi::AxesCoord::getVector | ( | bool | all = true | ) | const | 
Gets the 3D vector formed by the XYZ axis.
| all | When true all values are retrieved including the not set ones. | 
| bool sf::gmi::AxesCoord::isEmpty | ( | ) | const | 
Gets empty status on when no axes are set.
Compares if the given coord is equal to this one using the compare() method.
| ac | Instance reference to be compared with. | 
| tolerances | Axes values containing accuracy of the comparison. | 
| bool sf::gmi::AxesCoord::isSet | ( | int | axis_loc | ) | const | 
Returns true if value of location 'axis_loc' is available.
| axis_loc | 
| AxesCoord & sf::gmi::AxesCoord::offset | ( | const vector3d_type & | ofs | ) | 
Adds an offset to the existing coordinate.
| ofs | 3D vector offset. | 
| AxesCoord sf::gmi::AxesCoord::offsetBy | ( | const vector3d_type & | ofs | ) | const | 
Adds an offset to the coordinate and returns the new formed coord.
| ofs | 
Operator which sets the axes already set in this instance.
| ac | Source instance. | 
Adds only axis values form axes set in this instance.
| ac | Source instance. | 
Adds the axis value to the current value in the coord.
| av | 
Subtracts only axis values form axes set in this instance.
| ac | Source instance. | 
Subtracts the axis value to the current value in the coord.
| av | 
Assign the axis value to the value in the coord and enables it in the map.
| av | 
Assign the axis value to the value in the coord but does not enable the value in the map.
| av | 
| AxesCoord & sf::gmi::AxesCoord::operator>> | ( | int | axis_loc | ) | 
Unsets a axis value.
| axis_loc | Axis location to remove. | 
| AxisValue sf::gmi::AxesCoord::operator[] | ( | size_t | axis_loc | ) | const | 
Assigns a specific axis value to this structure.
| axis_loc | 
Operator which add the axes not yet set in this instance.
| ac | Source instance. | 
| void sf::gmi::AxesCoord::set | ( | int | axis_loc, | 
| value_type | value | ||
| ) | 
Sets an axis value.
| axis_loc | The target axis sf::gmi::EAxisLocation. | 
| value | The axis value in axis units. | 
| void sf::gmi::AxesCoord::setMap | ( | int | map | ) | 
Sets the bitmap of axes.
| map | 
| AxesCoord & sf::gmi::AxesCoord::setVector | ( | const vector3d_type & | vect, | 
| bool | all = true | ||
| ) | 
Sets the 3D vector formed by the XYZ axis.
| vect | 3D vector. | 
| all | When true the coord has only XYZ axis set after this. When false only the coord set values are copied from the vector. | 
| std::string sf::gmi::AxesCoord::toString | ( | ) | const | 
Gets the string representation of coord '(1.23,,1.56,,,,,)'. When an axis is not enabled the designated string for it is empty.
| void sf::gmi::AxesCoord::unset | ( | int | axis_loc | ) | 
Unsets an axis value.
| axis_loc | 
| 
 | staticconstexpr | 
Tolerance for when comparing in the equal operator. Empirical chosen epsilon multiplier to make it work. Used in compare().