Public Member Functions | List of all members
sdf::SDF_VERSION_NAMESPACE::PrintConfig Class Reference

This class contains configuration options for printing elements. More...

#include <PrintConfig.hh>

Public Member Functions

 PrintConfig ()
 Default constructor. All options are set to false by default. More...
 
bool operator== (const PrintConfig &_config) const
 Return true if both PrintConfig objects contain the same values. More...
 
bool PreserveIncludes () const
 Check if tags are to be preserved or expanded. More...
 
bool RotationInDegrees () const
 Returns whether or not pose rotations should be printed in degrees. More...
 
std::optional< unsigned int > RotationSnapToDegrees () const
 Returns the current degree value that pose rotations will snap to when printed. More...
 
std::optional< double > RotationSnapTolerance () const
 Returns the tolerance for snapping degree values when printed. More...
 
void SetPreserveIncludes (bool _preserve)
 Set print config to preserve tags. More...
 
void SetRotationInDegrees (bool _value)
 Sets the option for printing pose rotations in degrees if true, otherwise they will be printed as radians by default. More...
 
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. More...
 

Detailed Description

This class contains configuration options for printing elements.

Constructor & Destructor Documentation

◆ PrintConfig()

sdf::SDF_VERSION_NAMESPACE::PrintConfig::PrintConfig ( )

Default constructor. All options are set to false by default.

Member Function Documentation

◆ operator==()

bool sdf::SDF_VERSION_NAMESPACE::PrintConfig::operator== ( const PrintConfig _config) const

Return true if both PrintConfig objects contain the same values.

Parameters
[in]_configPrintConfig to compare.
Returns
True if 'this' == _config.

◆ 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.

◆ SetPreserveIncludes()

void sdf::SDF_VERSION_NAMESPACE::PrintConfig::SetPreserveIncludes ( bool  _preserve)

Set print config to preserve tags.

Parameters
[in]_preserveTrue 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]_valueWhether to print pose rotations in degrees.

◆ SetRotationSnapToDegrees()

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]_intervalDegrees interval to snap to, this value must be larger than 0, and less than or equal to 360.
[in]_toleranceTolerance 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: