This class contains configuration options for printing elements.
More...
#include <PrintConfig.hh>
This class contains configuration options for printing elements.
◆ PrintConfig()
sdf::v12::PrintConfig::PrintConfig |
( |
| ) |
|
Default constructor. All options are set to false by default.
◆ operator==()
bool sdf::v12::PrintConfig::operator== |
( |
const PrintConfig & |
_config | ) |
const |
Return true if both PrintConfig objects contain the same values.
- Parameters
-
- Returns
- True if 'this' == _config.
◆ PreserveIncludes()
bool sdf::v12::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::v12::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::v12::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::v12::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.
◆ SetPreserveIncludes()
void sdf::v12::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::v12::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()
bool sdf::v12::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.
The documentation for this class was generated from the following file: