This class contains configuration options for printing elements.
More...
#include <PrintConfig.hh>
|
| PrintConfig () |
| Default constructor. All options are set to false by default.
|
|
bool | operator== (const PrintConfig &_config) const |
| Return true if both PrintConfig objects contain the same values.
|
|
int | OutPrecision () const |
| Retrieve the output stream's set precision value.
|
|
bool | PreserveIncludes () const |
| Check if tags are to be preserved or expanded.
|
|
bool | RotationInDegrees () const |
| Returns whether or not pose rotations should be printed in degrees.
|
|
std::optional< unsigned int > | RotationSnapToDegrees () const |
| Returns the current degree value that pose rotations will snap to when printed.
|
|
std::optional< double > | RotationSnapTolerance () const |
| Returns the tolerance for snapping degree values when printed.
|
|
void | SetOutPrecision (int _precision) |
| Set precision of output stream for float / double types.
|
|
void | SetPreserveIncludes (bool _preserve) |
| Set print config to preserve tags.
|
|
void | SetRotationInDegrees (bool _value) |
| Sets the option for printing pose rotations in degrees if true, otherwise they will be printed as radians by default.
|
|
bool | SetRotationSnapToDegrees (unsigned int _interval, double _tolerance) |
| Sets the option for printing pose rotation in degrees as well as snapping the rotation to the desired interval, with the provided tolerance.
|
|
bool | SetRotationSnapToDegrees (unsigned int _interval, double _tolerance, sdf::Errors &_errors) |
| Sets the option for printing pose rotation in degrees as well as snapping the rotation to the desired interval, with the provided tolerance.
|
|
This class contains configuration options for printing elements.
◆ PrintConfig()
sdf::SDF_VERSION_NAMESPACE::PrintConfig::PrintConfig |
( |
| ) |
|
Default constructor. All options are set to false by default.
◆ operator==()
bool sdf::SDF_VERSION_NAMESPACE::PrintConfig::operator== |
( |
const PrintConfig & |
_config | ) |
const |
Return true if both PrintConfig objects contain the same values.
- Parameters
-
- Returns
- True if 'this' == _config.
◆ OutPrecision()
int sdf::SDF_VERSION_NAMESPACE::PrintConfig::OutPrecision |
( |
| ) |
const |
Retrieve the output stream's set precision value.
- Returns
- The output stream's precision.
◆ PreserveIncludes()
bool sdf::SDF_VERSION_NAMESPACE::PrintConfig::PreserveIncludes |
( |
| ) |
const |
Check if tags are to be preserved or expanded.
- Returns
- True if tags are preserved. False if they are to be expanded.
◆ RotationInDegrees()
bool sdf::SDF_VERSION_NAMESPACE::PrintConfig::RotationInDegrees |
( |
| ) |
const |
Returns whether or not pose rotations should be printed in degrees.
- Returns
- True if pose rotations are printed in degrees, false otherwise.
◆ RotationSnapToDegrees()
std::optional< unsigned int > sdf::SDF_VERSION_NAMESPACE::PrintConfig::RotationSnapToDegrees |
( |
| ) |
const |
Returns the current degree value that pose rotations will snap to when printed.
- Returns
- The assigned degrees interval value to snap to. If it has not been assigned, a nullopt will be returned.
◆ RotationSnapTolerance()
std::optional< double > sdf::SDF_VERSION_NAMESPACE::PrintConfig::RotationSnapTolerance |
( |
| ) |
const |
Returns the tolerance for snapping degree values when printed.
- Returns
- The assigned tolerance value which allows snapping to happen. If it has not been assigned, a nullopt will be returned.
◆ SetOutPrecision()
void sdf::SDF_VERSION_NAMESPACE::PrintConfig::SetOutPrecision |
( |
int |
_precision | ) |
|
Set precision of output stream for float / double types.
By default, the output stream uses maximum precision.
- Parameters
-
[in] | _precision | The new precision value. To set back to maximum precision, use std::numeric_limits<int>::max(). |
◆ SetPreserveIncludes()
void sdf::SDF_VERSION_NAMESPACE::PrintConfig::SetPreserveIncludes |
( |
bool |
_preserve | ) |
|
Set print config to preserve tags.
- Parameters
-
[in] | _preserve | True to preserve tags. False to expand included model. |
◆ SetRotationInDegrees()
void sdf::SDF_VERSION_NAMESPACE::PrintConfig::SetRotationInDegrees |
( |
bool |
_value | ) |
|
Sets the option for printing pose rotations in degrees if true, otherwise they will be printed as radians by default.
- Parameters
-
[in] | _value | Whether to print pose rotations in degrees. |
◆ SetRotationSnapToDegrees() [1/2]
bool sdf::SDF_VERSION_NAMESPACE::PrintConfig::SetRotationSnapToDegrees |
( |
unsigned int |
_interval, |
|
|
double |
_tolerance |
|
) |
| |
Sets the option for printing pose rotation in degrees as well as snapping the rotation to the desired interval, with the provided tolerance.
- Parameters
-
[in] | _interval | Degrees interval to snap to, this value must be larger than 0, and less than or equal to 360. |
[in] | _tolerance | Tolerance which snapping occurs, this value must be larger than 0, less than 360, and less than the provided interval. |
- Returns
- True, unless any of the provided values are not valid.
◆ SetRotationSnapToDegrees() [2/2]
bool sdf::SDF_VERSION_NAMESPACE::PrintConfig::SetRotationSnapToDegrees |
( |
unsigned int |
_interval, |
|
|
double |
_tolerance, |
|
|
sdf::Errors & |
_errors |
|
) |
| |
Sets the option for printing pose rotation in degrees as well as snapping the rotation to the desired interval, with the provided tolerance.
- Parameters
-
[in] | _interval | Degrees interval to snap to, this value must be larger than 0, and less than or equal to 360. |
[in] | _tolerance | Tolerance which snapping occurs, this value must be larger than 0, less than 360, and less than the provided interval. |
[out] | _errors | Vector of Errors. |
- Returns
- True, unless any of the provided values are not valid.
The documentation for this class was generated from the following file: